web: added theme-redesign toggles to Storybook and web-app
Created by: valerybugakov
Changes
- Added
useRedesignToggle
hooks which controlsisRedesignEnabled
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.
- Added redesign-theme toggle to the Storybook toolbar via custom Storybook addon.
- 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.
PageSelector
duplication is for illustration only and is not included in this PR
Closes #19653.