kkebo / DevToys.swiftpm

DevToys for iPad (WIP)
MIT License
38 stars 5 forks source link

Need to click the back button twice to show the sidebar when opening a new window whose horizontal size class is `.compact` #23

Closed kkebo closed 2 years ago

kkebo commented 2 years ago

Steps to reproduce

  1. Open DevToys for iPad
  2. Right-click the sidebar item
  3. Click "Open in New Window" on the context menu
  4. Click the back button on the top left corner of the new window

Expected behaviors

The sidebar will open.

Actual behaviors

The first click does nothing, and the second click opens the sidebar.

Video

https://user-images.githubusercontent.com/601636/167292188-d5078213-858f-47a0-b416-b09920fcf883.MOV

iPad Pro 12.9" 5th generation with Magic Keyboard (iPadOS 15.5 DB 4)

kkebo commented 2 years ago

At the time of the first click, the sidebar may not have been generated yet. If so, then NavigationLinks yet to exist at that point either. Then, when NavigationLinks are generated, the screen transition is executed and the sidebar is closed, which is probably why this behavior is observed.

kkebo commented 2 years ago

I confirmed that the new NavigationSplitView resolved this issue, so it can be closed by #32.