Skip to content

Conversation

DRiFTy17
Copy link
Collaborator

@DRiFTy17 DRiFTy17 commented Apr 1, 2025

PR Checklist

Please check if your PR fulfills the following requirements:

  • Tests for the changes have been added/updated: N
  • Docs have been added/updated: Y
  • Does this PR introduce a breaking change? Potential for visual regression, but has migration steps.
  • I have linked any related GitHub issues to be closed when this PR is merged? N

Describe the new behavior?

This change adds a new theme-mode="scoped" API that allows developers to opt-out of the built-in global theme token overrides that are applied to the <forge-app-bar> in favor of two new tokens designed specifically for targeting certain child elements within an app bar:

  • --forge-app-bar-theme-foreground
  • --forge-app-bar-theme-foreground-muted

These two new tokens will not apply to any elements by default, but I have also added a new opt-in theme="app-bar" attribute to the following components that will inherit these new tokens when rendered within an app-bar:

  • <forge-button>
  • <forge-icon-button>
  • <forge-tab-bar>

The following convenience components automatically apply the theme="app-bar" to their internal <forge-icon-button> elements for you (developers should see no change when using these components):

  • <forge-app-bar-menu-button>
  • <forge-app-bar-profile-button>
  • <forge-app-bar-help-button>
  • <forge-app-bar-notification-button>

An example of the problem that this component was facing in regards to auto-theming is demonstrated here:
https://stackblitz.com/edit/forge-v3-app-bar-theming-problem-demo?file=src%2Fcustom-app-bar-component.ts,src%2Fmain.ts

@DRiFTy17 DRiFTy17 added minor Increment the minor version when merged skip-release Preserve the current version when merged labels Apr 1, 2025
@DRiFTy17 DRiFTy17 requested a review from a team as a code owner April 1, 2025 00:42
Copy link

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

Ross-Blakeney
Ross-Blakeney previously approved these changes Apr 1, 2025
nickonometry
nickonometry previously approved these changes Apr 2, 2025
Copy link
Contributor

github-actions bot commented Apr 2, 2025

View Storybook Deployment
pr/tyler-technologies-oss:app-bar-theming-updates

@DRiFTy17 DRiFTy17 merged commit 2c891d6 into main Apr 3, 2025
10 checks passed
@DRiFTy17 DRiFTy17 deleted the app-bar-theming-updates branch April 3, 2025 15:39
Copy link
Contributor

github-actions bot commented Apr 3, 2025

🚀 PR was released in v3.8.0 🚀

@github-actions github-actions bot added the released This issue/pull request has been released. label Apr 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
minor Increment the minor version when merged released This issue/pull request has been released. skip-release Preserve the current version when merged storybook-preview
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants