-
Notifications
You must be signed in to change notification settings - Fork 121
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
feat(legend): multiline labels with maxLines option #1285
Merged
nickofthyme
merged 16 commits into
elastic:master
from
nickofthyme:multiline-legend-labels
Aug 6, 2021
Merged
Changes from 4 commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
aff29d4
feat(legend): multiline labels
nickofthyme 477f611
fix: api changes
nickofthyme b60160f
test: update jest snapshots
nickofthyme 5b2bc29
Merge branch 'master' into multiline-legend-labels
nickofthyme bec8643
test: add vrts for new multiline option
nickofthyme 1859545
Merge remote-tracking branch 'origin' into multiline-legend-labels
nickofthyme d6fb516
Merge remote-tracking branch 'origin' into multiline-legend-labels
nickofthyme fcd45ca
Merge remote-tracking branch 'origin/multiline-legend-labels' into mu…
nickofthyme 88ebac5
fix: align to top per marcos comments
nickofthyme bdee07e
fix: labels with long words, now hyphenated
nickofthyme d8be979
refactor: use max line prop instead of multiline boolean, add vrts
nickofthyme 6800bc2
test: update snapshots
nickofthyme 5959a18
test: update vrt screenshots
nickofthyme 575b6da
fix: api changes
nickofthyme 697f73d
fix: test and linting issues
nickofthyme f796ae3
fix: attempted fix of flaky vrt
nickofthyme 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 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 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 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.
In partition chart, not for the legend, we use a
maxRowCount
property, which might be useful here and be a slightly more uniform API. So, a value of 1 would be the default, and it could be whatever number incl. Infinity if unbounded. While it's not integral to the task, it feels useful to set some sensible row count, and with amaxRowCount
there's no need to break the API in the future, or introduce an additional property, which is only applicable with amultiline: true
value. If a row count is deemed useful, we can preemptively cut down on ifs, ternaries and union types 😸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.
Yeah so you are thinking change
multiline
option tomaxRowCount
?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.
Done here d8be979