Repository navigation
[feat]: Create <pf-v6-expandable-section> element #2932
Copy link
Copy link
Open
Labels
1:1Aligning components with PatternFly v4Aligning components with PatternFly v4good 1st issueGood for newcomers to the project; requires at least an introductory knowledge of the languageGood for newcomers to the project; requires at least an introductory knowledge of the languagepriority: highSeverity level: 1Severity level: 1
Milestone
Description
Summary
Create `` to implement the PatternFly v6 Expandable section component.
Toggle-controlled content area that shows or hides a section of content.
Prior Art
| Source | Element | Status |
|---|---|---|
| PFE v4 | -- | -- |
| cem | -- | -- |
| cockpit | -- | -- |
| chickadee | -- | -- |
| Red Hat | `` | Similar |
Requirements
- MUST implement PFv6 visual designs
- MUST provide end-user feature parity with `@patternfly/react-core` ExpandableSection
- MAY adjust element API to leverage web platform strengths
- SHOULD maintain CSS custom property theming compatibility
- SHOULD expose useful CSS shadow parts
Element-specific considerations
- React `variant`: `default`, `truncate`, `detached` - note: detached and truncated are NOT required in initial implementation (see original issue notes)
- React `isExpanded` (controlled) / `defaultExpanded` (uncontrolled) - reflect as `expanded` attribute
- React `isDetached` - toggle and content are separate sibling elements, not parent/child; complex pattern
- React `isWidthLimited` - constrains content width to a percentage
- React `isIndented` - adds left margin to content
- React `displaySize`: `default`, `lg`
- React `toggleText`, `toggleTextExpanded`, `toggleTextCollapsed` - text on toggle button; map to single `toggle-text` + optional `toggle-text-expanded` / `toggle-text-collapsed` attributes
- Consider native ``/`
` as inner implementation (handles toggle semantics natively), though it may limit CSS animation of content reveal
- Emit `toggle` event on expand/collapse
Checklist
Implementation
- API per `.claude/ADVICE.md`
- CSS uses v6 tokens, logical properties, nesting
- `@summary` and JSDoc on element class
Demos
- Demos match patternfly.org naming/structure
- CSS custom properties match computed styles from patternfly.org (Chrome MCP)
- Visual parity verified via Chrome MCP
Tests
- Public API covered (attributes, properties, events, slots)
- `a11ySnapshot` assertions
Reviews
- `/review-api` passes
- `/review-demos` passes
- `/review-a11y` passes
- `eslint` and `stylelint` pass
Ship
- Add changeset
- PR targets `staging/pfv6` (NOT `main`)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
1:1Aligning components with PatternFly v4Aligning components with PatternFly v4good 1st issueGood for newcomers to the project; requires at least an introductory knowledge of the languageGood for newcomers to the project; requires at least an introductory knowledge of the languagepriority: highSeverity level: 1Severity level: 1
Activity
[-][feat]: Create `<pf-expandable-section>`[/-][+][feat]: Create `<pf-expandable-section>` element[/+][-][feat]: Create `<pf-expandable-section>` element[/-][+][feat]: Create `<pf-v6-expandable-section>` element[/+]