Esri / calcite-design-system

A monorepo containing the packages for Esri's Calcite Design System
https://developers.arcgis.com/calcite-design-system/
Other
285 stars 76 forks source link

Sortable list item's action menu don't close correctly after item is reordered #7445

Closed sonofflynn89 closed 9 months ago

sonofflynn89 commented 1 year ago

Check existing issues

Actual Behavior

<calcite-block> items within a <calcite-sortable-list> have a built in actions menu popover. On initial render, the actions menu works fine. Clicking the toggle opens the popover. The popover can be closed by clicking an action, clicking outside, or clicking the toggle again.

https://github.com/Esri/calcite-design-system/assets/30124777/728416da-069c-4a0e-95ad-cd7e73b4acea

However, the moment that a <calcite-block> is reordered, the actions menu breaks. Clicking the toggle still opens the popover, but now the popover will not close after clicking an action or clicking outside. It will only close if the toggle is clicked

https://github.com/Esri/calcite-design-system/assets/30124777/7ba043d6-0de2-4f9c-9319-a568729d024e

Expected Behavior

The actions menu popover should close when an action is clicked or the user clicks outside, just like it did on the initial render.

Reproduction Sample

https://codepen.io/sonofflynn89-the-reactor/pen/qBQvEbj

Reproduction Steps

The code pen has them enumerated

Reproduction Version

1.5.0

Relevant Info

No response

Regression?

No response

Priority impact

p3 - want for upcoming milestone

Impact

While flows are not prohibited, it is jarring to see that after an action is clicked, the menu remains open. Our users could have up to 5 of these popovers stuck open at a time unless they know they know that they need to click the toggle button again.

Calcite package

Esri team

ArcGIS Hub

geospatialem commented 1 year ago

For next steps, Calcite should consider:

cc @jcfranco @SkyeSeitz @ashetland

github-actions[bot] commented 10 months ago

Installed and assigned for verification.

DitwanP commented 9 months ago

Tested locally on main

Results:

https://github.com/Esri/calcite-design-system/assets/60022782/ae2bbbf4-f4da-447e-8b93-9930ec340ca5

driskull commented 9 months ago

Nice catch @DitwanP! thanks for finding this. PR incoming 🚀

github-actions[bot] commented 9 months ago

Installed and assigned for verification.

DitwanP commented 9 months ago

🍰 Verified locally on main

Results:

https://github.com/Esri/calcite-design-system/assets/60022782/f7bb04ba-6498-4482-ad95-2821a03d9bbe