Skip to content

docs: ButtonBase migration (extension)#1093

Merged
kirillzyusko merged 3 commits into
mainfrom
feat/button-base-extension-docs
Apr 28, 2026
Merged

docs: ButtonBase migration (extension)#1093
kirillzyusko merged 3 commits into
mainfrom
feat/button-base-extension-docs

Conversation

@kirillzyusko
Copy link
Copy Markdown
Collaborator

@kirillzyusko kirillzyusko commented Apr 20, 2026

Description

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

Before

N/A

After

image

Pre-merge author checklist

  • I've followed MetaMask Contributor Docs
  • I've completed the PR template to the best of my ability
  • I’ve included tests if applicable
  • I’ve documented my code using JSDoc format if applicable
  • I’ve applied the right labels on the PR (see labeling guidelines). 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.

Note

Low Risk
Docs-only changes (migration guidance and cross-links) with no runtime or API behavior impact.

Overview
Adds a new ButtonBase migration section to MIGRATION.md, documenting breaking API differences when moving from the Extension component-library (renamed state props, default size change, removal of as/href polymorphism in favor of asChild, and removed Box/style-utility props), plus before/after code examples.

Updates the ButtonBase component 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.

@kirillzyusko kirillzyusko self-assigned this Apr 20, 2026
@kirillzyusko kirillzyusko added the documentation Improvements or additions to documentation label Apr 20, 2026
@github-actions
Copy link
Copy Markdown
Contributor

📖 Storybook Preview

@kirillzyusko kirillzyusko force-pushed the feat/button-base-extension-docs branch from f3bdfb6 to 95fcbb5 Compare April 21, 2026 08:08
@github-actions
Copy link
Copy Markdown
Contributor

📖 Storybook Preview

@kirillzyusko kirillzyusko marked this pull request as ready for review April 21, 2026 08:10
@kirillzyusko kirillzyusko requested a review from a team as a code owner April 21, 2026 08:10
Copy link
Copy Markdown
Contributor

@georgewrmarshall georgewrmarshall left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread packages/design-system-react/MIGRATION.md Outdated
Comment thread packages/design-system-react/MIGRATION.md Outdated
@github-actions
Copy link
Copy Markdown
Contributor

📖 Storybook Preview

@github-actions
Copy link
Copy Markdown
Contributor

📖 Storybook Preview

Copy link
Copy Markdown
Contributor

@georgewrmarshall georgewrmarshall left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@github-actions
Copy link
Copy Markdown
Contributor

📖 Storybook Preview

@github-actions
Copy link
Copy Markdown
Contributor

📖 Storybook Preview

Copy link
Copy Markdown
Contributor

@georgewrmarshall georgewrmarshall left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@kirillzyusko kirillzyusko enabled auto-merge (squash) April 28, 2026 08:09
@github-actions
Copy link
Copy Markdown
Contributor

📖 Storybook Preview

@kirillzyusko kirillzyusko merged commit f7659a9 into main Apr 28, 2026
44 checks passed
@kirillzyusko kirillzyusko deleted the feat/button-base-extension-docs branch April 28, 2026 08:13
georgewrmarshall pushed a commit that referenced this pull request Apr 28, 2026
<!--
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 -->
cursor Bot pushed a commit that referenced this pull request Apr 28, 2026
<!--
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 -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants