Repository navigation
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: 9ad0248 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. WalkthroughThe custom content card now places its three admin controls in a wrapping button group. A changeset records a patch release for ChangesCustom content card controls
Estimated code review effort: 1 (Trivial) | ~5 minutes Change: Bug fix · Severity of issue fixed: Medium Suggested labels: Suggested reviewers: Merge Risk:
|
|
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! |
develop renamed the buttons' medium prop to size='medium' and moved useIsEnterprise into @rocket.chat/ui-client, so CardControls was rewritten around those. Kept develop's version and reapplied the ButtonGroup wrapper that lets the three actions wrap instead of overflowing.
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