Repository navigation
docs(migration): fix the Switch, IconButton, TextInput and Dialog notes - #5306
Merged
Merged
Conversation
Corrects four places in the 6.x migration guide: - Focus indicator: a Switch without onValueChange is read-only and isn't a keyboard stop. A Drawer.CollapsedItem without onPress still is. - IconButton: filled and tonal draw primary and secondaryContainer at rest, where 5.x drew surfaceVariant until selected. The guide shows how to keep the 5.x look with containerColor and iconColor. - TextInput: the iconSize sample passes the accessory props, so it type checks. - Dialog: a dialog without content keeps the content area's 24dp bottom padding. The guide gives the contentProps workaround. Part of #4991
A selected tonal button draws secondary instead of secondaryContainer, so a 5.x tonal toggle that is off now looks like one that was on. The outlined outline uses outlineVariant instead of outline, also when disabled. Part of #4991
|
Found potential problems with the pull request:
|
Apex Sentinel · ✅ Approve · review of
|
| Command | What it does |
|---|---|
@apex-sentinel-staging note <context> |
Adds context; Sentinel re-checks the cited code |
@apex-sentinel-staging pivot <why> |
Says the finding is wrong; Sentinel re-checks the cited code |
@apex-sentinel-staging like |
Marks the finding as useful |
@apex-sentinel-staging dislike <why> |
Marks it as not useful, so it is not raised again |
On this conversation, comment @apex-sentinel-staging review to run a full review once again.
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.
Motivation
Four places in the 6.x migration guide were wrong or silent:
Switchwithout a handler is a keyboard stop. Since fix(switch)!: residual MD3 deviations in switch #5222 it is read-only, so the line now links to that section.filledandtonaldraw at rest the colors 5.x used only when selected, that a selectedtonalbutton drawssecondary, or thatoutlinedusesoutlineVariant.TextInput.IconiconSizesample didn't type check (TS2739).titleandactionsbut nocontenthas 40dp between them (16dp in 5.x). The guide now gives acontentPropsworkaround.Related issue
Part of #4991
Screenshots / Videos
None: docs only.
Test plan
Run
yarn docs dev, open the 6.x migration guide and read Focus indicator (its link goes to Switches withoutonValueChange), IconButton (Mode names,selected={false}), TextInput (Icon size) and Dialog (Prop-based API).