-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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: [VAULT-21534 VAULT-21533 VAULT-21536] edit, preview, and delete custom message #24603
Merged
kiannaquach
merged 13 commits into
ui/VAULT-19096/customizable-banners
from
ui/VAULT-21534/edit-custom-message
Dec 22, 2023
Merged
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
0424f10
Working edit
kiannaquach b3d85d8
VAULT-21536 update delete message and create/update flash message
kiannaquach c76a866
VAULT-21533 add preview modal
kiannaquach bb6f3f3
Update serializer
kiannaquach df15780
Preview refinements
kiannaquach b290ac4
Move preview to its own component
kiannaquach e7cc148
Move breadcrumbs to setupController
kiannaquach 7fd1a9f
Add more tests
kiannaquach f05b785
Address some feedback
kiannaquach 058e892
Address more feedback!
kiannaquach 851e057
Update serailizer
kiannaquach 016a3b6
Remove stylesheet
kiannaquach 14d8e0e
Add comment
kiannaquach File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
40 changes: 40 additions & 0 deletions
40
ui/lib/config-ui/addon/components/messages/preview-image.hbs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
{{! | ||
Copyright (c) HashiCorp, Inc. | ||
SPDX-License-Identifier: BUSL-1.1 | ||
~}} | ||
|
||
<Hds::Modal | ||
@onClose={{fn (mut @showMessagePreviewModal) false}} | ||
id="message-alert-preview" | ||
class="is-calc-large-height is-two-thirds-width" | ||
data-test-modal="preview image" | ||
as |M| | ||
> | ||
<M.Body class="is-paddingless is-overflow-hidden"> | ||
<Hds::Alert | ||
@type="page" | ||
@color="warning" | ||
@onDismiss={{fn (mut @showMessagePreviewModal) false}} | ||
class="has-bottom-margin-s" | ||
data-test-alert={{@message.title}} | ||
as |A| | ||
> | ||
<A.Title data-test-alert-title={{@message.title}}>{{@message.title}}</A.Title> | ||
<A.Description data-test-alert-description={{@message.title}}> | ||
{{@message.message}} | ||
{{#if @message.linkHref}} | ||
<Hds::Link::Inline @icon="external-link" @href={{@message.linkHref}}> | ||
{{@message.linkTitle}} | ||
</Hds::Link::Inline> | ||
{{/if}} | ||
</A.Description> | ||
</Hds::Alert> | ||
<img | ||
src={{img-path (if @message.authenticated "~/custom-messages-dashboard.png" "~/custom-messages-login.png")}} | ||
alt={{if @message.authenticated "dashboard page preview" "login page preview"}} | ||
/> | ||
</M.Body> | ||
<M.Footer as |F|> | ||
<Hds::Button @text="Close preview" {{on "click" F.close}} data-test-modal-button="Close" /> | ||
</M.Footer> | ||
</Hds::Modal> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
instead of deleting this here, does it work if you do something above about attributes you do not want to serialize? I ask because it makes it easier to debug later (I'm noticing this in ember data upgrade things) if all attributes removed are listed at the top of the serializer.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll address the link attribute feedback in a different PR :) Ticket to address this feedback is VAULT-22908