mirror of
https://github.com/maputnik/editor.git
synced 2026-09-08 21:37:26 +00:00
1301dc03e7
Deleting a layer changes the starting indices of later groups, so their stored expansion state no longer matches. Preserve that state through surviving layer IDs when rebuilding the group keys. This keeps expanded groups open after deleting an earlier layer or the first layer of a group. Separate groups with the same prefix retain their own states; if deletion joins two groups, the merged group stays expanded when either was expanded. - Fixes #1781. Adds five deletion regression tests, a small style fixture, and a changelog entry. Validation: - All 33 layer-list E2E tests and 50 unit tests pass. - Lint and the production build, including TypeScript checking, pass. - Manually checked OSM Liberty: all 15 groups remain expanded after deleting the background layer. - The full E2E suite reports 160 passing tests and one failure in `modals > open > upload` (`Could not get styleItem from localStorage`). The same failure reproduces with the original production code restored. --------- Co-authored-by: Harel M <harel.mazor@gmail.com>