Skip to content

Conversation

@kuahuu
Copy link
Contributor

@kuahuu kuahuu commented Sep 5, 2025

Description

Added support for secondaryText and labelTag properties to ButtonDropdown items, enabling richer item content similar to other Cloudscape components like Select and Multiselect.

This PR also added deprecated annotation for description prop for button dropdown item.

New features:
secondaryText: Displays additional descriptive text below the main item text
labelTag: Adds a visual tag/label to items for categorization or status indication

Implementation details:

  • Extended ButtonDropdownProps.Item interface to include the new properties
  • Updated ItemElement component to render secondary text and label tags
  • Added corresponding styles for proper layout and visual hierarchy
  • Added comprehensive test coverage for the new functionality
  • Add deprecated annotation into the description prop
  • Introduce findSecondaryText and findLabelTag test utils

Related links, issue #, if available: n/a

How has this been tested?

Unit Tests:

  • Added tests in button-dropdown-items.test.tsx for secondaryText rendering
  • Added tests in button-dropdown-keyboard.test.tsx for keyboard navigation with secondaryText
  • All existing ButtonDropdown tests continue to pass

Manual Testing:

  • Verified visual appearance and layout of items with secondaryText and labelTag
  • Tested keyboard navigation and accessibility
  • Confirmed backward compatibility with existing ButtonDropdown usage

Reviewers can test by running:

npm test -- --testPathPattern="button-dropdown"
npm run test:integ -- --testPathPattern="button-dropdown"
Review checklist

The following items are to be evaluated by the author(s) and the reviewer(s).

Correctness

  • Changes include appropriate documentation updates.
  • Changes are backward-compatible if not indicated, see CONTRIBUTING.md.
  • Changes do not include unsupported browser features, see CONTRIBUTING.md.
  • Changes were manually tested for accessibility, see accessibility guidelines.

Security

Testing

  • Changes are covered with new/existing unit tests?
  • Changes are covered with new/existing integration tests?

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@kuahuu kuahuu requested a review from a team as a code owner September 5, 2025 15:40
@kuahuu kuahuu requested review from YueyingLu and removed request for a team September 5, 2025 15:40
@codecov
Copy link

codecov bot commented Sep 10, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 96.99%. Comparing base (abb494e) to head (1764486).
⚠️ Report is 4 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3844   +/-   ##
=======================================
  Coverage   96.99%   96.99%           
=======================================
  Files         861      861           
  Lines       25207    25213    +6     
  Branches     9098     9103    +5     
=======================================
+ Hits        24450    24456    +6     
  Misses        710      710           
  Partials       47       47           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@kuahuu
Copy link
Contributor Author

kuahuu commented Sep 29, 2025

Rebased from the latest origin main and resolve the conflict.

@YueyingLu YueyingLu removed their request for review October 23, 2025 09:00
Kuai Hu added 2 commits November 14, 2025 00:11
pan-kot
pan-kot previously approved these changes Nov 19, 2025
@pan-kot pan-kot dismissed timogasda’s stale review November 19, 2025 12:02

changes applied

@cansuaa cansuaa added this pull request to the merge queue Nov 19, 2025
Merged via the queue into cloudscape-design:main with commit 36c2502 Nov 19, 2025
137 of 139 checks passed
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.

10 participants