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: dynamic storefront configuration #1427

Merged
merged 5 commits into from
Jun 1, 2023

Conversation

shauke
Copy link
Collaborator

@shauke shauke commented May 4, 2023

PR Type

[x] Feature

What Is the Current Behavior?

To have several storefronts with different stylings multiple themes are needed that will introduce with growing number build/deployment/development problems.

What Is the New Behavior?

A configurable theme b2c was introduced so only one theme is needed to adapt it via ICM CMS to look different for different storefronts.

Does this PR Introduce a Breaking Change?

[x] Yes

The two standard themes b2b and b2c where refactored in such a way that the b2c theme could be changed into a configurable theme that uses CSS custom properties (CSS variables).
Since SCSS color calculations do not work with CSS custom properties (they need real values instead of var(--corporate-primary)), SCSS functions like darken() and lighten() were removed from the standard Intershop PWA SCSS styling.
Existing projects that do not want to use a configurable theme do not need to apply these changes to their custom styling.

Other Information

AB#85814

@shauke shauke added this to the 4.1 milestone May 4, 2023
@shauke shauke self-assigned this May 4, 2023
@shauke shauke force-pushed the feature/dynamic_storefront_configuration branch 3 times, most recently from 155414f to 37edfdf Compare May 17, 2023 13:18
shauke added a commit that referenced this pull request May 17, 2023
…ble with CSS custom properties (#1427)

* removed 'darken' and 'lighten'
* added Bootstrap overrides that are necessary when working with var color values and the '$primary' and '$secondary' SCSS variable are not necessarily fitting colors
* changed 'b2c' theme to a configurable theme with CSS custom properties that can be dynamically configured via ICM CMS Configuration component
shauke added a commit that referenced this pull request May 17, 2023
…ynamic storefront configuration (#1427)

* configure application and locale specific logos, styling, features, generic JSON (e.g. service token)
* support feature toggle configuration in extra server configuration
* file reference configuration parameter mapper documentation + JSON parsing
* DOMService rename 'setCssVariable' to 'setCssCustomProperty'
* configure additional style definitions or style file reference
* optimization to not redo the extra configuration changes on the client side if they were already done in SSR
* add a feature toggle for 'extraConfiguration'

Co-authored-by: Silke <s.grueber@intershop.de>
Co-authored-by: Stefan Hauke <s.hauke@intershop.de>
shauke added a commit that referenced this pull request May 17, 2023
* provide example CMS configuration mock data
* renamed 'Multiple Themes' guide to 'Themes' guide
* feature toggle documentation + migration note
@shauke shauke force-pushed the feature/dynamic_storefront_configuration branch from 60e33b5 to 5fab401 Compare May 17, 2023 14:45
shauke added a commit that referenced this pull request May 22, 2023
…ynamic storefront configuration (#1427)

* configure application and locale specific logos, styling, features, generic JSON (e.g. service token)
* support feature toggle configuration in extra server configuration
* file reference configuration parameter mapper documentation + JSON parsing
* DOMService rename 'setCssVariable' to 'setCssCustomProperty'
* configure additional style definitions or style file reference
* optimization to not redo the extra configuration changes on the client side if they were already done in SSR
* add a feature toggle for 'extraConfiguration'

Co-authored-by: Silke <s.grueber@intershop.de>
Co-authored-by: Stefan Hauke <s.hauke@intershop.de>
shauke added a commit that referenced this pull request May 22, 2023
* provide example CMS configuration mock data
* renamed 'Multiple Themes' guide to 'Themes' guide
* feature toggle documentation + migration note
@shauke shauke force-pushed the feature/dynamic_storefront_configuration branch from 5fab401 to 1946156 Compare May 22, 2023 07:01
DDurakISH
DDurakISH previously approved these changes May 22, 2023
Copy link

@DDurakISH DDurakISH left a comment

Choose a reason for hiding this comment

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

Looks perfectly fine to me. Works as intended to.

SGrueber added a commit that referenced this pull request May 31, 2023
SGrueber
SGrueber previously approved these changes May 31, 2023
src/app/core/utils/dom/dom.service.ts Outdated Show resolved Hide resolved
src/app/core/utils/dom/dom.service.ts Outdated Show resolved Hide resolved
src/app/core/utils/dom/dom.service.ts Outdated Show resolved Hide resolved
src/app/core/utils/dom/dom.service.ts Outdated Show resolved Hide resolved
SGrueber added a commit that referenced this pull request May 31, 2023
@SGrueber SGrueber force-pushed the feature/dynamic_storefront_configuration branch from 9e09744 to 97ba95d Compare May 31, 2023 10:00
SGrueber
SGrueber previously approved these changes May 31, 2023
@mglatter mglatter force-pushed the feature/dynamic_storefront_configuration branch from 361311c to 2afc0c0 Compare May 31, 2023 13:15
shauke and others added 3 commits June 1, 2023 11:36
* mostly identified by purgeCSS
* preparation for making the 'b2c' theme dynamically customizable with CSS custom properties
…ble with CSS custom properties (#1427)

* removed 'darken' and 'lighten'
* added Bootstrap overrides that are necessary when working with var color values and the '$primary' and '$secondary' SCSS variable are not necessarily fitting colors
* changed 'b2c' theme to a configurable theme with CSS custom properties that can be dynamically configured via ICM CMS Configuration component
…ynamic storefront configuration (#1427)

* configure application and locale specific logos, styling, features, generic JSON (e.g. service token)
* support feature toggle configuration in extra server configuration
* file reference configuration parameter mapper documentation + JSON parsing
* DOMService rename 'setCssVariable' to 'setCssCustomProperty'
* configure additional style definitions or style file reference
* optimization to not redo the extra configuration changes on the client side if they were already done in SSR
* add a feature toggle for 'extraConfiguration'

Co-authored-by: Silke <s.grueber@intershop.de>
Co-authored-by: Stefan Hauke <s.hauke@intershop.de>
shauke and others added 2 commits June 1, 2023 11:46
* provide example CMS configuration mock data
* renamed 'Multiple Themes' guide to 'Themes' guide
* feature toggle documentation + migration note
@shauke shauke force-pushed the feature/dynamic_storefront_configuration branch from 2afc0c0 to a60d8f3 Compare June 1, 2023 09:54
@shauke shauke merged commit 597edc9 into develop Jun 1, 2023
@shauke shauke deleted the feature/dynamic_storefront_configuration branch June 1, 2023 13:23
shauke added a commit that referenced this pull request Jun 1, 2023
…ble with CSS custom properties (#1427)

* removed 'darken' and 'lighten'
* added Bootstrap overrides that are necessary when working with var color values and the '$primary' and '$secondary' SCSS variable are not necessarily fitting colors
* changed 'b2c' theme to a configurable theme with CSS custom properties that can be dynamically configured via ICM CMS Configuration component
shauke added a commit that referenced this pull request Jun 1, 2023
…ynamic storefront configuration (#1427)

* configure application and locale specific logos, styling, features, generic JSON (e.g. service token)
* support feature toggle configuration in extra server configuration
* file reference configuration parameter mapper documentation + JSON parsing
* DOMService rename 'setCssVariable' to 'setCssCustomProperty'
* configure additional style definitions or style file reference
* optimization to not redo the extra configuration changes on the client side if they were already done in SSR
* add a feature toggle for 'extraConfiguration'

Co-authored-by: Silke <s.grueber@intershop.de>
Co-authored-by: Stefan Hauke <s.hauke@intershop.de>
shauke added a commit that referenced this pull request Jun 1, 2023
* provide example CMS configuration mock data
* renamed 'Multiple Themes' guide to 'Themes' guide
* feature toggle documentation + migration note
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