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(ui-library): change theming approach #991

Merged
merged 28 commits into from
Apr 19, 2024

Conversation

ChristianHoffmannS2
Copy link
Collaborator

@ChristianHoffmannS2 ChristianHoffmannS2 commented Mar 7, 2024

What is included

  • New css helpers to produce static styles from themed token sets (ThemeIterator)
  • Removal of the old renderThemedCssStrings function
  • A refactor of all existing css definitions to use the new iterator approach
  • Removal of most dynamically inserted style tags in favor of lit's static style class field. See: lit docs

What is not included

  • Code generation to automatically include any new themes defined in tokens studio. Theme names and theme inclusion are hard coded at the moment and need to be changed manually.

Hints for reviewers

All changes are of similar nature. So it's not necessary to check each file meticulously. Reviewers should focus on finding visual deviations in Storybook when compared to the develop branch.

Systematic changes for each component:

  • CSS definitions now always include all styles for all themes. This is facilitated through the use of the new ComponentThemeIterator / SemanticThemeIterator functions.
  • Removal of most dynamically inserted style tags in favor of lit's static style class field. See: lit docs. Exceptions are:
    • form-labels due to missing ShadowRoot
    • range-slider background gradient generation due to dynamic numerical calculations
  • CSS selectors are repeated per iterator type (up to three times, once for: base styles without token values, semantic token iterator, component token iterator). This is to be expected.

Issues found during review (Please add your findings here)

Closes #740

@ChristianHoffmannS2 ChristianHoffmannS2 changed the title Feat/740 change theming approach Feat(ui-library): change theming approach 740 Mar 8, 2024
@ChristianHoffmannS2 ChristianHoffmannS2 linked an issue Mar 8, 2024 that may be closed by this pull request
4 tasks
@ChristianHoffmannS2 ChristianHoffmannS2 changed the title Feat(ui-library): change theming approach 740 Feat(ui-library): change theming approach Mar 8, 2024
@ChristianHoffmannS2 ChristianHoffmannS2 changed the title Feat(ui-library): change theming approach fix(ui-library): change theming approach Mar 8, 2024
@ChristianHoffmannS2 ChristianHoffmannS2 force-pushed the feat/740-change-theming-approach branch 9 times, most recently from b303b65 to c13e0aa Compare March 14, 2024 12:43
thrbnhrtmnn
thrbnhrtmnn previously approved these changes Mar 14, 2024
@thrbnhrtmnn thrbnhrtmnn dismissed their stale review March 14, 2024 14:01

was just a test

@ChristianHoffmannS2 ChristianHoffmannS2 force-pushed the feat/740-change-theming-approach branch from 4b3fbf1 to e7a7a09 Compare March 15, 2024 08:49
@ChristianHoffmannS2 ChristianHoffmannS2 force-pushed the develop branch 2 times, most recently from 358f467 to 99c0c93 Compare March 26, 2024 13:22
@faselbaum faselbaum force-pushed the feat/740-change-theming-approach branch from 8f6d433 to 0b03a68 Compare April 4, 2024 11:44
@faselbaum faselbaum force-pushed the feat/740-change-theming-approach branch 2 times, most recently from 70410c1 to 2d4d613 Compare April 12, 2024 08:10
@faselbaum faselbaum changed the title fix(ui-library): change theming approach refactor(ui-library): change theming approach Apr 12, 2024
@faselbaum faselbaum force-pushed the feat/740-change-theming-approach branch from 333a723 to fd98290 Compare April 12, 2024 12:04
@faselbaum

This comment was marked as resolved.

@faselbaum faselbaum marked this pull request as ready for review April 12, 2024 12:33
@faselbaum faselbaum added 🦹 needs:reviewers (code) The issue or pull request needs additional code reviewers 🦹 needs:reviewers (design) The issue or pull request needs additional design reviewers labels Apr 12, 2024
@faselbaum faselbaum force-pushed the feat/740-change-theming-approach branch from fd98290 to fb60120 Compare April 12, 2024 13:43
@faselbaum faselbaum force-pushed the feat/740-change-theming-approach branch from 4b78cd7 to bdaef69 Compare April 19, 2024 07:49
@faselbaum faselbaum merged commit ccb4e17 into develop Apr 19, 2024
4 of 5 checks passed
@faselbaum faselbaum deleted the feat/740-change-theming-approach branch April 19, 2024 07:51
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.

Theming - refactor current approach
4 participants