Skip to content

fix(DescriptionList): use correct token for termWidth#12253

Open
nicolethoen wants to merge 1 commit intopatternfly:mainfrom
nicolethoen:descriptionList-termWidth
Open

fix(DescriptionList): use correct token for termWidth#12253
nicolethoen wants to merge 1 commit intopatternfly:mainfrom
nicolethoen:descriptionList-termWidth

Conversation

@nicolethoen
Copy link
Contributor

@nicolethoen nicolethoen commented Feb 26, 2026

What: Closes #12252

Summary by CodeRabbit

  • Refactor

    • Updated component styling to use imported tokens from the token package instead of locally defined constants.
  • Tests

    • Re-enabled two previously skipped tests for term width styling functionality.

@nicolethoen nicolethoen requested a review from a team February 26, 2026 21:49
@coderabbitai
Copy link

coderabbitai bot commented Feb 26, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between f09a199 and 6847039.

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

Walkthrough

Fixes the termWidth prop in the DescriptionList component by replacing a hardcoded CSS constant with an imported token package variable for correct CSS variable naming, and re-enables two previously skipped tests that validate the fix.

Changes

Cohort / File(s) Summary
Bug Fix - CSS Token Import
packages/react-core/src/components/DescriptionList/DescriptionList.tsx
Replaces locally defined cssTermWidth constant with import from token package; updates style assembly to use cssTermWidth.name for correct CSS variable generation instead of malformed hardcoded string.
Test Restoration
packages/react-core/src/components/DescriptionList/__tests__/DescriptionList.test.tsx
Re-enables two previously skipped tests that validate the termWidth style application in DescriptionList component.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~5 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 accurately describes the main change: fixing the DescriptionList component to use the correct CSS token for termWidth.
Linked Issues check ✅ Passed The code changes directly address issue #12252 by replacing the malformed CSS token with the correct one, making the termWidth prop functional as intended.
Out of Scope Changes check ✅ Passed All changes are directly related to fixing the termWidth token issue. Test re-enabling is also in-scope as it validates the fix works correctly.
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
  • Post copyable unit tests in a comment

Tip

Try Coding Plans. Let us write the prompt for your AI agent so you can ship faster (with fewer bugs).
Share your feedback on Discord.


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 Feb 26, 2026

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 - DescriptionList - termWidth prop value is not applied

2 participants