Skip to content

fix(button): keep intrinsic labels on one line - #17

Open
hyochan wants to merge 1 commit into
mainfrom
bugfix/solid-button-native-label
Open

fix(button): keep intrinsic labels on one line#17
hyochan wants to merge 1 commit into
mainfrom
bugfix/solid-button-native-label

Conversation

@hyochan

@hyochan hyochan commented Sep 6, 2026

Copy link
Copy Markdown
Member

Summary

  • Keep string command labels on one line during Android intrinsic layout measurement; custom element labels retain their own layout.
  • Cover solid and outlined labels through press and loading, and add an intrinsic solid-label Storybook case.

Verification

  • Full test:all: 23 suites, 304 tests; lint, types, component and story coverage pass.
  • Package build and Storybook production build pass.
  • Physical Pixel 10: fresh local BooKoo 1.0.1 QA APK with embedded JS; full Add entry label centered at idle, held, and after navigating back.
  • Physical iPad mini: CTA opens the editor and remains complete after returning.
  • Live web Light/Dark solid and Dark outlined stories inspected; dark solid press preserves its label.

No npm publication in this PR. The consumer carries only compiled output while explicit prerelease publication approval is pending.

Summary by CodeRabbit

  • Bug Fixes
    • Button labels now remain on a single line during intrinsic-width sizing, including solid and outlined button styles.
    • Loading buttons with text now preserve consistent single-line label rendering.
  • Documentation
    • Added a Storybook example for medium-sized solid intrinsic-label buttons.

@hyochan hyochan added ⌚ ux User Experience 🐛 bug Something isn't working labels Sep 6, 2026
@coderabbitai

coderabbitai Bot commented Sep 6, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Team

Run ID: c92e503f-81b1-4637-8753-fdd2e5ce07f2

📥 Commits

Reviewing files that changed from the base of the PR and between dc0c67d and 0e5dee0.

📒 Files selected for processing (3)
  • src/components/uis/Button/Button.stories.tsx
  • src/components/uis/Button/Button.test.tsx
  • src/components/uis/Button/Button.tsx

Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

Button string labels now render with numberOfLines={1}. Tests cover solid and outlined intrinsic-width buttons and loading labels. Storybook adds a solid intrinsic-label example.

Changes

Button label behavior

Layer / File(s) Summary
Single-line label rendering
src/components/uis/Button/Button.tsx
String labels pass numberOfLines={1} to Typography.Body2.
Button label validation
src/components/uis/Button/Button.test.tsx, src/components/uis/Button/Button.stories.tsx
Tests cover solid and outlined intrinsic-width labels and loading labels. Storybook adds the IntrinsicSolidLabel story.

Estimated code review effort: 1 (Trivial) | ~5 minutes

Merge Risk: ⚪ Minimal · up to 0e5de

String button labels now remain on one line during intrinsic layout measurement, with coverage for button variants and loading behavior. No current merge-blocking risk remains.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 3 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: preventing intrinsic button labels from wrapping onto multiple lines.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch bugfix/solid-button-native-label

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions

github-actions Bot commented Sep 6, 2026

Copy link
Copy Markdown
Contributor

Visit the preview URL for this PR (updated for commit 0e5dee0):

https://cpk-ui--pr17-bugfix-solid-button-j30rj1tn.web.app

(expires Sun, 13 Sep 2026 03:02:24 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

Sign: 05244aa8e2a82af676f8a528c78a4bcd59756f99

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🐛 bug Something isn't working ⌚ ux User Experience

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant