Skip to content

web: added theme-redesign toggles to Storybook and web-app

Administrator requested to merge vb/redesign-theme into main

Created by: valerybugakov

Changes

  • Added useRedesignToggle hooks which controls isRedesignEnabled flag and persists it into a local storage.
  • Added redesign-theme toggle to user-dropdown in the web app. It's shown only in the development environment.
Screenshot 2021-04-06 at 13 59 42
  • Added redesign-theme toggle to the Storybook toolbar via custom Storybook addon.
Screenshot 2021-04-06 at 13 58 26
  • Added a helper addRedesignVariants that renders a copy of the selected story wrapped into a redesign class next to the initial story. That way, we can screenshot redesigned components in Chromatic and see differences between affected components in one story. It will be easy to remove this extra content from stories after redesign completion. For more significant changes (e.g., component API changed), we can still create a separate story/variant and wrap it into the redesign class.
Screenshot 2021-04-06 at 13 59 12

👆 PageSelector duplication is for illustration only and is not included in this PR

Closes #19653.

Merge request reports

Loading