iTwin / appui

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

AutoHideUI and collapse panels toggle sometimes don't work #927

Closed BeAliAslam closed 1 month ago

BeAliAslam commented 1 month ago

Describe the bug

While testing user setting options for auto hide toolbars and collapse panels, it came to notice that the toggle fails to update the UI sometimes. This is not reproducible each time but within 2-3 attempts of toggling, the issue is reproducible.

To Reproduce

Toggle autohide ui and collapse panels via

Expected Behavior

Toolbars should appear and stay on screen if autoHideUi is false Unpinned panels should remain visible if collapsePanels was called with false

Screenshots

No response

Desktop (please complete the applicable information)

Windows 11, Chrome, iTwinUI 4.15.1, iTwinJS 4.7.4

Additional context

The problem does not occur if we have debugging being done, only happens if no breakpoints exist so seems like a timing/sync issue.

GerardasB commented 1 month ago

929 should fix the autoHideUi toggle issue.

I don't consider panel behavior an issue unless we'd want to differentiate between auto and explicit collapse modes. Similarly, depending on the use-case, we might need to update auto-hide logic as well, since UiFramework.visibility.isUiVisible is used by autoHideUi and can be called by consumers explicitly.