iTwin / appui

Monorepo for iTwin.js AppUi
MIT License
9 stars 2 forks source link

User's widget layout preferences not saved #842

Closed maxime-lavergne closed 6 months ago

maxime-lavergne commented 6 months ago

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

  1. Checkout and run apps/test-viewer from https://github.com/iTwin/viewer-components-react with any model
  2. Drag any widget to another section of any panel. (https://github.com/iTwin/appui/assets/147163568/7ef37697-bee5-4a4c-8579-d76ab6447d13)
  3. Reload the page
  4. 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: image

After the user has moved a widget to another section: image

After reordering widget tabs: image

After reloading: image

Desktop (please complete the applicable information)

Chrome Version 124.0.6367.119 (Official Build) (64-bit)

Additional context

No response

miguelsoares1624 commented 6 months ago

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

GerardasB commented 6 months ago

This is due to https://react.dev/blog/2022/03/29/react-v18#new-strict-mode-behaviors I'll fix the affected hooks.

GerardasB commented 6 months ago

Fixed in https://github.com/iTwin/appui/releases/tag/release%2F4.13.4