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

List drag menu 'Move to' actions broken when list elements have explicit ids #11513

Closed
2 of 6 tasks
timmorey opened this issue Feb 11, 2025 · 2 comments
Closed
2 of 6 tasks
Assignees
Labels
4 - verified Issues that have been released and confirmed resolved. ArcGIS Field Apps Issues logged by ArcGIS Field Apps team members. bug Bug reports for broken functionality. Issues should include a reproduction of the bug. estimate - 3 A day or two of work, likely requires updates to tests. impact - p2 - want for an upcoming milestone User set priority impact status of p2 - want for an upcoming milestone p - high Issue should be addressed in the current milestone, impacts component or core functionality

Comments

@timmorey
Copy link
Contributor

timmorey commented Feb 11, 2025

Check existing issues

Actual Behavior

When three or more lists are configured to allow dragging between each other, and the <calcite-list> elements are given explicit id attributes, the drag menu actions work inconsistently. They will succeed in moving items to another list, but not always the list you want to move it to.

We initially encountered this in a nested list scenarios, but nesting is not required. I modified one of the documentation samples to come up with a repro case (see below). In it, each <calcite-list> element has an explicit id attribute, and they are unique within the document. If I remove these explicit ids, the drag menus work correctly.

Expected Behavior

Developers should be able to add id attributes to elements at their discretion, without affecting internal calcite functionality.

Reproduction Sample

https://codepen.io/_timmorey_/pen/myddmWO?editors=1000

Reproduction Steps

  1. click the drag menu for the first item in the first list (Narnia), and in the drag menu, choose "Other places"
    • Notice the item moves to the second list, not the third list you requested
  2. click the drag menu for the last item in the last list (Townville), and in the drag menu, choose "Visited places"
    • Notice the item again moves tot the second list, not the first list you requested

Reproduction Version

3.0.0

Relevant Info

No response

Regression?

No response

Priority impact

impact - p2 - want for an upcoming milestone

Impact

We have worked around this problem by removing our explicit id attributes and finding other ways to identify the elements.

Calcite package

  • @esri/calcite-components
  • @esri/calcite-components-react
  • @esri/calcite-design-tokens
  • @esri/calcite-ui-icons
  • @esri/eslint-plugin-calcite-components

Esri team

ArcGIS Field Apps

@timmorey timmorey added 0 - new New issues that need assignment. bug Bug reports for broken functionality. Issues should include a reproduction of the bug. needs triage Planning workflow - pending design/dev review. labels Feb 11, 2025
@github-actions github-actions bot added ArcGIS Field Apps Issues logged by ArcGIS Field Apps team members. impact - p2 - want for an upcoming milestone User set priority impact status of p2 - want for an upcoming milestone labels Feb 11, 2025
@geospatialem geospatialem added p - high Issue should be addressed in the current milestone, impacts component or core functionality 1 - assigned Issues that are assigned to a sprint and a team member. estimate - 3 A day or two of work, likely requires updates to tests. and removed 0 - new New issues that need assignment. needs triage Planning workflow - pending design/dev review. labels Feb 11, 2025
driskull added a commit that referenced this issue Feb 12, 2025
…elements have explicit ids (#11515)

**Related Issue:** #11513

## Summary

- Fix keyboard moving `MoveTo` object to always have unique identifiers
- Previously, it was using the incorrect id
- There's no reason to use the element id so just using a guid makes
more sense here
- Add tests
@driskull driskull added 3 - installed Issues that have been merged to master branch and are ready for final confirmation. and removed 1 - assigned Issues that are assigned to a sprint and a team member. labels Feb 12, 2025
Copy link
Contributor

Installed and assigned for verification.

@github-actions github-actions bot assigned geospatialem and DitwanP and unassigned driskull Feb 12, 2025
@DitwanP
Copy link
Contributor

DitwanP commented Feb 13, 2025

🍡 Verified on 3.0.0-next.3
https://codepen.io/Ditwan-Price/pen/ogNgPBd?editors=1000

@DitwanP DitwanP closed this as completed Feb 13, 2025
@DitwanP DitwanP added 4 - verified Issues that have been released and confirmed resolved. and removed 3 - installed Issues that have been merged to master branch and are ready for final confirmation. labels Feb 13, 2025
benelan pushed a commit that referenced this issue Feb 14, 2025
…elements have explicit ids (#11515)

**Related Issue:** #11513

## Summary

- Fix keyboard moving `MoveTo` object to always have unique identifiers
- Previously, it was using the incorrect id
- There's no reason to use the element id so just using a guid makes
more sense here
- Add tests
benelan pushed a commit that referenced this issue Feb 14, 2025
…elements have explicit ids (#11515)

**Related Issue:** #11513

## Summary

- Fix keyboard moving `MoveTo` object to always have unique identifiers
- Previously, it was using the incorrect id
- There's no reason to use the element id so just using a guid makes
more sense here
- Add tests
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
4 - verified Issues that have been released and confirmed resolved. ArcGIS Field Apps Issues logged by ArcGIS Field Apps team members. bug Bug reports for broken functionality. Issues should include a reproduction of the bug. estimate - 3 A day or two of work, likely requires updates to tests. impact - p2 - want for an upcoming milestone User set priority impact status of p2 - want for an upcoming milestone p - high Issue should be addressed in the current milestone, impacts component or core functionality
Projects
None yet
Development

No branches or pull requests

4 participants