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

refactor(web-components): reduce code duplication in setTheme() #31679

Merged
merged 4 commits into from
Jun 12, 2024

Conversation

marchbox
Copy link
Contributor

@marchbox marchbox commented Jun 12, 2024

Previous Behavior

The same operation (assigning value to document.body.style) is stated multiple times.

New Behavior

Use the existing setThemeFor() function to reduce duplicated code.

@marchbox marchbox requested a review from a team as a code owner June 12, 2024 05:32
@marchbox marchbox changed the title Set theme dry refactor: reduce code duplication for setTheme() Jun 12, 2024
@marchbox marchbox changed the title refactor: reduce code duplication for setTheme() refactor(web-components): reduce code duplication for setTheme() Jun 12, 2024
@marchbox marchbox changed the title refactor(web-components): reduce code duplication for setTheme() refactor(web-components): reduce code duplication in setTheme() Jun 12, 2024
@fabricteam
Copy link
Collaborator

fabricteam commented Jun 12, 2024

📊 Bundle size report

✅ No changes found

Copy link
Contributor

@davatron5000 davatron5000 left a comment

Choose a reason for hiding this comment

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

LGTM. And I like the idea of eventually constructing a stylesheet that gets adopted by the document.

@marchbox marchbox merged commit ef5d226 into microsoft:master Jun 12, 2024
18 checks passed
@marchbox marchbox deleted the set-theme-dry branch June 12, 2024 21:43
miroslavstastny pushed a commit to miroslavstastny/fluentui that referenced this pull request Jun 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants