Skip to content

Conversation

@stackotter
Copy link
Owner

@stackotter stackotter commented Dec 11, 2025

I'll fill out this description once the PR is more complete. I'm just creating the PR now as a place to dump reminders for myself.

Todo

  • Test Gtk 3 window sizing issues mentioned in huge comment in previous WindowGroupNode implementation
  • Move all views and modifiers back after ensuring things work with the current limited set of views
  • Look into ways to improve minimum window sizing behaviour (to match the previous implementation as much as possible). The SwiftUI way is not satisfactory in my opinion.
  • Uncomment the hot reloading macro declarations
  • Update benchmark test case visualiser to correctly set frame of app to requested size proposal
  • Update roundSize implementation to print a warning when given an infinite size (once I've updated AppBackend's APIs such that we don't have any legitimate use for passing an infinite size to an integer-accepting backend method; e.g. the method to get the size of text makes sense to pass infinity to, but it should take a double vector not an integer one).
  • Uncomment NSViewRepresentable implementation and fix it
  • Update text to clip by default so that minimum window sizing at least seems sensible :) (that's what SwiftUI relies on)
  • Avoid sorting stack children by flexibility when there's only one child.
  • When asked for the maximum width of a vstack (or maximum height of a hstack) stop once a child has infinite width (or height for an hstack), to save computation.
  • Detect 'simple' ScrollView size proposals such as 0x0 that don't require querying the child view.

…mance)

Some of the bad behaviour from SwiftUI's layout system can probably be
mitigated, but other undesirable behaviour is probably the best we can
do, cause some things are impossible to compute nicely without laying
out child views more than once (a no go for performant layout)
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