docs: ButtonBase migration (extension)#1093
Conversation
📖 Storybook Preview |
f3bdfb6 to
95fcbb5
Compare
📖 Storybook Preview |
georgewrmarshall
left a comment
There was a problem hiding this comment.
Compared the new ButtonBase migration docs against the extension button-base API and the current MMDS ButtonBase implementation. I left a few doc-accuracy comments where the migration guide currently overstates or misstates the actual API differences.
📖 Storybook Preview |
📖 Storybook Preview |
georgewrmarshall
left a comment
There was a problem hiding this comment.
non-blocking: In the ellipsis migration row, could we call out textProps={{ ellipsis: true }} explicitly for string children? MMDS ButtonBase already forwards textProps to the inner Text wrapper, so that reads closer to the legacy behavior than className="truncate". For non-string children, a custom truncating wrapper still makes sense.
fd69c0a to
a15078d
Compare
📖 Storybook Preview |
📖 Storybook Preview |
georgewrmarshall
left a comment
There was a problem hiding this comment.
Nice work. I re-checked the current migration docs against the extension button-base API and the MMDS ButtonBase implementation, and the earlier doc-accuracy issues look addressed in this revision.
📖 Storybook Preview |
<!-- Please submit this PR as a draft initially. Do not mark it as "Ready for review" until the template has been completely filled out, and PR status checks have passed at least once. --> ## **Description** <!-- Write a short description of the changes included in this pull request, also include relevant motivation and context. Have in mind the following questions: 1. What is the reason for the change? 2. What is the improvement/solution? --> Added migration for `ButtonBase` (extension part). ## **Related issues** Fixes: https://consensyssoftware.atlassian.net/browse/DSYS-637 ## **Manual testing steps** 1. Open `MIGRATION.MD` file 2. Check that `ButtonBase` migration is in place ## **Screenshots/Recordings** <!-- If applicable, add screenshots and/or recordings to visualize the before and after of your change. --> ### **Before** N/A ### **After** <img width="1057" height="1028" alt="image" src="https://github.com/user-attachments/assets/6fdd31e9-f56a-4c21-8fb3-f8493adfe360" /> ## **Pre-merge author checklist** - [x] I've followed [MetaMask Contributor Docs](https://github.com/MetaMask/contributor-docs) - [x] I've completed the PR template to the best of my ability - [x] I’ve included tests if applicable - [x] I’ve documented my code using [JSDoc](https://jsdoc.app/) format if applicable - [x] I’ve applied the right labels on the PR (see [labeling guidelines](https://github.com/MetaMask/metamask-extension/blob/develop/.github/guidelines/LABELING_GUIDELINES.md)). Not required for external contributors. ## **Pre-merge reviewer checklist** - [ ] I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed). - [ ] I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots. <!-- CURSOR_SUMMARY --> --- > [!NOTE] > **Low Risk** > Low risk because this PR only updates documentation (migration guide + README link) and does not change runtime code or component behavior. > > **Overview** > Adds a new **`ButtonBase` migration section** to `MIGRATION.md`, documenting extension-to-design-system prop/behavior differences (e.g., `as`/`href` removal in favor of `asChild`, renamed state props, removed style-utility props, and default `size` change), plus before/after examples. > > Updates the `ButtonBase` docs (`README.mdx`) to link directly to the new migration guide section. > > <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit 72eafec. Bugbot is set up for automated code reviews on this repo. Configure [here](https://www.cursor.com/dashboard/bugbot).</sup> <!-- /CURSOR_SUMMARY -->
<!-- Please submit this PR as a draft initially. Do not mark it as "Ready for review" until the template has been completely filled out, and PR status checks have passed at least once. --> ## **Description** <!-- Write a short description of the changes included in this pull request, also include relevant motivation and context. Have in mind the following questions: 1. What is the reason for the change? 2. What is the improvement/solution? --> Added migration for `ButtonBase` (extension part). ## **Related issues** Fixes: https://consensyssoftware.atlassian.net/browse/DSYS-637 ## **Manual testing steps** 1. Open `MIGRATION.MD` file 2. Check that `ButtonBase` migration is in place ## **Screenshots/Recordings** <!-- If applicable, add screenshots and/or recordings to visualize the before and after of your change. --> ### **Before** N/A ### **After** <img width="1057" height="1028" alt="image" src="https://github.com/user-attachments/assets/6fdd31e9-f56a-4c21-8fb3-f8493adfe360" /> ## **Pre-merge author checklist** - [x] I've followed [MetaMask Contributor Docs](https://github.com/MetaMask/contributor-docs) - [x] I've completed the PR template to the best of my ability - [x] I’ve included tests if applicable - [x] I’ve documented my code using [JSDoc](https://jsdoc.app/) format if applicable - [x] I’ve applied the right labels on the PR (see [labeling guidelines](https://github.com/MetaMask/metamask-extension/blob/develop/.github/guidelines/LABELING_GUIDELINES.md)). Not required for external contributors. ## **Pre-merge reviewer checklist** - [ ] I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed). - [ ] I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots. <!-- CURSOR_SUMMARY --> --- > [!NOTE] > **Low Risk** > Low risk because this PR only updates documentation (migration guide + README link) and does not change runtime code or component behavior. > > **Overview** > Adds a new **`ButtonBase` migration section** to `MIGRATION.md`, documenting extension-to-design-system prop/behavior differences (e.g., `as`/`href` removal in favor of `asChild`, renamed state props, removed style-utility props, and default `size` change), plus before/after examples. > > Updates the `ButtonBase` docs (`README.mdx`) to link directly to the new migration guide section. > > <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit 72eafec. Bugbot is set up for automated code reviews on this repo. Configure [here](https://www.cursor.com/dashboard/bugbot).</sup> <!-- /CURSOR_SUMMARY -->
Description
Added migration for
ButtonBase(extension part).Related issues
Fixes: https://consensyssoftware.atlassian.net/browse/DSYS-637
Manual testing steps
MIGRATION.MDfileButtonBasemigration is in placeScreenshots/Recordings
Before
N/A
After
Pre-merge author checklist
Pre-merge reviewer checklist
Note
Low Risk
Docs-only changes (migration guidance and cross-links) with no runtime or API behavior impact.
Overview
Adds a new
ButtonBasemigration section toMIGRATION.md, documenting breaking API differences when moving from the Extension component-library (renamed state props, default size change, removal ofas/hrefpolymorphism in favor ofasChild, and removed Box/style-utility props), plus before/after code examples.Updates the
ButtonBasecomponent docs (README.mdx) to link directly to this migration guide section for easier discoverability.Reviewed by Cursor Bugbot for commit 8c9dd83. Bugbot is set up for automated code reviews on this repo. Configure here.