Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add theme management tools #2037

Merged
merged 6 commits into from
Feb 15, 2023
Merged

Conversation

gavinbarron
Copy link
Member

Closes #

PR Type

  • Feature

Description of the changes

Adds a toggle and helper functions to set a fluent web components theme at the page level.

PR checklist

  • Project builds (yarn build) and changes have been tested in at least two supported browsers (Edge + non-Chromium based browser)
  • All public APIs (classes, methods, etc) have been documented following the jsdoc syntax
  • Stories have been added and existing stories have been tested
  • Added appropriate documentation. Docs PR:
  • License header has been added to all new source files (yarn setLicense)
  • Contains NO breaking changes

Other information

adds a new component to allow switching in the ui between light and dark modes
adds a theme toggle to all stories by default
updates developer test page to include toggle
adds helper functions to assist with theme changing using fluentui web components theming tools
@ghost
Copy link

ghost commented Feb 9, 2023

Thank you for creating a Pull Request @gavinbarron.

This is a checklist for the PR reviewer(s) to complete before approving and merging this PR:

  • I have verified a documentation PR has been linked and is approved (or not applicable)
  • I have ran this PR locally and have tested the fix/feature
  • I have verified that stories have been added to storybook (or not applicable)
  • I have tested existing stories in storybook to verify no regression has occured
  • I have tested the solution in at least two browsers (Edge + 1 non-Chromium based browser)

@gavinbarron gavinbarron changed the title Next/dark toggle feat: add theme management tools Feb 9, 2023
@gavinbarron gavinbarron changed the base branch from main to next/fluentui February 9, 2023 21:32
@gavinbarron gavinbarron enabled auto-merge (squash) February 9, 2023 21:40
@github-actions
Copy link

The updated storybook is available here

@sebastienlevert
Copy link
Contributor

As we don't have a "real" capability for now for Teams theme switching... Should we plug in this work in the Teams tab sample? That way we can at least have a sample that show how to integrate both?

@gavinbarron gavinbarron linked an issue Feb 14, 2023 that may be closed by this pull request
@github-actions
Copy link

The updated storybook is available here

@gavinbarron gavinbarron merged commit 9961926 into next/fluentui Feb 15, 2023
@github-actions
Copy link

Code Coverage

Package Line Rate Branch Rate Complexity Health
mgt-components.src.components.mgt-person 50% 42% 0
mgt-components.src.components.mgt-theme-toggle 100% 100% 0
mgt-components.src.components.sub-components.mgt-flyout 28% 12% 0
mgt-components.src.components.sub-components.mgt-spinner 100% 100% 0
mgt-components.src.graph 19% 8% 0
mgt-components.src.styles 90% 57% 0
mgt-components.src.utils 36% 4% 0
mgt-element.src 42% 0% 0
mgt-element.src.components 40% 0% 0
mgt-element.src.mock 53% 45% 0
mgt-element.src.providers 38% 22% 0
mgt-element.src.utils 43% 24% 0
providers.mgt-msal-provider.src 46% 38% 0
Summary 37% (706 / 1904) 20% (227 / 1114) 0

musale pushed a commit that referenced this pull request Feb 21, 2023
* feat: theme toggle control

adds a new component to allow switching in the ui between light and dark modes
adds a theme toggle to all stories by default
updates developer test page to include toggle
adds helper functions to assist with theme changing using fluentui web components theming tools
@gavinbarron gavinbarron deleted the next/dark-toggle branch June 27, 2023 16:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

[Documentation] New component page for mgt-theme-toggle
3 participants