Skip to content

after sorting blocks a list within a block no longer sorts #6024

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

Closed
AdelheidF opened this issue Dec 13, 2022 · 7 comments
Closed

after sorting blocks a list within a block no longer sorts #6024

AdelheidF opened this issue Dec 13, 2022 · 7 comments
Assignees
Labels
4 - verified Issues that have been tested, confirmed as mitigated, and are ready to close. ArcGIS Map Viewer Issues logged by ArcGIS Map Viewer 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. p - medium Issue is non core or affecting less that 60% of people using the library research Issues that require more in-depth research or multiple team members to resolve or make decision.

Comments

@AdelheidF
Copy link

Actual Behavior

I have a sortable list of blocks and some of them contain a sortable list. All is well until you re-order the blocks, then the inner list no longer sorts.

Expected Behavior

sorting keeps working

Reproduction Sample

https://codepen.io/afreitag/pen/eYKweaz

Reproduction Steps

  1. sort inner list, Food, Rend... - works
  2. move block B below block C
  3. sorting inner list no longer works

Reproduction Version

beta.98

Relevant Info

No response

Regression?

don't think so

Impact

moderate-high

Esri team

ArcGIS Map Viewer

@AdelheidF AdelheidF added bug Bug reports for broken functionality. Issues should include a reproduction of the bug. 0 - new New issues that need assignment. needs triage Planning workflow - pending design/dev review. labels Dec 13, 2022
@github-actions github-actions bot added the ArcGIS Map Viewer Issues logged by ArcGIS Map Viewer team members. label Dec 13, 2022
@lau11123
Copy link

cc @driskull for when he's back.

@geospatialem is there any status on this? Can a milestone be set please?

@geospatialem
Copy link
Member

@lau11123 Apologies for the lack of communication, we'll be prioritizing issues after this month's release for inclusion in upcoming releases. Will post an update once we're able to assign a milestone in a few weeks.

@lau11123
Copy link

@geospatialem thanks!

@geospatialem geospatialem added the research Issues that require more in-depth research or multiple team members to resolve or make decision. label Feb 27, 2023
@geospatialem
Copy link
Member

Additional research and follow-up needed pertaining to the list component sorting in 2023.

@driskull
Copy link
Member

related to #2489 (comment)

@geospatialem geospatialem added p - medium Issue is non core or affecting less that 60% of people using the library estimate - 3 A day or two of work, likely requires updates to tests. and removed needs triage Planning workflow - pending design/dev review. labels Mar 30, 2023
@geospatialem geospatialem added this to the 2023 May Priorities milestone Mar 30, 2023
driskull added a commit that referenced this issue May 22, 2023
**Related Issue:** #6024

## Summary

The main problem is:

- Sortable components set up a `Sortable` instance on
`connectedCallback` and destroy `Sortable` on `disconnectedCallback`.
- When dragging a `Sortable` component with another `Sortable` component
inside of it, it triggers the child component's
`connectedCallback`/`disconnectedCallback` methods which
initialize/destroy a `Sortable`. This causes JS errors and UI problems.
- When a Sortable instance is being dragged (active), we should prevent
`connectedCallback`/`disconnectedCallback` from doing anything with the
inactive `Sortable` instances. (not destroy them & recreate them).

Solution:

- Create an interface for `SortableComponent` components to follow.
- Make sure the interface does not destroy other nested sortable
instances while dragging.
@driskull driskull added 3 - installed Issues that have been merged to the "dev" branch and/or are ready for QA/QC. and removed 0 - new New issues that need assignment. labels May 22, 2023
@github-actions
Copy link
Contributor

Installed and assigned for verification.

@geospatialem geospatialem added 4 - verified Issues that have been tested, confirmed as mitigated, and are ready to close. and removed 3 - installed Issues that have been merged to the "dev" branch and/or are ready for QA/QC. labels May 22, 2023
@geospatialem
Copy link
Member

Verified on master.

verify-6024

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 tested, confirmed as mitigated, and are ready to close. ArcGIS Map Viewer Issues logged by ArcGIS Map Viewer 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. p - medium Issue is non core or affecting less that 60% of people using the library research Issues that require more in-depth research or multiple team members to resolve or make decision.
Projects
None yet
Development

No branches or pull requests

5 participants