Repository navigation
[IGNORE] surface component slots for targeted customization - #404
Merged
Merged
Conversation
jgbernalp
commented
Oct 27, 2026
Contributor
- Add component slots to allow targeted internal component customization
|
React Doctor found no new issues. 🎉 Reviewed by React Doctor for commit |
zhuje
force-pushed
the
jgbernalp/add-component-slot
branch
from
October 27, 2026 19:25
d35c033 to
9f91d37
Compare
Contributor
|
@jgbernalp PTAL: hoisted some shared code for DRY, fixed some inconsistencies, added more typing for components with slotStyleProps that use custom properties. |
Base automatically changed from
jgbernalp/fix-selection-size-tests
to
ui-customization
October 27, 2026 20:20
Signed-off-by: Gabriel Bernal <gbernal@redhat.com>
…ps.ts Signed-off-by: Jenny Zhu <jenny.a.zhu@gmail.com>
Signed-off-by: Jenny Zhu <jenny.a.zhu@gmail.com>
…est.tsx for consistency with other component file structures Signed-off-by: Jenny Zhu <jenny.a.zhu@gmail.com>
Signed-off-by: Jenny Zhu <jenny.a.zhu@gmail.com>
zhuje
force-pushed
the
jgbernalp/add-component-slot
branch
from
October 27, 2026 20:20
9f91d37 to
a91d610
Compare
zhuje
added a commit
that referenced
this pull request
Oct 28, 2026
Expose CardHeaderSlotProps { content, end } so consumers can add className
and style to the title wrapper and the trailing actions wrapper without
changing structure, behavior, or accessibility, matching the slot
convention introduced in #404.
Adds CardHeader.slots.test.tsx, compile-time contracts in types.test.tsx,
and a Slots story.
Signed-off-by: Jenny Zhu <jenny.a.zhu@gmail.com>
jgbernalp
added a commit
that referenced
this pull request
Oct 28, 2026
* [FEATURE] UI Customization. Add Card component
Adds Card, CardHeader and CardContent to the next primitives. Card takes
variant ('elevated' | 'outlined' -> data-variant) plus spacing and sizing
style props; CardHeader exposes children as the title slot and a single
endElement slot; CardContent is a padded container. All defaults are
wrapped in :where() so style props win. Each part accepts a closed-union
'as' prop (div|section|article, div|header, div|figure) so the dashboard
Panel keeps its native section/header/figure semantics.
Signed-off-by: Jenny Zhu <jenny.a.zhu@gmail.com>
* [IGNORE] Fix Boolean endElement values no longer render an empty slot.
- Card now clips edge-to-edge content to rounded boundaries.
- Removed all new Card Oxlint warnings.
- Updated tests and story example.
Signed-off-by: Jenny Zhu <jenny.a.zhu@gmail.com>
* [ENHANCEMENT] address Card review findings
- Add closed-union prop to Card/CardHeader/CardContent
(div|section|article, div|header, div|figure) so the Panel
migration keeps native semantics without role= suppressions
- Use --perses-border-width-sm token; drop reset-owned box-sizing
- Import the style engine via the system barrel
- Remove file-wide jsx-a11y suppressions from tests and stories
- Move story presentation styles into .ladle/stories.css
- Complete the ComponentsContext provider example
Signed-off-by: Jenny Zhu <jenny.a.zhu@gmail.com>
* [IGNORE] import the layers prelude in card.css
Signed-off-by: Jenny Zhu <jenny.a.zhu@gmail.com>
* [IGNORE] wrap Card header slot defaults in :where()
Signed-off-by: Jenny Zhu <jenny.a.zhu@gmail.com>
* [IGNORE] wrap Card variant selectors in :where()
Follows #401: every selector in a primitive stylesheet, including state and
variant rules, is wrapped so consumer overrides never have to fight
specificity.
Signed-off-by: Jenny Zhu <jenny.a.zhu@gmail.com>
* [IGNORE] accept CSS custom properties on Card style props
Follows #403: type style as PersesCSSProperties on CardProps, CardHeaderProps
and CardContentProps so consumers can pass --perses-* and application
variables without casting. The registry-derived check in types.test.tsx
flagged Card after rebasing onto ui-customization; this resolves it.
Signed-off-by: Jenny Zhu <jenny.a.zhu@gmail.com>
* [FEATURE] UI Customization. Add CardHeader slotProps for content and end
Expose CardHeaderSlotProps { content, end } so consumers can add className
and style to the title wrapper and the trailing actions wrapper without
changing structure, behavior, or accessibility, matching the slot
convention introduced in #404.
Adds CardHeader.slots.test.tsx, compile-time contracts in types.test.tsx,
and a Slots story.
Signed-off-by: Jenny Zhu <jenny.a.zhu@gmail.com>
* [IGNORE] fix content box sizing reset in card
Signed-off-by: Gabriel Bernal <gbernal@redhat.com>
* [IGNORE] add subtle card variant and make names consistent
Signed-off-by: Gabriel Bernal <gbernal@redhat.com>
* [IGNORE] make start and end elements consistent across components
Signed-off-by: Gabriel Bernal <gbernal@redhat.com>
* [IGNORE] add side variants to padding and margin
Signed-off-by: Gabriel Bernal <gbernal@redhat.com>
* [IGNORE] add rounded styles
Signed-off-by: Gabriel Bernal <gbernal@redhat.com>
* [IGNORE] use radius css var for stories, make background consistent in dark mode
Signed-off-by: Gabriel Bernal <gbernal@redhat.com>
* [IGNORE] re format
Signed-off-by: Gabriel Bernal <gbernal@redhat.com>
---------
Signed-off-by: Jenny Zhu <jenny.a.zhu@gmail.com>
Signed-off-by: Gabriel Bernal <gbernal@redhat.com>
Co-authored-by: Gabriel Bernal <gbernal@redhat.com>
zhuje
added a commit
that referenced
this pull request
Oct 28, 2026
* [IGNORE] surface component slots for targeted customization Signed-off-by: Gabriel Bernal <gbernal@redhat.com> * [IGNORE] DRY. Hoist common code for 'mergeControlStyle' into styleProps.ts Signed-off-by: Jenny Zhu <jenny.a.zhu@gmail.com> * [IGNORE] add ps-TablePagination__select class to the select slot Signed-off-by: Jenny Zhu <jenny.a.zhu@gmail.com> * [IGNORE] move TextField and TablePagination slot tests into *.slots.test.tsx for consistency with other component file structures Signed-off-by: Jenny Zhu <jenny.a.zhu@gmail.com> * [IGNORE] type control slots with their component Style interface Signed-off-by: Jenny Zhu <jenny.a.zhu@gmail.com> --------- Signed-off-by: Gabriel Bernal <gbernal@redhat.com> Signed-off-by: Jenny Zhu <jenny.a.zhu@gmail.com> Co-authored-by: Jenny Zhu <jenny.a.zhu@gmail.com>
zhuje
added a commit
that referenced
this pull request
Oct 28, 2026
* [FEATURE] UI Customization. Add Card component
Adds Card, CardHeader and CardContent to the next primitives. Card takes
variant ('elevated' | 'outlined' -> data-variant) plus spacing and sizing
style props; CardHeader exposes children as the title slot and a single
endElement slot; CardContent is a padded container. All defaults are
wrapped in :where() so style props win. Each part accepts a closed-union
'as' prop (div|section|article, div|header, div|figure) so the dashboard
Panel keeps its native section/header/figure semantics.
Signed-off-by: Jenny Zhu <jenny.a.zhu@gmail.com>
* [IGNORE] Fix Boolean endElement values no longer render an empty slot.
- Card now clips edge-to-edge content to rounded boundaries.
- Removed all new Card Oxlint warnings.
- Updated tests and story example.
Signed-off-by: Jenny Zhu <jenny.a.zhu@gmail.com>
* [ENHANCEMENT] address Card review findings
- Add closed-union prop to Card/CardHeader/CardContent
(div|section|article, div|header, div|figure) so the Panel
migration keeps native semantics without role= suppressions
- Use --perses-border-width-sm token; drop reset-owned box-sizing
- Import the style engine via the system barrel
- Remove file-wide jsx-a11y suppressions from tests and stories
- Move story presentation styles into .ladle/stories.css
- Complete the ComponentsContext provider example
Signed-off-by: Jenny Zhu <jenny.a.zhu@gmail.com>
* [IGNORE] import the layers prelude in card.css
Signed-off-by: Jenny Zhu <jenny.a.zhu@gmail.com>
* [IGNORE] wrap Card header slot defaults in :where()
Signed-off-by: Jenny Zhu <jenny.a.zhu@gmail.com>
* [IGNORE] wrap Card variant selectors in :where()
Follows #401: every selector in a primitive stylesheet, including state and
variant rules, is wrapped so consumer overrides never have to fight
specificity.
Signed-off-by: Jenny Zhu <jenny.a.zhu@gmail.com>
* [IGNORE] accept CSS custom properties on Card style props
Follows #403: type style as PersesCSSProperties on CardProps, CardHeaderProps
and CardContentProps so consumers can pass --perses-* and application
variables without casting. The registry-derived check in types.test.tsx
flagged Card after rebasing onto ui-customization; this resolves it.
Signed-off-by: Jenny Zhu <jenny.a.zhu@gmail.com>
* [FEATURE] UI Customization. Add CardHeader slotProps for content and end
Expose CardHeaderSlotProps { content, end } so consumers can add className
and style to the title wrapper and the trailing actions wrapper without
changing structure, behavior, or accessibility, matching the slot
convention introduced in #404.
Adds CardHeader.slots.test.tsx, compile-time contracts in types.test.tsx,
and a Slots story.
Signed-off-by: Jenny Zhu <jenny.a.zhu@gmail.com>
* [IGNORE] fix content box sizing reset in card
Signed-off-by: Gabriel Bernal <gbernal@redhat.com>
* [IGNORE] add subtle card variant and make names consistent
Signed-off-by: Gabriel Bernal <gbernal@redhat.com>
* [IGNORE] make start and end elements consistent across components
Signed-off-by: Gabriel Bernal <gbernal@redhat.com>
* [IGNORE] add side variants to padding and margin
Signed-off-by: Gabriel Bernal <gbernal@redhat.com>
* [IGNORE] add rounded styles
Signed-off-by: Gabriel Bernal <gbernal@redhat.com>
* [IGNORE] use radius css var for stories, make background consistent in dark mode
Signed-off-by: Gabriel Bernal <gbernal@redhat.com>
* [IGNORE] re format
Signed-off-by: Gabriel Bernal <gbernal@redhat.com>
---------
Signed-off-by: Jenny Zhu <jenny.a.zhu@gmail.com>
Signed-off-by: Gabriel Bernal <gbernal@redhat.com>
Co-authored-by: Gabriel Bernal <gbernal@redhat.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.