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: HDS adoption replace Breadcrumbs #24387

Merged
merged 39 commits into from
Dec 6, 2023

Conversation

hellobontempo
Copy link
Contributor

Replaces our old breadcrumb styles with the Hds::Breadcrumb component. Where possible, also updated breadcrumbs to be more accurate

current

Screenshot 2023-12-05 at 3 24 18 PM

before

Screenshot 2023-12-05 at 3 24 06 PM

@hellobontempo hellobontempo added this to the 1.16.0-rc1 milestone Dec 5, 2023
@github-actions github-actions bot added the hashicorp-contributed-pr If the PR is HashiCorp (i.e. not-community) contributed label Dec 5, 2023
</li>
</ul>
</nav>
<Hds::ButtonSet>
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Screenshot 2023-12-05 at 1 15 57 PM

@@ -53,9 +53,6 @@
a,
.link,
a:not(.button):not(.file-delete-button):not(.tag) {
color: $blue;
Copy link
Contributor Author

@hellobontempo hellobontempo Dec 5, 2023

Choose a reason for hiding this comment

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

Removing so styling properly applies to HDS elements yielded to empty state. Removing these styles also more closely align our existing empty state LinkTo elements to their HDS counterparts
Screenshot 2023-12-05 at 1 15 57 PM

@@ -26,7 +26,7 @@
}

.title {
margin-top: $spacing-36;
margin-top: $spacing-16;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Until we replace this component, reducing to match the gap: 16 that the HDS page header uses

<Hds::Breadcrumb>
Copy link
Contributor Author

@hellobontempo hellobontempo Dec 5, 2023

Choose a reason for hiding this comment

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

This component should ultimately be replaced since all of the getters are overly robust and every instance I spot checked only rendered a single breadcrumb.

However, replacing felt outside the scope of this PR. As a stop-gap I replaced instances of this component that just yielded breadcrumbs and in this file just updated the stying

Copy link

github-actions bot commented Dec 5, 2023

Build Results:
All builds succeeded! ✅

@@ -33,18 +31,11 @@
@bottomBorder={{true}}
@message={{@model.errorMessage}}
>
<nav class="breadcrumb" aria-label="help breadcrumb">
Copy link
Contributor Author

@hellobontempo hellobontempo Dec 6, 2023

Choose a reason for hiding this comment

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

See screenshot above for before + after - shouldn't have been breadcrumbs to begin with

@route="vault.cluster.secrets.backend.overview"
@model={{@backendPath}}
/>
<Hds::Breadcrumb::Item @text={{@roleName}} @current={{true}} />
Copy link
Contributor Author

@hellobontempo hellobontempo Dec 6, 2023

Choose a reason for hiding this comment

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

In places where it made sense, I added a @current breadcrumb that matches the h1 tag

@@ -5,16 +5,10 @@

<PageHeader as |p|>
<p.top>
<KeyValueHeader @path="vault.cluster.access.methods">
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I replaced KeyValueHeader components that yielded breadcrumbs, but left self-closing KeyValueHeader components and updated the hbs file

Copy link
Contributor Author

Choose a reason for hiding this comment

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

made typescript

@@ -5,16 +5,14 @@

<PageHeader as |p|>
<p.top>
<nav class="breadcrumb" aria-label="breadcrumbs">
Copy link
Contributor Author

Choose a reason for hiding this comment

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

before + after
Screenshot 2023-12-05 at 7 43 47 PM

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Screenshot 2023-12-05 at 7 46 23 PM

Copy link
Contributor

Choose a reason for hiding this comment

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

🎉

</nav>
<Hds::Breadcrumb>
<Hds::Breadcrumb::Item @text="Methods" @route="vault.cluster.access.mfa.methods.index" />
<Hds::Breadcrumb::Item @text="Configure MFA Method" @current={{true}} />
Copy link
Contributor

Choose a reason for hiding this comment

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

It appears (ex: Auth methods) we're not title casing the Breadcrumbs text (e.g. Auth Methods vs Auth methods). So here, should it be "Configure MFA method"?

@icon="learn-link"
@iconPosition="trailing"
@color="secondary"
@text="Disaster recovery tutorial"
Copy link
Contributor

Choose a reason for hiding this comment

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

so much better than "Need help?"

@models={{breadcrumb.models}}
@query={{breadcrumb.query}}
@isRouteExternal={{breadcrumb.linkExternal}}
Copy link
Contributor

Choose a reason for hiding this comment

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

thank you for the comment!

Copy link
Contributor

Choose a reason for hiding this comment

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

way to typescript this! It does help to see the types for params.

Copy link
Contributor

@Monkeychip Monkeychip left a comment

Choose a reason for hiding this comment

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

Really great work. Very detailed and lots of small cleanup along the way. Thank you!

@hellobontempo hellobontempo merged commit 3403203 into main Dec 6, 2023
@hellobontempo hellobontempo deleted the ui/VAULT-17309/hds-adoption-replace-breadcrumbs branch December 6, 2023 18:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hashicorp-contributed-pr If the PR is HashiCorp (i.e. not-community) contributed ui
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants