-
Notifications
You must be signed in to change notification settings - Fork 77
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(combobox): limit display of selected items with new selection-display prop #7912
Merged
Merged
Changes from all commits
Commits
Show all changes
83 commits
Select commit
Hold shift + click to select a range
485f247
feat(combobox): first commit introducing displayMode prop to limit re…
eriklharper f11ed63
Got fit-to-line kinda working. Need to track visibly selected items,…
eriklharper ef2aef9
moving 2 new width measuring functions to dom util
eriklharper fa4ad1c
rendering the correct amount of invisible selected chips
eriklharper f0ad387
Merge branch 'main' of github.com:Esri/calcite-design-system into eri…
eriklharper 313d355
better alpha position
eriklharper cf8b983
refactoring refreshDisplayMode to toggle rendering of indicator chip …
eriklharper f88b258
updating selected indicator chip on resize
eriklharper 2189d0f
creating show and hide chip functions
eriklharper ee45cca
getting show-all display mode to work again
eriklharper b3369d8
displayMode="single" working alongside others
eriklharper ac519e0
functionally complete! Probably could use a refactor to set state in…
eriklharper 2bc08ea
reverting background color on input
eriklharper a04a594
updating demo
eriklharper 8223f8b
disabling chip's close animation from the combobox styles
eriklharper 6962512
refactoring away from inline styles to adding css classes to toggle c…
eriklharper 649f546
adding additional info about rest of displayMode prop options
eriklharper a928301
adding single-persist to doc comment
eriklharper 50bee2e
Merge branch 'main' of github.com:Esri/calcite-design-system into eri…
eriklharper 3580a8f
calling refreshDisplayMode in componentDidLoad
eriklharper 4214b81
setting chip container div to relative positioning
eriklharper edc8445
checking presence of visible and invisible css classes instead of usi…
eriklharper 9f43743
updating stories to add new display modes
eriklharper a01f3c0
handling case when placeholder text isn't supplied by providing a fal…
eriklharper 213f149
DRYing up the chipEls selector results to filter out the indicator ch…
eriklharper 8ed691b
Merge branch 'main' of github.com:Esri/calcite-design-system into eri…
eriklharper 34852e2
Merge branch 'main' of github.com:Esri/calcite-design-system into eri…
eriklharper 9a1ebc0
Merge branch 'main' of github.com:Esri/calcite-design-system into eri…
eriklharper 985f599
refactor to use IntersectionObserver
eriklharper 318dbfc
renaming inputContainer to chipContainer
eriklharper d4489e3
Revert "refactor to use IntersectionObserver"
eriklharper 90de998
fixing display logic for the indicator chip in single, fit-to-line modes
eriklharper 67fab9b
displaying chips in selection order for fit-to-line
eriklharper afd3e58
Merge branch 'main' of github.com:Esri/calcite-design-system into eri…
eriklharper 1440f87
first start to fit-to-line compact mode with an IntersectionObserver …
eriklharper 13f5afe
fine tuning the calculation for available horizontal space by taking …
eriklharper 7a97281
removed IntersectionObserver on textInput, moved indicator chip label…
eriklharper 218c1f3
Only include indicator chip width in calculation if its actually visible
eriklharper c8583b3
Just measure placeholder text in input width calculation
eriklharper e3301c9
wip: this is an attempt to render all the indicator chips so we can s…
eriklharper 61105a0
got the rendering logic working for each indicator chip, but we still…
eriklharper 9530fa9
Merge branch 'main' of github.com:Esri/calcite-design-system into eri…
eriklharper a9e772c
got rid of the flashing!
eriklharper bd50d39
removing some unused refs, fixing display logic for selected indicato…
eriklharper 0c54dbd
moving all the spacing vars we need for single out of the fit-to-line…
eriklharper fd8c118
getting single display mode working right for both compact and non-co…
eriklharper 9d3d331
fixing chip display for when no items are selected
eriklharper 4239a18
placeholder ellipses!
eriklharper b4829ae
Merge branch 'main' of github.com:Esri/calcite-design-system into eri…
eriklharper a31492b
removing unused branch
eriklharper 21b0b97
applying ellipses with tailwind
eriklharper b7706da
applying text-ellipsis to input and alpha sorting tailwind apply rules
eriklharper c89286a
adding all new display mode variants to a single story for chromatic …
eriklharper b7a4fdb
Merge branch 'eriklharper/4326-combobox-display-mode' of github.com:E…
eriklharper e5487d4
Merge branch 'main' into eriklharper/4326-combobox-display-mode
eriklharper 7c223e0
renaming simple story to single
eriklharper 6bf7420
syncing messages_en
eriklharper 6ef3b32
moving DisplayMode type to interfaces file
eriklharper 4da1c7d
reflecting display-mode
eriklharper 4752caa
privatizing resizeObserver
eriklharper 10122ca
alpha sorting private props/state
eriklharper 2eeeab3
moving 2 private vars to private section
eriklharper cb13ecc
removing unnecessary var assignment
eriklharper cca51b7
using pre-declared variables where necessary
eriklharper 04edfc3
using property access for closable instead of attribute
eriklharper 44de454
removing allselected messages fallback
eriklharper 7f99abb
adding translation string message for selected
eriklharper ff6d6f2
returning 0 when no element is referenced in both width util funcs
eriklharper 99df189
simplifying getElementWidth logic
eriklharper 300475e
removing rounding for getTextWidth result
eriklharper 22a42e8
converting isAllSelected to a class function
eriklharper ec03bc7
extracting a few long lines of logic from refreshDisplayMode into the…
eriklharper 2d20e4e
refactoring refreshChipDisplay to return early
eriklharper fbacc27
grouping related render calls
eriklharper a3d69c5
using coresizing15 design token for the min input width
eriklharper f078692
fixing the spacing between placeholder-icon and text input based on t…
eriklharper f7b0a2f
renaming fit-to-line to auto
eriklharper 13ba52b
renaming show-all to all
eriklharper 56b5946
Merge branch 'main' into eriklharper/4326-combobox-display-mode
eriklharper dcc00fc
renaming display-mode to selection-display and "auto" to "fit"
eriklharper 2e87912
Merge branch 'main' into eriklharper/4326-combobox-display-mode
eriklharper 7f511ab
updating prop docs per kitty's update [skip-ci]
eriklharper f654003
Merge branch 'main' into eriklharper/4326-combobox-display-mode
eriklharper 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
5 changes: 4 additions & 1 deletion
5
packages/calcite-components/src/components/combobox/assets/combobox/t9n/messages.json
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,7 @@ | ||
{ | ||
"all": "All", | ||
eriklharper marked this conversation as resolved.
Show resolved
Hide resolved
|
||
"allSelected": "All selected", | ||
"clear": "Clear value", | ||
"removeTag": "Remove tag" | ||
"removeTag": "Remove tag", | ||
"selected": "selected" | ||
} |
5 changes: 4 additions & 1 deletion
5
packages/calcite-components/src/components/combobox/assets/combobox/t9n/messages_en.json
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,7 @@ | ||
{ | ||
"all": "All", | ||
"allSelected": "All selected", | ||
"clear": "Clear value", | ||
"removeTag": "Remove tag" | ||
"removeTag": "Remove tag", | ||
"selected": "selected" | ||
} |
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.
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.
Sidebar: @anveshmekala These look like candidates for the common bundle.