Repository navigation
Conversation
|
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: 72e30d7 The changes in this PR will be included in the next version bump. This PR includes changesets to release 22 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 |
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: true
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 |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## develop #42974 +/- ##
=========================================
Coverage 71.39% 71.39%
=========================================
Files 5281 5291 +10
Lines 227560 228095 +535
Branches 42151 42120 -31
=========================================
+ Hits 162457 162853 +396
- Misses 59867 60043 +176
+ Partials 5236 5199 -37
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
CI runs it in the lint job with --max, so the count of styling props passed to Fuselage components cannot grow while they are migrated.
5e87038 to
143f1dc
Compare
Three of them (rcx-swiper-zoom-*, rcx-sidebar-item__menu, rcx-button--loading) match no CSS rule and are removed. rcx-field-group__item is still needed on CustomFieldsForm's Field, since FieldGroup patches the class onto CustomField, which doesn't forward it; it becomes a className.
AbacPreviewMemberGroup passed marginBlock={8}, which is the margin Divider already has.
Dividers that carried their own block margin or width now sit in containers whose gap and alignment produce the same layout.
…ldGroup styling props
Spacing moves to gap on the container (grouping siblings where only part of them were spaced), ButtonGroup replaces per-button margins and width, and flex-child props already implied by ButtonGroup stretch or the parent's direction are dropped. Every change is pixel-identical.
Inputs that share a FieldRow with a remove button are grouped in a gap Box, so the spacing lands only between them. Every change is pixel-identical.
`flexGrow={1}` repeats the input's own default and `alignItems` lands on the
inner input when there is an addon, so both go away. Margins between a
TextInput and its siblings become `gap` on the row.
The input already grows to fill its row, so `flexGrow={1}` changes nothing.
The date and time rows spread their inputs with `gap` on the row instead of
negative margins plus `Margins`, and `flexGrow={1}` goes away because the
input already grows by default.
`flexGrow={1}` repeats the input's default, and the invitation field's
`flexGrow={0}` has no free space to refuse inside its scrollable content.
…thing
`flexGrow={1}` repeats the input's default, and in the department agents
table `maxWidth='100%'` never wins over the input's own minimum width.
`Select` never forwards `width` to its trigger, and the multi and filtered
selects already grow to fill their row, so `width='full'` and `flexGrow={1}`
leave the layout unchanged.
Inside a field row the autocompletes already fill the row, so the
`width='100%'` plus `flexShrink={0}`/`flexGrow={0}` combination and the
default `flexShrink={1}` leave the layout unchanged. The department form that
places one in a plain Box keeps its own `width='100%'`, which now applies.
…ad of SidebarFooterContent's color prop
Position replaced the child's style with the positioning style, so AutoComplete's options lost the width that sizes them to the input.
TableCell already renders a th inside TableHead.
Each property name labels the value in its own row, not a column.
IconButtons in a stretch group no longer need flexGrow={0}/flexShrink={0} to opt out of growing.
Replaces width='50%', width='100%' and flexBasis='0' on Buttons in stretched groups. UserCard actions were never equal width (flexBasis={0} is dropped by Box), so they keep plain stretch.
Replaces minWidth='4ch' on UiKit button and linear scale elements.
The code block copy button, the screenshot carousel arrows and the playground close buttons move their position props to a Box around the button.
Sites that zeroed the Divider margin with styling props now pass flush. The room header pulls its row 2px over the divider instead of the divider pulling itself up, and the E2EE and emoji picker padding boxes carry the whole gap instead of relying on the Divider's 8px.
The room list filter dividers and the composer actions divider pass variation='light' instead of borderColor. The filter dividers' inset moves to a padding box around a flush divider.
The room header toolbar and composer actions dividers pass small instead of a 4px inline margin; the composer one also drops the height that repeated the vertical default.
Drops the 4px trailing margin of autocomplete chips that already take AutoComplete's 4px margins through the forwarded className.
…RowHeight for the subscription page
Proposed changes
Fuselage components accept only DOM/ARIA attributes and the variations they declare: no
Boxstyling props, no freeis, norcx-*props. The container owns the layout, mostly throughgap. This pull request carries the proposal, the scan that measures it, and the migration of the app and of Fuselage's own compositions, one commit per component or step. The Tamagui pilot (#42942) is rebased on it.docs/proposals/fuselage-component-style-props.md: why, what the code does today, how each category of prop is replaced, and the plan.packages/fuselage/scripts/scan-style-props.mjs: an AST scan listing every use of a Fuselage component that passes a styling prop it doesn't declare, plus every element laid out byMargins/Scrollable. Runnode packages/fuselage/scripts/scan-style-props.mjs [out.json]from the repository root..github/workflows/ci-code-check.yml: the lint job runs the scan with--max <n>, so a new styling prop on a component fails CI. Each migration commit lowersnto its new count.Result
developSkeletonfindingsMargins/Scrollableoutside FuselageCommits, by step
--maxin the lint job, the proposal (Skeleton last)rcx-*props in the appclassNamegapon the container (two passes),flex-shrink: 0in.rcx-icon, input addon Icons no longer centred by hand, Button/Tag own their icon spacinggapon the container, flex-child and sizing props move to the parent's layoutMargins/Scrollablegap/padding in 18 app fileswidth/height; stacked skeletons spaced by their containerrcx-*passed between components become a mergedclassName; layout props move to SCSS or the containerStackdirection,gap,align,justify,wrap,grow), and the 77gapcontainers this branch added that it fitsStacktyping, MessageBlock fixed width, shared not-available callout, simpler divider boxes,Positionkeeping its child'sstyleFuselage changes visible to consumers (changesets)
Stack(new component, minor)..rcx-icon:flex-shrink: 0..rcx-tag:gap: 4pxbetween icon and label; Tag icons no longer carry their own margin.height='full').Issue(s)
https://rocketchat.atlassian.net/browse/ARCH-2573
Steps to test or reproduce
node packages/fuselage/scripts/scan-style-props.mjs /tmp/style-props.jsonprints the remaining findings withfile:line.developagainst this branch:previewlabel), home, rooms and every contextual bar, account, directory, admin, marketplace, modals, at 1280 and 400px: identical except the sidebar badge listed below.Further comments
Visible changes in this branch
RoomForewordUsernameListItempasses an icon without margin, so it now gets the 4px gap (as Tag's own stories show).Open questions
Most remaining findings need a declared variation, a design call, or accepting a small visual change.
color(50 sites, tokens only)ModalIcon/ModalTaglinevariantflush/light/ compact verticalsmallalignis(label | span) and text variantsstretch='equal'inverted-1pxMarginsleaks intoSelect's hidden element and into Paginationgapwidth/heightStack'sgrow--maxchanges in most commits, so extracting a single commit conflicts on that line.All open questions, by component
Icon (from Icon agent)
iconprop renders separate column (visual change).Divider (from Divider agent)
flush(no margin) variation: KeyboardShortcutsModal:127, AppLogsItem:61, CreateCloudWorkspaceForm:182, CounterRow:28, HeaderDivider:3 (-2 pull).light: OmnichannelFilters:24, TeamCollabFilters:19, MessageComposerActionsDivider:5.Callout (from Callout agent)
Field family (from Field agent)
align?: 'start'|'end'(flex-start ×6, initial ×3, end ×1 + EnterE2E alignSelf end): would remove 9 grouping Boxes added.is×14 all 'span' →is?: 'label'|'span'or standalone flag.variant='option'(p2) + terms variant; CloseChatModal note → FieldHint (visual change).flex-shrink:0from .rcx-field or horizontal field row container.Button / IconButton (from Button agent)
stretch='equal'(flex-basis 0)..rcx-button-group--stretch > .rcx-button--icon {flex-grow:0}+ Button pattern (changeset).compactvariation.Inputs / selects (from inputs agent)
Icon round 2
Margins / Scrollable removal
Skeleton
invertedvariation.Stack (review pass)
growon Stack (13 sites) is a flex-child prop; keep, or those go back to Box?shrink/minWidth 0 not added (2 sites); maybe minWidth 0 default for rows later.<Margins block={24}>still receive injected margins (Margins doubts pending).Fuselage internals (step 4)
coloras declared in scanner once variation lands?padding='none'variation.Margins all x4: gap is visual change for renderSelected consumers (~17) → accept with changeset + fix app renderSelected margins..rcx-select .rcx-select__addon {margin-inline:4px}next to InputBox addon area: OK?Review findings (structural)
Final visual check