Fix collapsed pre-boot options form on modern macOS - #725
Closed
ElSteverino wants to merge 1 commit into
Closed
Conversation
The grouped Form in SelfSizingGroupedForm was sized by introspecting the backing NSScrollView's documentView height. On recent macOS releases the form is no longer backed by an introspectable NSScrollView, so the measurement never ran and the form collapsed to its minimum height, hiding rows (including the Virtual Machine Settings button) behind a tiny scroll area. Use the native onScrollGeometryChange API to measure content height on macOS 15 and later, keeping the introspection path for macOS 13/14. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Owner
|
@ElSteverino have you managed to reproduce this with a recent build on |
Contributor
Author
|
Confirmed — you're right. My original repro was on the 2.1 release (build 325) on macOS 27.0 beta (26A5388g), which predates the June swiftui-introspect update. I've since built current main (74b4119) and the panel sizes correctly there, and the 2.2 beta from the update channel looks good as well. Closing — sorry for the noise, and thanks for the quick look (and for the @published fix in #727). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
On recent macOS releases (observed on macOS 27.0 beta, 26A5388g), the options panel on a VM window's pre-boot screen collapses to its 100 pt minimum height. Only the first two rows are visible in a tiny scroll area, which hides the remaining rows — including the "Virtual Machine Settings…" button — well enough that it looks like post-install configuration doesn't exist.
Cause
SelfSizingGroupedFormsizes the groupedFormby introspecting the backingNSScrollView'sdocumentViewframe via SwiftUIIntrospect. On modern macOS the grouped form is no longer backed by an introspectableNSScrollView, so the measurement closure never fires,contentHeightstays0, and the frame falls back tominHeight.Fix
Use the native
onScrollGeometryChangeAPI (macOS 15+) to observe the form's scroll content height, keeping the introspection path only for macOS 13/14 (deployment target is 14.0). Same guards and behavior as before, including theVBDisableSelfSizingGroupedFormdefaults escape hatch.Testing
VBDisableSelfSizingGroupedFormstill pins the form tominHeightwhen set.🤖 Generated with Claude Code