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

refactor Pagination component #35

Merged
merged 1 commit into from
Oct 20, 2020
Merged

refactor Pagination component #35

merged 1 commit into from
Oct 20, 2020

Conversation

koorosh
Copy link
Contributor

@koorosh koorosh commented Oct 12, 2020

Relevant to issue cockroachdb/cockroach#54513 (3rd item)

Previously, Pagination component has been created but not used
as a single version for pagination. In addition, Ant design components
were imported right into page views with duplicated styles and it brought
us into situation with multiple versions of almost identical functionality.

This change is a step forward to remove duplicated components and use single
version of pagination component. Along with this, Pagination component is
refactored with respect to latest designs.

ResultsPerPageLabel component is extracted as a standalone component which
displays number of results per paginated view. This functionality is used in
several places so it's a good time to refactor it as well.

@cockroach-teamcity
Copy link
Member

This change is Reviewable

Copy link
Contributor

@nathanstilwell nathanstilwell left a comment

Choose a reason for hiding this comment

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

Reviewed 9 of 9 files at r1.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @koorosh)


src/pagination/pagination.module.scss, line 1 at r1 (raw file):

@import '../core/index.module';

I think we prefer double quotes for imports

Previously, Pagination component has been created but not used
as a single version for pagination. In addition, Ant design components
were imported right into page views with duplicated styles and it brought
us into situation with multiple versions of almost identical functionality.

This change is a step forward to remove duplicated components and use single
version of pagination component. Along with this, `Pagination` component is
refactored with respect to latest designs.

`ResultsPerPageLabel` component is extracted as a standalone component which
displays number of results per paginated view. This functionality is used in
several places so it's a good time to refactor it as well.
@koorosh
Copy link
Contributor Author

koorosh commented Oct 16, 2020

Reviewed 9 of 9 files at r1.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @koorosh)

src/pagination/pagination.module.scss, line 1 at r1 (raw file):

@import '../core/index.module';

I think we prefer double quotes for imports

Done

Copy link
Contributor

@nathanstilwell nathanstilwell left a comment

Choose a reason for hiding this comment

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

Reviewed 2 of 2 files at r2.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved

@koorosh koorosh merged commit e1ff609 into cockroachdb:master Oct 20, 2020
craig bot pushed a commit to cockroachdb/cockroach that referenced this pull request Oct 22, 2020
55499: ui: update styles for session details page r=koorosh a=koorosh

resolves #54513 
depends on cockroachdb/admin-ui-components#31
depends on cockroachdb/admin-ui-components#34
depends on cockroachdb/admin-ui-components#35

Current fix is quite complex and touches a lot of places because most of the issues with styles were common for all pages (Statements, Jobs, Node Overview).
Also many style duplicates required to get rid of duplicates and unify single version of proper components to use across entire app.

It's easier to review this PR per commit. Each commit describes in details what changes were made and their purpose.
 
![Screen Shot 2020-10-13 at 3 18 18 PM](https://user-images.githubusercontent.com/3106437/95859522-690a3000-0d67-11eb-94bb-1cccaac1d816.png)

![Screen Shot 2020-10-13 at 1 43 23 PM](https://user-images.githubusercontent.com/3106437/95856423-a9b37a80-0d62-11eb-8ade-54e8ed5b895c.png)


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