Repository navigation
Choose a widget's size when adding it - #31
Open
edward-mcnair wants to merge 1 commit into
Open
edward-mcnair wants to merge 1 commit into
edward-mcnair wants to merge 1 commit into
Conversation
The catalog's + added a widget at its default size, so getting any other size meant adding it and then resizing in edit mode or with the Pages tab's column and row controls. + now opens a short list of named sizes the widget supports (Small, Medium, Large, Wide, Tall), each with a map of the current page that shows where it will land and which other widgets are already there. A size with no free space is marked: it is placed overlapping at the top-left and edit mode opens, as a full page did before. A Custom row covers any other width and height the widget allows. The column and row controls in the Pages tab are unchanged. The choices come from WidgetSizeOptions, a pure function of the widget's size range, its default and the page grid, with tests. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
What does this PR do?
The catalog's + added a widget at its default size, so any other size meant adding it and then resizing in edit mode, or using the Pages tab's column and row controls.
+ now opens a short list of named sizes the widget supports: Small, Medium, Large, Wide and Tall.
The column and row controls in the Pages tab are unchanged.
The choices come from
WidgetSizeOptions, a pure function of the widget's range, its default and the page grid. Tests:WidgetSizeOptionsTests(7 cases).Screenshots
(Screenshot of the picker to be attached.)
Checklist
swift-formatlint clean)🤖 Generated with Claude Code