fix: home page custom content card overflows on narrow viewports - #42084
fix: home page custom content card overflows on narrow viewports#42084ayan-alam07 wants to merge 1 commit into
Conversation
The custom content card renders three action buttons inside CardControls, which is a flex container without flex-wrap in fuselage 0.88.0. On narrow viewports the buttons stay on one line and overflow the card. Group the buttons in a ButtonGroup with the wrap prop, which fuselage already styles with flex-wrap: wrap, so they wrap inside the card.
|
Looks like this PR is not ready to merge, because of the following issues:
Please fix the issues and try again If you have any trouble, please check the PR guidelines |
🦋 Changeset detectedLatest commit: e82540c The changes in this PR will be included in the next version bump. This PR includes changesets to release 3 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (2)
Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review. 📜 Recent review details⏰ Context from checks skipped due to timeout. (1)
🔇 Additional comments (2)
WalkthroughThe custom content card now wraps its three action buttons on narrow viewports. A changeset records a patch release for ChangesCustom content card controls
Priority: ➖ Normal Estimated code review effort: 1 (Trivial) | ~5 minutes Change: Bug fix · Severity of issue fixed: Medium Merge Risk: ⚪ Minimal · up to The home-page custom-content action controls now wrap on narrow viewports, preventing horizontal card overflow without changing their behavior. No merge-blocking risk remains. Suggested labels: Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
Warning Errors were encountered while retrieving linked issues. Errors (1)
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. Comment |
|
Hi! I've signed the CLA, and the code changes are ready. Could someone approve the pending CI workflows and assign the appropriate milestone? Happy to make any changes if needed during review. Thanks! |
Proposed changes (including videos or screenshots)
The custom content card on the home page renders three action buttons inside
CardControls. That container is a flex row withoutflex-wrap, so on narrow viewports the buttons stay on one line, the card stretches past the edge of the screen, and the third button is cut off.Both captured on the admin home page at 414 x 896, the iPhone X viewport. Measured from the rendered page:
This change wraps the three buttons in a
ButtonGroupwith thewrapprop. Fuselage already styles.rcx-button-group--wrapwithflex-wrap: wrap, so the buttons move onto a second line when the card is too narrow to fit them on one.ButtonGroupis what fuselage documents for "grouping buttons that semantically share a common action context", which describes these three. It also rendersrole="group", so the grouping is exposed to assistive technology.TagList.tsxandMarketplaceHeader.tsxalready use the same prop.I fixed this on the app side because the root cause is in fuselage and has not been released. RocketChat/fuselage#1440 tracks the missing
flex-wrapon.rcx-card__controlsand RocketChat/fuselage#2074 proposes adding it. Both are open, and 0.88.0, the version this repository depends on, does not contain the fix. If that PR lands, theButtonGrouphere remains correct and can be simplified later if maintainers prefer.Issue(s)
Closes #42083
Steps to test or reproduce
Before this change the third button is clipped at the edge of the screen. After it the buttons wrap onto a second line and stay inside the card.
Further comments
Only the admin branch of
CustomContentCardchanges. The other branches render no controls, so they are unaffected. No unit or e2e test covers this component today.Summary by CodeRabbit