Conversation
This fixes an issue with the button text not wrapping when the button becomes longer than the width of the viewport, creating overflow. It should instead wrap to a new line (and not be limited by height.) I also customized the list of ladle viewport sizes to include 320, it will hopefully make it easier to test that minimum size to spot issues like this in the future.
Contributor
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
The story contains a critical TypeScript callback error and the input lacks an accessible name.
Get a fresh assessment by requesting another Copilot review.
Review effort: Lite
Findings: 1
Open (2)
What changed in this PR
This PR fixes long button labels overflowing narrow viewports and adds a 320px Ladle viewport for testing.
Changes:
- Enables multiline button labels with flexible height.
- Adds editable button text to the Primary story.
- Adds viewport presets and bumps the package version to
1.23.10.
| File | Summary |
|---|---|
src/components/Button.stories.tsx |
Adds interactive button text testing. Critical finding (2 votes): the Input callback uses an invalid native event shape. Nit (2 votes): the input lacks an accessible name. |
src/components/Button.css |
Enables text wrapping and dynamic button height. |
package.json |
Bumps the package version. |
.ladle/config.mjs |
Adds viewport width presets. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
RoyEJohnson
approved these changes
Sep 21, 2026
Member
Author
|
@RoyEJohnson What's the |
Contributor
|
It was generating a warning that "@types/dompurify is a stub. It is not needed." Starting with version 3.2.0, it ships with TS definitions. |
This branch was successfully deployed
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.


https://openstax.atlassian.net/browse/CORE-2918
This fixes an issue with the button text not wrapping when the button becomes longer than the width of the viewport, creating overflow. It should instead wrap to a new line (and not be limited by height.) I also customized the list of ladle viewport sizes to include 320, it will hopefully make it easier to test that minimum size to spot issues like this in the future.
Before:
After:
Text without spaces: