User's widget layout preferences not saved
Closed this issue · 3 comments
Describe the bug
Expected behavior
Users have the ability to move widgets around to redefined their UI layout as they want. When a user leaves the viewer, he's expecting that his layout will be saved throughout his sessions with the viewer.
Current behavior
The user's layout isn't saved properly.
To Reproduce
- Checkout and run apps/test-viewer from https://github.com/iTwin/viewer-components-react with any model
- Drag any widget to another section of any panel. (https://github.com/iTwin/appui/assets/147163568/7ef37697-bee5-4a4c-8579-d76ab6447d13)
- Reload the page
- Notice the widget layout is reset
** 2.5 - Reorder widgets within the same section. (https://github.com/iTwin/appui/assets/147163568/327a1b09-2036-41b2-8c3a-761b081a64e9)
Expected Behavior
Dragging any widget to another section or reordering widgets tabs should be preserved throughout users' sessions.
Screenshots
Initial load local storage key:
After the user has moved a widget to another section:
Desktop (please complete the applicable information)
Chrome Version 124.0.6367.119 (Official Build) (64-bit)
Additional context
No response
Just to add that this was working fine in previous versions, users are already using this functionality and this will be now a big regression to them (issue with migration to itwinv4). Please consider this as important
This is due to https://react.dev/blog/2022/03/29/react-v18#new-strict-mode-behaviors
I'll fix the affected hooks.