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

ui: CSS modules for SqlBox components #48217

Merged
merged 9 commits into from
Jun 9, 2020

Conversation

koorosh
Copy link
Collaborator

@koorosh koorosh commented Apr 30, 2020

Depends on #48155
Related to #47527

Refactor following components to use
CSS modules instead of global styles:

  • SqlBox
  • highlight

Note, hljs- classes are 3rd-party
styles which are overriden with custom
styles.

Release note: None

@koorosh koorosh added the do-not-merge bors won't merge a PR with this label. label Apr 30, 2020
@cockroach-teamcity
Copy link
Member

This change is Reviewable

@blathers-crl
Copy link

blathers-crl bot commented Apr 30, 2020

❌ The GitHub CI (Cockroach) build has failed on 4a5cd505.

🦉 Hoot! I am a Blathers, a bot for CockroachDB. My owner is otan.

@koorosh koorosh requested a review from a team June 5, 2020 13:44
@koorosh koorosh removed the do-not-merge bors won't merge a PR with this label. label Jun 5, 2020
This change refactors following components to
use CSS modules instead of styles defined as
global:
- Dropdown
- Search
- PageConfig

Release note: None
Following components are refactored to use CSS modules
 instead of global styles:
- Statement Details page
- Statements Diagnostics components
- Anchor
- Text
- Empty

Before, `Empty` component had styles which override
 Text, and Anchor components. Now, these styles are
 passed via `className` component props and custom
 styles defined by outer component.

Release note: None
Statement Details pages has four tabs which aren't
controlled and it wasn't possible to open particular
tab and render it in storybook. It is also led to
usability issue where selected tab was not preserved
after page refresh.

With current commit:
- selected tab is tracked as search param in URL
- added storybook for Statement Details page for
every tab except Diagnostics tab.
Content of Diagnostics tab is independent connected
view and has to be defined in it's own storybook.

Release note (admin ui change): preserve selected tab in Statement
Details page after reload.
Instead of accessing to CSS modules class names as fields,
`classnames/bind` function is used to bind class names to
hashed names in imported CSS module file.

Release note: None
Following components are refactored to use CSS modules
 instead of global styles:
- Statement Details page
- Statements Diagnostics components
- Anchor
- Text
- Empty

Before, `Empty` component had styles which override
 Text, and Anchor components. Now, these styles are
 passed via `className` component props and custom
 styles defined by outer component.

Release note: None
Before, Button component had styles defined with
own namespacing and now styles are imported as
CSS module.

The main change is separation BackIcon component
which was coupled with Button and the way
custom styles were applied to display button as
a link without highlighting.

- BackIcon is refactored to it's own module with
styles
- custom styles are applied with new Button type
option - `unstyled-link`.

Release note: None
Refactor following components to use
CSS modules instead of global styles:
- SqlBox
- highlight

Note, `hljs-` classes are 3rd-party
styles which are overriden with custom
styles.

Release note: None
@koorosh
Copy link
Collaborator Author

koorosh commented Jun 9, 2020

bors r+

@craig
Copy link
Contributor

craig bot commented Jun 9, 2020

Build succeeded

@craig craig bot merged commit d9ae34b into cockroachdb:master Jun 9, 2020
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.

3 participants