Skip to content

docs(migration): explain IconButton's footprint when moving to iconSize - #5278

Merged
Doberjohn merged 1 commit into
mainfrom
@Doberjohn/iconbutton-footprint-guide
Nov 23, 2026
Merged

Doberjohn merged 1 commit into
mainfrom
@Doberjohn/iconbutton-footprint-guide

Conversation

@Doberjohn

Copy link
Copy Markdown
Collaborator

Motivation

In v5 an IconButton was its icon plus 8dp on each side, so a numeric size also set the button's size. The guide maps size={32} to iconSize={32}, but in v6 the container follows the named size (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.

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
@github-actions

Copy link
Copy Markdown

Found potential problems with the pull request:

  • Screenshot or video evidence is missing. Make sure to include one if it affects the UI.

@apex-sentinel-staging

Copy link
Copy Markdown

Apex Sentinel · ✅ Approve · review of 9458cb9

No open findings.

Not in the reviewers' prompt (1 file)
  • docs/6.x/docs/guides/migration.md: no reviewer was selected for this change

Reviewed with this repository's own Sentinel configuration (9029fbcd5df0).

💬 Talking to Sentinel

In a finding's thread, reply with:

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.
@Doberjohn
Doberjohn merged commit 75feef6 into main Nov 23, 2026
14 checks passed
@Doberjohn
Doberjohn deleted the @Doberjohn/iconbutton-footprint-guide branch November 23, 2026 13:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant