Checkbox: a long description pushes the control out of its container — the label column cannot shrink
Maintainers usually reply within 1 day
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
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from qoretechnologies/reqore
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
qoretechnologies/reqore#725 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
qoretechnologies/reqore#711 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
qoretechnologies/reqore#675 ·
Maintainers usually reply within 1 day
-
Difficulty 3/5 1-2 days Newbie friendliness 64/100
qoretechnologies/reqore#745 ·
Maintainers usually reply within 1 day
-
Difficulty 3/5 1-2 days Newbie friendliness 73/100
qoretechnologies/reqore#738 ·
Maintainers usually reply within 1 day
All issues in qoretechnologies/reqore
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
zabuton-app/meguri#875 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 86/100
iruzen-dono/workless#117 ·
Maintainers usually reply within 1 day
-
area:api area:web wave wave:trivial
Difficulty 2/5 1-3 hours Newbie friendliness 67/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
vetro-protocol/vetro-monorepo#1321 ·
Maintainers usually reply within 1 day