-
Notifications
You must be signed in to change notification settings - Fork 78
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
[List and List Item] Provide list item sorting #6554
Comments
Before we can tackle this, we should discuss whether we should be using the SortableList component internally here or getting rid of that component. |
Good idea - added to the upcoming engineering discussion to discuss options. |
We need a whole sorting strategy before we can tackle this. The strategy should cover...
|
Adding a tag to this issue to Hub components and cc @vivzhang in regards to the issue description above:
|
Adding two pieces of feedback we got about Value List for consideration here w/r/t keyboard usage from this closed issue: #4231
|
@geospatialem @jcfranco we may need to make this one a breaking change. I'm running into trouble with sorting of children because we slot a <calcite-list>
<calcite-list-item>
<calcite-list-item></ calcite-list-item>
</calcite-list-item>
</calcite-list> In order to fix this, we may need to require the following: <calcite-list>
<calcite-list-item>
<calcite-list>
<calcite-list-item></ calcite-list-item>
</calcite-list>
</calcite-list-item>
</calcite-list> Let me know if you'd like to meet to discuss this. If we do this breaking change, this milestone may need to change. |
@driskull Thanks for the heads up on a potential breaking change, lets connect sometime next week. I'll set a reminder for us to chat on next steps. |
Documentation update to follow the change is needed to showcase what devs will need to achieve sorting, which differs from the current workflow. |
**Related Issue:** #6554 ## Summary - SortableComponent - Moves all configuration options into the interface so a component can consistently setup SortableJS. - Changes usage of `onUpdate` to `onSort` for moving between lists and getting `calciteListOrderChange` event. - Adds support for `canPut`/`canPull` so users can configure whether an item can be dragged to another list and vice versa. - List - Sets up sorting - keyboard sorting only works within a list. Cannot keyboard sort across lists at this time (including nested lists). - Adds dragHandle rendering to `list-item` - ListItemGroup and List emit an internal event when its default slot changes in order to update whether an expand caret shows or not. - Handle - Updates handle to support displaying ariaLabel (logic taken from value-list) - Handle will emit an internal event for parent components to update an aria-live region. - No breaking changes necessary. We can advise users to nest another `calcite-list` to work with sorting on children. - `calcite-list-item-group` will not be draggable/sortable at this time.
Installed and assigned for verification. |
Verified with https://codepen.io/geospatialem/pen/bGQzavG in |
**Related Issue:** #6554 ## Summary - SortableComponent - Moves all configuration options into the interface so a component can consistently setup SortableJS. - Changes usage of `onUpdate` to `onSort` for moving between lists and getting `calciteListOrderChange` event. - Adds support for `canPut`/`canPull` so users can configure whether an item can be dragged to another list and vice versa. - List - Sets up sorting - keyboard sorting only works within a list. Cannot keyboard sort across lists at this time (including nested lists). - Adds dragHandle rendering to `list-item` - ListItemGroup and List emit an internal event when its default slot changes in order to update whether an expand caret shows or not. - Handle - Updates handle to support displaying ariaLabel (logic taken from value-list) - Handle will emit an internal event for parent components to update an aria-live region. - No breaking changes necessary. We can advise users to nest another `calcite-list` to work with sorting on children. - `calcite-list-item-group` will not be draggable/sortable at this time.
Description
Add full parity to the
list
component, which is provided in thevalue-list
andpick-list
components.May also include a refactor of the
sortable
utility, which some teams use for their own use and should be consulted if a breaking change is necessary.Acceptance Criteria
list-item
sRelevant Info
Part of the #6430 epic
Which Component
Example Use Case
Depicted with
value-list
andvalue-list-item
:https://codepen.io/geospatialem/pen/abjxWwL
Esri team
Calcite (dev)
The text was updated successfully, but these errors were encountered: