-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
feat: Add template string fallback attributes #7577
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
Merged
camdecoster
merged 31 commits into
master
from
cam/7564/return-empty-string-template-format-function
Oct 27, 2025
Merged
Changes from 17 commits
Commits
Show all changes
31 commits
Select commit
Hold shift + click to select a range
e980e44
Linting/formatting
camdecoster 212f892
Return empty string for undefined value in templateFormatString
camdecoster 75b157f
Refactoring
camdecoster 5f3670f
Add fallback value for template strings
camdecoster 336e9ae
Add fallback to calls to hovertemplateString
camdecoster 02a4cad
Add fallback to calls to texttemplateString
camdecoster 77bc2b9
Add fallback to calls to texttemplateStringForShapes
camdecoster 85b67e9
Update defaults calculations
camdecoster 680c793
Add helper function for template fallback attributes
camdecoster 52c29cc
Add fallback value to attributes files
camdecoster f623b22
Update esbuild strip meta plugin to handle more joined arrays
camdecoster 074f8a0
Return array from ternary
camdecoster 6f3daa8
Update tests per default fallback value
camdecoster 6719bd3
Update schema
camdecoster 84fc044
Update test baselines
camdecoster e719f74
Rename object keys
camdecoster fb7a40c
Add/update tests to check fallback value
camdecoster faaae28
Add draftlog
camdecoster 5c032c6
Fix typos
camdecoster a0ce641
Update fallback `editType` to match template
camdecoster 14ab31c
Handle undefined values and missing values differently
camdecoster 4f79efe
Update default fallback value and template attribute descriptions
camdecoster 257475c
Add tests for missing and undefined values
camdecoster a148edd
Update schema
camdecoster c40fe9f
Merge remote-tracking branch 'origin/master' into cam/7564/return-emp…
camdecoster 6a66148
Revert "Update test baselines"
camdecoster 5215f13
Always use fallback for missing values, except when fallback is false
camdecoster 30f87f3
Update schema
camdecoster b61d70d
Update mocks to show fallback values
camdecoster d900ca3
Update tests per final behavior
camdecoster a061787
Update baseline images
camdecoster File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| - Add `hovertemplatefallback` and `texttemplatefallback` attributes [[#7577](https://github.com/plotly/plotly.js/pull/7577)] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: IMO this argument should continue to be called
d3localefor clarityThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm going to leave it as is since the JSDoc description explains what it is.