Checkbox: a long description pushes the control out of its container — the label column cannot shrink

Open Beginner friendly
#662 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

@Foxhoundn is already working on this.

Since Oct 12, 2026.

  • #715 by @Foxhoundn — open

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
76/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
react, typescript
Domain
frontend

Research direction

Start in src/components/Checkbox/index.tsx and inspect StyledCheckbox and the vertical ReqoreControlGroup used for the label and description. Reproduce the overflow with a long description in a narrow container, then add a story-level check as proposed for a 320px container. Done when the checkbox text wraps and stays within the container while the switch keeps its natural size.

Written by the indexing model from the issue text.

Description

Symptom

A ReqoreCheckbox (asSwitch, fluid, wrapLabel) with a two-sentence description inside a 340px-wide modal renders its label/description block up to ~190px past the modal's right edge. The text does not wrap; the whole control overflows. Seen in qorus-ide's notification preferences dialog at phone width (380px), where every switch's text ran outside the dialog.

Root cause

src/components/Checkbox/index.tsx: StyledCheckbox is display: inline-flex with a fixed height, and the label block is a ReqoreControlGroup vertical that has no min-width: 0 and no flex-shrink. wrapLabel only toggles noWrap on the label text effect; the .reqore-checkbox-description text effect is never allowed to wrap and the column is never allowed to shrink, so the block keeps its unwrapped content width.

Proposed fix

When wrapLabel is set (or always when fluid): give the label column min-width: 0; flex: 1 1 auto, and let the description wrap (white-space: normal). The switch/box keeps its natural size (flex: 0 0 auto). A story with a long description in a 320px container should assert nothing with text leaves the container.

Where it was worked around

qorus-ide (src/components/Notifications/NotificationsPrefsModal.tsx) now renders each preference as its own row — a text column with flex: 1 1 0%; min-width: 0 beside a fixed switch — instead of using the checkbox's label/description. That is a fine layout for a settings row, but the component should not overflow when handed a long description.

Dominant language
TypeScript
Stars
4
Forks
0
Avg merge
16h 28m
Merged PRs (30d)
9

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from qoretechnologies/reqore

All issues in qoretechnologies/reqore

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.