Skip to content

Conversation

@bbrk24
Copy link
Contributor

@bbrk24 bbrk24 commented Oct 20, 2025

Draft until I can test that I didn't break it on iPad

@bbrk24 bbrk24 marked this pull request as ready for review October 22, 2025 23:26
Copy link
Collaborator

@stackotter stackotter left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for looking into this. When testing out your changes locally I managed to make the app freeze in a resize handling update loop indefinitely by resizing the app a bunch and getting unlucky. I reproduced that behaviour a few times and couldn't on main so I think there may be some sort of feedback loop in your current layoutSubviews-based approach. I'm not exactly sure what the solution is to that.

I also noticed that the splits get allocated rather strange sizes (especially when you switch to the three column example), but I get the same behaviour on main so that doesn't necessarily need to be fixed in this PR.

@stackotter
Copy link
Collaborator

It seems like split views under Mac Catalyst still have issues with sizing the panes after certain types of view updates. That said, I'm happy to merge in this PR as is because it does fix resize handling under Mac Catalyst and doesn't make anything worse. If I did so I'd just rename it to make the purpose of the PR more clear.

Let me know if you'd like to tackle the initial sizing issues in this PR or if I should merge and open an issue for that to be tackled in the future.

Here are the pre-existing sizing issues I'm talking about;

Open the app (odd sizing, but not invalid):
Screenshot 2025-11-28 at 2 48 47 pm

Switch to 3 columns (first column overflows):
Screenshot 2025-11-28 at 2 48 58 pm

Select science (first and second columns overflow):
Screenshot 2025-11-28 at 2 49 09 pm

Switch to 2 columns (both columns overflow/overlap):
Screenshot 2025-11-28 at 2 49 17 pm

Prevent resizeHandler() from being called twice in one pass
@bbrk24 bbrk24 force-pushed the catalyst-splitview branch from bcee7e0 to 28efb86 Compare January 11, 2026 23:35
@bbrk24
Copy link
Contributor Author

bbrk24 commented Jan 11, 2026

Open the app (odd sizing, but not invalid):

I can no longer reproduce this after rebase:
Screenshot 2026-01-11 at 6 36 16 PM

However, the button is pushed off the bottom of the screen, and I'm not sure whether that's a bug with the new layout system. If I fullscreen the window, the button becomes visible, but clicking it still doesn't do anything.

@stackotter
Copy link
Collaborator

Interesting, I’ll try reproducing it myself as well (once I’m at my laptop).

@stackotter
Copy link
Collaborator

stackotter commented Jan 12, 2026

Huh yeah this is really weird. It looks ok now but I can't click the sidebar buttons or the bottom button. And when I resize the split to the right, the trailing split's content moves to the left and overlaps the sidebar 😅 I don't think that that was introduced by your PR though

@stackotter
Copy link
Collaborator

Feels like maybe a missing translatesAutoresizingMaskIntoConstraints somewhere given that the trailing content isn't centered? And maybe an inverted coordinate?

The button going off the bottom of the screen leads me to believe that UIKitBackend is including the title bar when giving us the size of the window.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants