Problem/Motivation

There are few disadvantages to keep styles as a sequence in config object. Make them entities instead.

Proposed resolution

In order to achieve that, a few other changes need to happen. This issue will gather all of them, commit-by-commit.

Remaining tasks

Update and migrate paths, as well as the cookie update path, will be provided at the end of the development of this feature.

User interface changes

  • Changed a few translatable strings
  • Removed custom-style and theme-style HTML classes

API changes

  • Removed the $type argument in the styleswitcher_style_load() function

Data model changes

  • Replaced the styleswitcher.custom_styles config with the styleswitcher_style config entities
  • Changed style name property to id

Release notes snippet

...

Comments

pingwin4eg created an issue. See original summary.

  • pingwin4eg committed 204683c on 3147137-use_config_entities
    Issue #3147137 by pingwin4eg: Make style path optional and allow blank...

  • pingwin4eg committed 9407f41 on 3147137-use_config_entities
    Issue #3147137 by pingwin4eg: Remove default blank style
    

  • pingwin4eg committed 00bb77e on 3147137-use_config_entities
    Issue #3147137 by pingwin4eg: Disallow changing styles machine names
    

  • pingwin4eg committed febaba7 on 3147137-use_config_entities
    Issue #3147137 by pingwin4eg: Replace style name with id and title with...
pingwin4eg’s picture

Issue summary: View changes

  • pingwin4eg committed 9495b66 on 3147137-use_config_entities
    Issue #3147137 by pingwin4eg: Disallow hyphens in style ids in URL
    

  • pingwin4eg committed 00d463d on 3147137-use_config_entities
    Issue #3147137 by pingwin4eg: Drop prefixes in style ids
    
pingwin4eg’s picture

Issue summary: View changes

  • pingwin4eg committed fdb84ca on 3147137-use_config_entities
    Issue #3147137 by pingwin4eg: Refactor tests
    

  • pingwin4eg committed af49d44 on 3147137-use_config_entities
    Issue #3147137 by pingwin4eg: Replace custom styles config with the...
pingwin4eg’s picture

Issue summary: View changes

  • pingwin4eg committed f9ed0f0 on 3147137-use_config_entities
    Issue #3147137 by pingwin4eg: Allow theme-internal CSS files in Style...