Skip to content

feat: Make button-dropdown renderItem available for all systems#4453

Merged
gethinwebster merged 5 commits intomainfrom
feat/button-dropdown-render-item-all-systems
Apr 22, 2026
Merged

feat: Make button-dropdown renderItem available for all systems#4453
gethinwebster merged 5 commits intomainfrom
feat/button-dropdown-render-item-all-systems

Conversation

@gethinwebster
Copy link
Copy Markdown
Member

@gethinwebster gethinwebster commented Apr 20, 2026

Description

Expose the renderItem prop in all systems.

Also add some new public design tokens that can be used to style custom dropdown item content to match default items.

Related links, issue #, if available: AWSUI-61530

How has this been tested?

Functionality already tested; added new design tokens to dev page.

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.

@gethinwebster gethinwebster force-pushed the feat/button-dropdown-render-item-all-systems branch from 9a1cbcc to 184fdea Compare April 21, 2026 12:56
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 21, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 97.40%. Comparing base (6e3baa4) to head (f1e3c7a).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #4453   +/-   ##
=======================================
  Coverage   97.40%   97.40%           
=======================================
  Files         933      933           
  Lines       29417    29417           
  Branches    10665    10664    -1     
=======================================
  Hits        28653    28653           
- Misses        716      757   +41     
+ Partials       48        7   -41     

☔ 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.

Remove the @awsuiSystem core restriction from the renderItem prop
so that it is available across all Cloudscape systems, not just Core.

This enables consumers on any system to use renderItem for custom
item rendering, such as adding italicized '- New' labels following
the announcing new features pattern.

Relates-to: AWSUI-61530
…ddingHorizontal tokens

Add two new public design tokens for dropdown option item padding:
- spaceOptionPaddingVertical (resolves to spaceXxs / 4px)
- spaceOptionPaddingHorizontal (resolves to spaceL / 20px)

These tokens allow consumers using renderItem to match the default
item padding when providing custom content, enabling patterns like
the 'announcing new features' italic New label.

Updated button-dropdown item-element styles to use the new tokens
via the SCSS constants instead of hardcoded awsui.$space-l.

Relates-to: AWSUI-61530
@gethinwebster gethinwebster force-pushed the feat/button-dropdown-render-item-all-systems branch from ea2c878 to f1e3c7a Compare April 22, 2026 12:41
@gethinwebster gethinwebster changed the title chore: Make button-dropdown renderItem available for all systems feat: Make button-dropdown renderItem available for all systems Apr 22, 2026

// Use for options in dropdowns
$option-padding-vertical: awsui.$space-xxs;
$option-padding-vertical: awsui.$space-option-padding-vertical;
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Nit: since there are now design tokens for these, these two SCSS variables are not really needed

@gethinwebster gethinwebster added this pull request to the merge queue Apr 22, 2026
@github-merge-queue github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Apr 22, 2026
@gethinwebster gethinwebster added this pull request to the merge queue Apr 22, 2026
Merged via the queue into main with commit 3c35678 Apr 22, 2026
50 checks passed
@gethinwebster gethinwebster deleted the feat/button-dropdown-render-item-all-systems branch April 22, 2026 15:15
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.

2 participants