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: Update banner and popup alerts #5672

Merged
merged 3 commits into from
Nov 2, 2018
Merged

UI: Update banner and popup alerts #5672

merged 3 commits into from
Nov 2, 2018

Conversation

joshuaogle
Copy link
Contributor

@joshuaogle joshuaogle commented Nov 2, 2018

Warning alert banner:
image


Error alert banner:
image


Success Popup:
image


Full width banner on Unseal
image

@joshuaogle joshuaogle requested a review from a team November 2, 2018 15:38
andaley
andaley previously approved these changes Nov 2, 2018
Copy link
Contributor

@andaley andaley left a comment

Choose a reason for hiding this comment

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

this looks great! it's so nice to see the alert banners as components and i like the way you replaced so many sass values with variables. i had one non-blocking question, but otherwise it looks ready to 🚢 !

@@ -1,3 +1,4 @@
.login-form {
box-shadow: $box-shadow, $box-shadow-high;
overflow: auto;
Copy link
Contributor

Choose a reason for hiding this comment

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

Would this cause scrolling? Just curious what this change was for.

{{/message-in-page}}
<AlertBanner
@type="warning"
@message="{{warning}}"
Copy link
Contributor

Choose a reason for hiding this comment

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

This won't eval the string so we'll end up with "{{warning}}" in the output.

Copy link
Contributor

Choose a reason for hiding this comment

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

nm this is fine - it's HTML in the strings we can't have unless we do {{{message}}} in AlertBanner

<AlertBanner
@type="warning"
@class="is-marginless"
@message="You are creating a new version based on data from Version {{model.selectedVersion.version}}. The current version for {{model.id}} is Version {{model.currentVersion}}."
Copy link
Contributor

Choose a reason for hiding this comment

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

OK, I take it back because it totally works 🤯 - this must be a new thing with angle bracket components, but that's awesome.

@type="warning"
@title="Attention"
@message="This {{model.identityType}} is disabled. All associated tokens cannot be used, but are not revoked."
yieldWithoutColumn
Copy link
Contributor

Choose a reason for hiding this comment

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

I think this should be:

Suggested change
yieldWithoutColumn
@yieldWithoutColumn={{true}}

<div class="message is-{{flash.type}}">
<div class="columns is-mobile is-variable is-1">
<div class="column is-narrow message-icon">
<ICon @glyph="{{get (message-types flash.type) "glyph"}}" @size="20" @excludeIconClass="true" />
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
<ICon @glyph="{{get (message-types flash.type) "glyph"}}" @size="20" @excludeIconClass="true" />
<ICon @glyph="{{get (message-types flash.type) "glyph"}}" @size="20" @excludeIconClass={{true}} />

I think it'll work either way (since it's truthy), but with bools we normally want curlies around them.

Copy link
Contributor

@meirish meirish left a comment

Choose a reason for hiding this comment

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

Nice - these look great 👌. I left a couple of suggestions but they're not major (and I think you can just accept in the UI if you're ready to merge otherwise).

@joshuaogle joshuaogle merged commit a4c6930 into master Nov 2, 2018
@joshuaogle joshuaogle deleted the ui-alerts-update branch November 2, 2018 20:14
@joshuaogle
Copy link
Contributor Author

Thanks! I've got those last couple of properties fixed in my upcoming empty states PR

<h5 class="title is-5 has-text-{{if (eq flash.type 'warning') 'dark-yellow' flash.type}}">
{{get (message-types flash.type) "text"}}
</h5>
<span data-test-flash-message-body=true>
Copy link
Contributor

Choose a reason for hiding this comment

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

Oh ha, didn't catch this one - we use that data-test selector for a lot of the acceptance tests.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oh, oops. I had been trying to use the component here and it's already in there, but I somehow missed including it again after I switched back. Got it fixed in the empty states branch

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