Skip to content

Conversation

@gitdallas
Copy link
Contributor

What: Closes #12030

@gitdallas gitdallas requested review from a team, kmcfaul and rebeccaalpert and removed request for a team October 14, 2025 22:00
@patternfly-build
Copy link
Contributor

patternfly-build commented Oct 14, 2025

Copy link
Contributor

@thatblindgeye thatblindgeye left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This lgtm, especially as a means to set the toggle content for controlled or uncontrolled implementations.

I think ultimately maybe it depends what we want the API to look like in the future:

  • Would we want to have the API set in such a wway that a consumer only needs to pass toggleContent, and we remove toggleText, toggleTextExpanded, and toggleTextCollapsed? One prop to rule them all etc
  • Or would we want a prop intended for a controlled implementation (toggleContent), and have 2 props for uncontrolled implementations (replacing toggleTextExpanded and toggleTextCollapsed with new props, toggleContentExpanded and toggleContentCollapsed) that accept ReactNodes as types)? In addition to removing toggleText as a prop

Copy link
Contributor

@kmcfaul kmcfaul left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This lgtm.

As far as future API, I'd be in favor of slimming down the props in the next breaking release - we probably could do away with toggleText in favor of toggleContent and deprecate the expanded/collapsed text props.

Copy link
Contributor

@thatblindgeye thatblindgeye left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Opened a breaking change followup for the API: #12104

@thatblindgeye
Copy link
Contributor

@gitdallas just a merge conflict that needs resolving

@gitdallas gitdallas force-pushed the feat/12030-ExpandableSection-functional-toggleContent branch from f7a25e9 to b56de1b Compare October 29, 2025 19:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ExpandableSection - support dynamic toggleContent

4 participants