Skip to content

feat(card): add isGlass prop#12290

Open
wise-king-sullyman wants to merge 1 commit intopatternfly:mainfrom
wise-king-sullyman:card-glass-followup
Open

feat(card): add isGlass prop#12290
wise-king-sullyman wants to merge 1 commit intopatternfly:mainfrom
wise-king-sullyman:card-glass-followup

Conversation

@wise-king-sullyman
Copy link
Collaborator

@wise-king-sullyman wise-king-sullyman commented Mar 24, 2026

What: Closes #12268

Additional issues:

Assisted by Claude Code

Summary by CodeRabbit

  • New Features

    • Card component now includes support for a glass visual style modifier. Use the new isGlass property to apply a glass appearance effect to card elements in your interface.
  • Tests

    • Added unit test confirming the glass modifier is correctly applied to the card element when the style is enabled.

@coderabbitai
Copy link

coderabbitai bot commented Mar 24, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 9e32cd1f-a1cf-4a2c-a824-9def06b3e6bd

📥 Commits

Reviewing files that changed from the base of the PR and between 641c888 and 7bf0c2c.

📒 Files selected for processing (2)
  • packages/react-core/src/components/Card/Card.tsx
  • packages/react-core/src/components/Card/__tests__/Card.test.tsx

Walkthrough

The Card component adds a new optional isGlass boolean prop that conditionally applies the pf-m-glass CSS modifier to the component's root element. A corresponding unit test verifies that the CSS class is correctly applied when the prop is enabled.

Changes

Cohort / File(s) Summary
Card component enhancement
packages/react-core/src/components/Card/Card.tsx
Added optional isGlass prop to CardProps interface and implemented conditional logic to apply styles.modifiers.glass CSS modifier when isGlass is truthy.
Card test coverage
packages/react-core/src/components/Card/__tests__/Card.test.tsx
Added unit test verifying that the pf-m-glass CSS class is present on the card root element when isGlass prop is passed.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'feat(card): add isGlass prop' accurately describes the main change - adding a new isGlass prop to the Card component.
Linked Issues check ✅ Passed The PR successfully implements the requirement from issue #12268 to add an isGlass modifier that applies the 'pf-m-glass' CSS modifier to the Card component.
Out of Scope Changes check ✅ Passed All changes are directly related to implementing the isGlass prop for the Card component as specified in issue #12268, with no extraneous modifications.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@patternfly-build
Copy link
Collaborator

patternfly-build commented Mar 24, 2026

@wise-king-sullyman wise-king-sullyman requested review from a team, nicolethoen and thatblindgeye and removed request for a team March 24, 2026 19:31
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.

Card - Glass styles react followup

2 participants