Skip to content

fix(table): add pf-m-small to expandable toggle on small tables#11947

Merged
nicolethoen merged 3 commits intopatternfly:mainfrom
evwilkin:fix/11946-compact-table-alignment
Jul 30, 2025
Merged

fix(table): add pf-m-small to expandable toggle on small tables#11947
nicolethoen merged 3 commits intopatternfly:mainfrom
evwilkin:fix/11946-compact-table-alignment

Conversation

@evwilkin
Copy link
Member

What: Closes #11946

This PR adds the pf-m-small class to the expandable row toggle when the table has variant="compact", in both the Th and Td components. This corrects the current behavior to match the Core implementation.

@patternfly-build
Copy link
Collaborator

patternfly-build commented Jul 28, 2025

@evwilkin evwilkin requested review from a team, rebeccaalpert and wise-king-sullyman and removed request for a team July 29, 2025 15:43
{isOpen !== undefined && (
<Button
className={css(className, isOpen && styles.modifiers.expanded)}
className={css(className, isOpen && styles.modifiers.expanded, variant === 'compact' && 'pf-m-small')}
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you update this to conditionally apply size="sm" instead of adding the class manually?

Copy link
Member Author

Choose a reason for hiding this comment

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

@mcoker thanks for that, looks like I'm a little rusty. Updated 👏

Copy link
Contributor

@mcoker mcoker left a comment

Choose a reason for hiding this comment

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

LGTM on the CSS side 🎃

@nicolethoen nicolethoen merged commit a72b43a into patternfly:main Jul 30, 2025
13 checks passed
@patternfly-build
Copy link
Collaborator

Your changes have been released in:

  • @patternfly/react-docs@7.3.1-prerelease.1
  • @patternfly/react-table@6.3.1-prerelease.1

Thanks for your contribution! 🎉

nicolethoen pushed a commit that referenced this pull request Aug 4, 2025
* fix(table): add pf-m-small to expandable toggle on small tables

* fix(table): add pf-m-small to expandable toggle on Th in compact table

* fix(table): add sm button variant in place of hardcode classname
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.

Bug - Expandable Table - compact expandable misalignment

5 participants