BBButton: let a long label wrap instead of overflowing
メンテナーはふだん 2 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 半日
- 初心者へのやさしさ
- 45/100
- issue の種類
- 機能追加
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- react, typescript
- 領域
- frontend
調査の方向性
Start in src/components/Button/styles.ts, where commonButtonStyles sets white-space: nowrap, and compare it with the stacked layout's ButtonText clamp. Check how the component passes className through, since the issue relies on that. Before coding, get a maintainer decision on wrap-by-default versus an opt-in wrapLabel prop. Done means a long label wraps inside a narrow fullWidth container, short labels look unchanged, and a Storybook story or test covers both cases.
索引モデルが issue の本文から書いたものです。
説明
Is your feature request related to a problem? Please describe.
BBButton never wraps its label: commonButtonStyles sets white-space: nowrap. When the button can't grow, for example a fullWidth button in a narrow popover or a dialog footer on a phone, a long translation overflows the button instead of breaking onto a second line.
The BigBlueButton 4.0 client already overrides this in three places:
- Confirmation modal footer:
white-space: normal(bigbluebutton/bigbluebutton#25942) - Take/request presenter button in the media-sharing popover:
white-space: normal(bigbluebutton/bigbluebutton#25942) - Poll "add option" button:
white-space: pre-wrap, through a wrapper's& > buttonrule
Since 0.9.0 forwards className, each override is a one-liner. But every consumer only finds out it needs one after a label overflows in some language.
Describe the solution you'd like
Either of these:
- Wrap by default.
BBButtonisinline-flexand sizes itself to its label, so a label only wraps when its container is narrower than the label. A button with room renders exactly as today. Thestackedlayout already wraps:ButtonTextclamps to two lines. - An opt-in prop,
wrapLabel?: boolean, for the default layout.
The truncation request (#106) is the other answer to the same overflow. Both could share one prop, for example labelOverflow?: 'nowrap' | 'wrap' | 'ellipsis'.
Describe alternatives you've considered
styled(BBButton) with white-space: normal at each call site, which is what the client does today.
Affected component(s)
BBButton
Proposed API / Usage Example
// Wrapping by default: no change at call sites.
<BBButton label={intl.formatMessage(messages.takePresenter)} fullWidth size="sm" onClick={take} />
// Or opt-in:
<BBButton label={longLabel} fullWidth wrapLabel onClick={take} />
Additional context
A wrapped label makes the button taller, for example 37px to 56px at sm, so buttons in a row can end up with different heights. The client accepts that, because the alternative is an overflowing label.
- 主要言語
- TypeScript
- スター
- 2
- フォーク
- 5
- 平均マージ
- 1日 16時間
- マージ済み PR(30日)
- 12
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドなし
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
bigbluebutton/bbb-ui-components-react のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
bigbluebutton/bbb-ui-components-react#108 ·
メンテナーはふだん 2 日以内に返信
-
BBButton: subtle variant with neutral color has an opaque white background, so it renders white on white in dark mode再び着手できるかも @nisatsama が 10 日前に担当しましたが、オープン中のプルリクエストはありません。 オープンbug
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
bigbluebutton/bbb-ui-components-react#100 · コメント 1 件 ·
メンテナーはふだん 2 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 30/100
bigbluebutton/bbb-ui-components-react#107 ·
メンテナーはふだん 2 日以内に返信
-
難易度 3/5 半日 初心者へのやさしさ 55/100
bigbluebutton/bbb-ui-components-react#106 ·
メンテナーはふだん 2 日以内に返信
-
enhancement
難易度 4/5 3〜5日 初心者へのやさしさ 30/100
bigbluebutton/bbb-ui-components-react#87 ·
メンテナーはふだん 2 日以内に返信
bigbluebutton/bbb-ui-components-react の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
callstackincubator/simlock#639 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 80/100
aws/agentcore-cli#2606 ·
メンテナーはふだん 1 日以内に返信
-
ai-driven-qa bug Cosmetic
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
メンテナーはふだん 1 日以内に返信
-
ai-driven-qa bug claude Minor
難易度 2/5 1〜3時間 初心者へのやさしさ 64/100
linagora/twake-mail-admin#301 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
メンテナーはふだん 1 日以内に返信