ui: Add Statements page storybook#47417
Closed
koorosh wants to merge 1 commit intocockroachdb:masterfrom
Closed
Conversation
To test styles isolation for statements page we need storybook which displays entire Statements screen only. To make it work, RouterProvider decorator is added which connects router to dummy (empty) store. `statementsPage.fixture.ts` file contains snapshot of required props for StatementsPage component Release note: None
Member
craig bot
pushed a commit
that referenced
this pull request
May 27, 2020
47484: ui: CSS modules for BarCharts components r=koorosh a=koorosh Depends on: #47417 Depends on: cockroachdb/yarn-vendored#20 Related to: #47527 Current draft is just example for possible styles isolation with CSS modules. It is required to make components self-contained and easy for extraction. Before all css files were loaded into global scope even if file was imported in some particular module. Now it is possible to define styles as before and use old styles without changes, and as a module, to do this - files has to be named as someName.module.styl In webpack config, `style-loader` is defined two times with different file name matchers to be able define style loaders with and without modules. `barCharts` component is a first candidate to try out css modules. - all styles related to `barCharts` are copied(!) to `barCharts.module.styl` file, so in case another component somehow relies on styles defined for barCharts - it won't be affected. Storybook is extended with stories related to `barCharts` Co-authored-by: Andrii Vorobiov <and.vorobiov@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
To test styles isolation for statements page
we need storybook which displays entire
Statements screen only.
To make it work, RouterProvider decorator
is added which connects router to dummy (empty)
store.
statementsPage.fixture.tsfile contains snapshotof required props for StatementsPage component
Release note: None