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: use admin-ui-components repo for Empty component … #51425

Conversation

dhartunian
Copy link
Collaborator

We are transitioning the Empty component dependency to the
admin-ui-components repo. In the long run, all components
shared between Admin UI and CockroachCloud will be extracted
in this manner.

Also removed an unused Drawer component that was a candidate
for extraction.

Depends on cockroachdb/yarn-vendored#24

Resolves #51382

@dhartunian dhartunian requested a review from a team July 14, 2020 19:04
@cockroach-teamcity
Copy link
Member

This change is Reviewable

@dhartunian dhartunian force-pushed the davidh-use-admin-ui-components-repo branch from ffb6ef9 to ae109fd Compare July 14, 2020 20:54
This component is no longer used as part of the `SortableTable`. We always link
to a detail page instead of showing a "drawer" view for a table row.

Release note: None
@dhartunian dhartunian force-pushed the davidh-use-admin-ui-components-repo branch from ae109fd to 957aa8d Compare July 14, 2020 21:33
@dhartunian dhartunian requested a review from koorosh July 14, 2020 21:33
Copy link
Collaborator

@koorosh koorosh left a comment

Choose a reason for hiding this comment

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

Everything looks great! But one test uses CSS selectors which still rely on styles that were extracted
with Empty component. Probably it fails because class names are hashed and we cannot rely on
them anymore.
pkg/ui/src/views/statements/diagnostics/diagnosticsView.spec.tsx LINE 56
There is an example of the selector which doesn't; rely on class names.

const activateButtonComponent = wrapper.findWhere(p => p.type() === "button" && p.text() === "Activate").first();

@dhartunian
Copy link
Collaborator Author

@koorosh what do you think of switching to react-testing-library? seems like the problem it's meant to solve if we want to stop relying on classnames in tests.

We are transitioning the `Empty` component dependency to the
`admin-ui-components` repo. In the long run, all components
shared between Admin UI and CockroachCloud will be extracted
in this manner.

Depends on cockroachdb/yarn-vendored#24

Resolves cockroachdb#51382

Release note: None
@dhartunian dhartunian force-pushed the davidh-use-admin-ui-components-repo branch from 957aa8d to 15232be Compare July 16, 2020 17:51
@dpulls
Copy link

dpulls bot commented Jul 16, 2020

🎉 All dependencies have been resolved !

@dhartunian dhartunian requested a review from koorosh July 16, 2020 17:51
@koorosh
Copy link
Collaborator

koorosh commented Jul 17, 2020

@koorosh what do you think of switching to react-testing-library? seems like the problem it's meant to solve if we want to stop relying on classnames in tests.

It's reasonable to me. Let's switch to it! As I see, it is supposed to be the default testing tool for UI projects (cockroachdb/ui#49)

@dhartunian
Copy link
Collaborator Author

sweet, I'll give it a shot today!

@dhartunian dhartunian closed this Nov 30, 2020
@dhartunian dhartunian deleted the davidh-use-admin-ui-components-repo branch November 30, 2020 23:25
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.

ui: Integrate admin-ui-components package into Admin UI through use of Empty component
3 participants