Skip to content

ui: CSS modules for Statements Details page#48090

Merged
craig[bot] merged 6 commits intocockroachdb:masterfrom
koorosh:koorosh/ui-statements-extraction--statements-details
Jun 9, 2020
Merged

ui: CSS modules for Statements Details page#48090
craig[bot] merged 6 commits intocockroachdb:masterfrom
koorosh:koorosh/ui-statements-extraction--statements-details

Conversation

@koorosh
Copy link
Copy Markdown
Contributor

@koorosh koorosh commented Apr 28, 2020

Depends on #48012
Related to #47527

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

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

This change is Reviewable

@koorosh koorosh removed the do-not-merge bors won't merge a PR with this label. label Apr 28, 2020
@blathers-crl
Copy link
Copy Markdown

blathers-crl bot commented Apr 28, 2020

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

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

@koorosh koorosh force-pushed the koorosh/ui-statements-extraction--statements-details branch from aedd9aa to 3e6257a Compare April 28, 2020 14:14
@koorosh koorosh changed the title ui: WIP. CSS modules for Statements Details page ui: CSS modules for Statements Details page Apr 28, 2020
@koorosh koorosh added the do-not-merge bors won't merge a PR with this label. label Apr 28, 2020
@blathers-crl
Copy link
Copy Markdown

blathers-crl bot commented Apr 28, 2020

❌ The GitHub CI (Cockroach) build has failed on 3e6257a3.

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

@koorosh koorosh force-pushed the koorosh/ui-statements-extraction--statements-details branch from 3e6257a to b6040c2 Compare April 29, 2020 13:52
@koorosh koorosh force-pushed the koorosh/ui-statements-extraction--statements-details branch from b6040c2 to ea65295 Compare April 30, 2020 15:22
@blathers-crl
Copy link
Copy Markdown

blathers-crl bot commented May 4, 2020

❌ The GitHub CI (Cockroach) build has failed on 1698c081.

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

@koorosh koorosh force-pushed the koorosh/ui-statements-extraction--statements-details branch 2 times, most recently from 1e37cee to ecba058 Compare June 5, 2020 09:35
@koorosh koorosh removed the do-not-merge bors won't merge a PR with this label. label Jun 5, 2020
@koorosh koorosh marked this pull request as ready for review June 5, 2020 10:33
@koorosh koorosh requested a review from a team June 5, 2020 10:33
@koorosh koorosh force-pushed the koorosh/ui-statements-extraction--statements-details branch from ecba058 to 668623b Compare June 5, 2020 10:38
koorosh added 6 commits June 9, 2020 11:27
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
@koorosh koorosh force-pushed the koorosh/ui-statements-extraction--statements-details branch from 668623b to 87f78ee Compare June 9, 2020 12:29
Copy link
Copy Markdown
Collaborator

@dhartunian dhartunian left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@craig
Copy link
Copy Markdown
Contributor

craig bot commented Jun 9, 2020

Build succeeded

@craig craig bot merged commit 134a25a into cockroachdb:master Jun 9, 2020
craig bot pushed a commit that referenced this pull request Jun 9, 2020
48155: ui: CSS modules for Button component r=koorosh a=koorosh

Depends on #48090
Related to #47527

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

48217: ui: CSS modules for SqlBox components r=koorosh a=koorosh

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

48234: ui: CSS modules for Badge component r=koorosh a=koorosh

Depends on #48217
Related to #47527

Define styles for Badge component as
CSS modules.

Release note: None

Co-authored-by: Andrii Vorobiov <and.vorobiov@gmail.com>
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