Skip to content

chore: Apply one-theme panel colors#4598

Open
at-susie wants to merge 9 commits into
mainfrom
feat/onet-layout-color
Open

chore: Apply one-theme panel colors#4598
at-susie wants to merge 9 commits into
mainfrom
feat/onet-layout-color

Conversation

@at-susie

Copy link
Copy Markdown
Member

Description

This PR updates panel color and shadow tokens for one-theme.
Adds shadow tokens and panel color support to the one-theme style dictionary, and updates app-layout component styles to use the new tokens.

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

How has this been tested?

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.

@at-susie at-susie marked this pull request as ready for review June 10, 2026 16:40
@at-susie at-susie requested a review from a team as a code owner June 10, 2026 16:40
@at-susie at-susie requested review from jkuelz and jperals and removed request for a team and jperals June 10, 2026 16:40
@codecov

codecov Bot commented Jun 10, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 97.50%. Comparing base (b03b69b) to head (c71835a).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #4598   +/-   ##
=======================================
  Coverage   97.50%   97.50%           
=======================================
  Files         948      948           
  Lines       30275    30275           
  Branches    11039    11039           
=======================================
  Hits        29520    29520           
  Misses        748      748           
  Partials        7        7           

☔ View full report in Codecov by Harness.
📢 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.


&:after {
background-color: awsui.$color-background-layout-toolbar;
background-color: awsui.$color-background-layout-panel;

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.

why are we changing this back to panel? why can't we theme the toolbar token instead? wouldn't decreasing this specificity potentially break experiences that have themed the toolbar token?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Good point — reverted this back to $color-background-layout-toolbar. The toolbar token is already defined and themed separately in app-layout-toolbar.ts, so there's no need to lower the specificity here.


nav.navigation {
background-color: awsui.$color-background-container-content;
background-color: awsui.$color-background-layout-main;

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.

why is this one not color-background-layout-panel too?

@at-susie at-susie Jun 10, 2026

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Updated — but actually went a step further after reflection. Rather than switching to $color-background-layout-panel, we switched all three panel usages (VR navigation, toolbar navigation, toolbar drawer) to $color-background-layout-panel-content instead. The colorBackgroundLayoutPanelContent token's description already covers "side navigation and tools panel content background", which is exactly the right semantic fit here. This avoids introducing colorBackgroundLayoutPanel as a new usage when an existing token already fits.

const tokens: StyleDictionary.ColorsDictionary = {
colorBackgroundLayoutMain: { light: '{colorNeutralGrey50}', dark: '{colorNeutralGrey1000}' },
colorBackgroundLayoutPanel: { light: '{colorNeutralGrey50}', dark: '{colorNeutralGrey1000}' },
colorBackgroundLayoutPanelContent: { light: '{colorNeutralGrey50}', dark: '{colorNeutralGrey1000}' },

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.

is colorBackgroundLayoutPanelContent actually used anywhere? if so, what is the difference between that and colorBackgroundLayoutPanel?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Yes, it's now used — and that's actually the change we made here. We switched all three panel background usages (VR navigation, toolbar navigation, toolbar drawer) from $color-background-layout-panel to $color-background-layout-panel-content, since its description already covers "side navigation and tools panel content background". This means the two tokens are no longer redundant from a usage perspective. We then dropped colorBackgroundLayoutPanel from this context override (since nothing references it anymore) and replaced it with the appropriate colorBackgroundLayoutPanelContent override:

colorBackgroundLayoutPanelContent: { light: '{colorNeutralGrey50}', dark: '{colorNeutralGrey1000}' },

Comment thread style-dictionary/one-theme/colors.ts Outdated
Comment on lines 102 to 104

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.

Not directly related to this PR, but any references to colorIndigo in this file should really be replaced with colorPrimary or colorInfo.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Done — all colorIndigo* references in colors.ts have been replaced with semantic equivalents: colorPrimary* for primary UI actions (controls, focus/selection borders, toggle selection states, slider, progress bar, accent, dropdown filter match) and colorInfo* for info-semantic tokens (status info text, info link colors, info indicator background). Also introduced colorInfo800 in the one-theme palette (#0033cc) to cover the info link hover state.

Comment thread style-dictionary/one-theme/colors.ts Outdated
colorBorderDividerSecondary: { light: '{colorNeutralGrey200}', dark: '{colorNeutralGrey800}' },
colorBorderLayout: { light: '{colorNeutralGrey300}', dark: '{colorNeutralGrey750}' },
colorGapGlobalDrawer: { light: '{colorNeutralGrey250}', dark: '{colorNeutralGrey1000}' },
colorGapGlobalDrawer: { light: '{colorNeutralGrey250}', dark: '#000000' },

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.

you can use {colorBlack} instead of #000000

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Updated to use {colorBlack}.


&.has-open-drawer {
background-color: awsui.$color-background-container-content;
&.one-theme {

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.

Can we move .one-theme to the outmost layer and keep one theme specific styles in that block? I think it makes it easier in the future if everything is defined in one block.

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.

4 participants