Repository navigation
fix(ui): let a Select's and a DatePicker's Style reach their field's height and type - #721
Merged
Merged
Conversation
…height and type Their Style was documented as merging over the field's, but it only reached the view around the field, which kept a fixed 28 pt height and the body's type. The docs' way to make an Input smaller, a Style with SizeSmall's height and 12 pt type, did nothing for a select, so a select could not line up with a SizeSmall button in a dense row. A picker's Style is now split as an Input takes its own: its height, padding and type go to the field, and the rest lays out the view around it, still 200 pt wide unless it sets a width. Fields keep no Size, which themes.md now says. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
Thanks for your first pull request! Before it is merged:
|
Collaborator
|
Thanks, this looks right. Splitting the picker's The |
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.
Summary
Select.StyleandDatePicker.Styleare documented as "merges over the field's", but they only reached the view around the field. The field kept a fixed 28 pt height and the body's 13 pt type. So the way the docs give for a smallerInput,Style: core.Style{Height: core.Pt(ui.SizeSmall.Height()), FontSize: 12}, did nothing for a select. A select therefore could not line up with aSizeSmallbutton in a dense row, even though "controls line up without an app choosing" is the reason most components have one size (themes).The picker's
Styleis now split the way anInputtakes its own (pickerStyle):SelectandDatePickershare the field (pickerField), so both are fixed. This adds no new API. Fields stay without aSize, asInputhas none, and the change records that rule inthemes.md.The default look is unchanged. A caller that set
Paddingon a select'sStylenow pads the field instead of the view around it. That is what the documentation already said; no caller in this repository sets it.Found in an app's settings: a select sits in a row's 11 pt subtitle line and could not be made smaller than the standard field.
Targets
core,base,ui,tsx, thensgotool)themes.md)Screenshots
None for the default look, which is unchanged. Only a
Stylethat sets a height or type changes the field.TestPickerStylemeasures it on desktop and phone, light and dark:Stylegave 160 × 28 with 13 pt text before;Verification
go tool nsgo checkgo tool nsgo test: 2913 passed. 4 failed, all for Xcode tools this machine lacks, not this change:TestTVBrandAssetsandTestCompileBrandAssets(xcrun actool --versionexits 72),TestStoreKitCompileandTestWidgetsCompile(no iphonesimulator SDK).go tool nsgo test -target <target>: not run on device targets. The change is shareduilayout, and the new test runs ineach's desktop and phone environments.Checklist
CHANGELOG.md'sUnreleasedhas a line.🤖 Generated with Claude Code