Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Drop support of setting title to string (instead of title.text) in v3? #7177

Open
archmoj opened this issue Sep 27, 2024 · 3 comments
Open
Assignees
Labels
feature something new P2 needed for current cycle
Milestone

Comments

@archmoj
Copy link
Contributor

archmoj commented Sep 27, 2024

No description provided.

@archmoj archmoj added this to the v3.0.0 milestone Sep 27, 2024
@gvwilson
Copy link
Contributor

gvwilson commented Oct 1, 2024

@archmoj what's the background for this one?

@gvwilson gvwilson self-assigned this Oct 1, 2024
@gvwilson gvwilson added feature something new P2 needed for current cycle labels Oct 1, 2024
@archmoj
Copy link
Contributor Author

archmoj commented Oct 1, 2024

When title is added in plotly.js it only accepted a string e.g. title: 'The titlte'.
Later on more options were needed to control the title e.g. font.
Therefore title could be an object with multiple keys e.g.

title: {
  text: 'The title',
  font: ...
  ...
}

The proposal here is to drop the deprecated form, when title is set to a string e.g. title: 'The titlte'.

@alexcjohnson
Copy link
Collaborator

Several years ago we expanded all the title attributes from strings to dicts, with the original string moved to the text field inside the dict. But we kept it backward compatible, so a figure supplied with a string gets converted to the dict form automatically. This leads to confusion, both because people will see examples done both ways and because anyone using the old one will then inspect their graphs and see something else in them, so it’s probably time to remove this compatibility layer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature something new P2 needed for current cycle
Projects
None yet
Development

No branches or pull requests

3 participants