fix: New Machine pop-ups line up at their own widths
Summary
The New Machine sheet's pop-ups stopped lining up: Base hugged the sheet's trailing edge (#17417's .frame(maxWidth: .infinity, alignment: .trailing)), and Size stretched across the whole column (#17392 made it flexible). Network kept its own width, so the three rows no longer form a column.
Base and Size now go through a small OwnWidthWithinProposalLayout:
- Each pop-up takes its own width on the column's leading edge, like Network.
- It narrows, truncating its title, only when a long machine name or a locked size row would overflow the sheet. That keeps #17392's protection against overflow.
- It passes the pop-up's baselines through, so the grid's first-baseline rows still line the title up with the row label.
This is the follow-up to #17422. These commits were pushed to that branch after it had already merged.
Testing
- Red, then green:
NewMachineSheetLayoutTests.popUpsShareLeadingEdgeAtNaturalWidthrequires Base and Size to share a leading edge, each no wider than its own size. Red commitab3d96c9ae7, green commit64bca50de95. Hosted CI runs it. - The existing
longBaseMachineNamesStayInsideSheettest still guards overflow with long names. - The new layout type-checks with
swiftc -typecheck -swift-version 6. - Not done yet: no dogfood on a tagged build.
Changelog
- Fixed: the New Machine sheet's Base, Size, and Network pop-ups line up again at their own widths.
Impact map
Sources/Cloud/NewMachineSheet.swiftonly:baseImageMenuandfittedSizeMenu, used by every layout variant.
🤖 Generated with Claude Code
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.
Summary by cubic
Fixes the New Machine sheet's Base and Size pop-ups so all three pop-ups (Base, Size, Network) line up on the column's leading edge at their own widths. Base previously hugged the trailing edge and Size stretched across the column. Both now narrow with a truncated title only when a long machine name or locked size row would overflow the sheet, keeping the previous overflow protection.
- Adds a regression test asserting Base and Size share the leading edge and stay at their intrinsic widths.