Repository navigation
docs(migration): explain IconButton's footprint when moving to iconSize - #5278
Merged
Merged
Conversation
In v5 an IconButton was its icon plus 8dp on each side, so a numeric size also set the button's size. In v6 the container follows the named size, so moving the number to iconSize can grow or shrink the button. Say so in the guide, and show a smaller button and one that takes the same space as before. Refs: #5103
|
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.
Doberjohn
pushed a commit
that referenced
this pull request
Nov 23, 2026
…ze (#5278) In 5.x an `IconButton` was its icon plus 8dp on each side, so a numeric `size` also set the button's size (36dp for `size={20}`, 48dp for `size={32}`). #5103 made `size` a named container scale, and the guide maps the old number to `iconSize`. That keeps the glyph but puts it in the named size's container, 40dp by default, so a migrated button can grow or shrink. The IconButton Size section now says so, and shows a smaller button (`size="extra-small"`, 32dp) and one that takes the same space as before (a 4dp margin). Nothing changes in the code. Part of #4991.
Doberjohn
added a commit
that referenced
this pull request
Nov 23, 2026
This reverts commit 343f2cf. That commit is #5264, "refactor(button): share the shape morph between Button and IconButton". It was merged by mistake, and its squash message took the title and body meant for #5278, a docs change that is still open: the commit changes no docs. The refactor waits until after 6.0.0-alpha.4, so the release matches the code it was tested on. It will come back in a new pull request with its own title.
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
In v5 an
IconButtonwas its icon plus 8dp on each side, so a numericsizealso set the button's size. The guide mapssize={32}toiconSize={32}, but in v6 the container follows the namedsize(40dp by default), so a migrated button can grow or shrink without warning. Migrating an open-source app, its 36dp header buttons became 40dp and the header clipped one. This adds the footprint change to the Size section, with a smaller button and one that takes the same space as before.Related issue
None. Follows #5103.
Screenshots / Videos
None, docs only.
Test plan
Run
yarn --cwd docs build, open Guides, Migration, then IconButton, Size, and check that the new paragraph and sample render after the first example.