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: [VAULT-21534 VAULT-21533 VAULT-21536] edit, preview, and delete custom message #24603

Conversation

kiannaquach
Copy link
Contributor

@kiannaquach kiannaquach commented Dec 20, 2023

Description
custom-messages

Banner dashboard preview:
Screenshot 2023-12-20 at 2 26 53 PM
Banner login preview:
Screenshot 2023-12-20 at 2 27 00 PM
Modal preview:
Screenshot 2023-12-20 at 2 27 10 PM

Things tackled in this PR:

  • VAULT-21534 update edit to prepropulate the form
  • VAULT-21533 clicking on preview in create and edit form opens a preview modal
  • VAULT-21536 enable delete message

Notes:
The preview differs slightly from the designs. Instead of developing a new Preview::Image component, we utilize the HDS::Modal component with slight adjustments to the height and width.

@kiannaquach kiannaquach added this to the 1.16.0-rc1 milestone Dec 20, 2023
@github-actions github-actions bot added the hashicorp-contributed-pr If the PR is HashiCorp (i.e. not-community) contributed label Dec 20, 2023
@kiannaquach kiannaquach changed the title UI: [VAULT-21534] edit custom message UI: [VAULT-21534 VAULT-21533 VAULT-21536] edit, preview, and delete custom message Dec 20, 2023
@kiannaquach kiannaquach marked this pull request as ready for review December 20, 2023 22:28
Copy link

Build Results:
All builds succeeded! ✅

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.

In progress review. But I wanted to send these comments as I probably wont get back to this until tmrw.

link_title: payload.data.link.title,
link_href: payload.data.link.href,
};
delete transformed.link;
Copy link
Contributor

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.

Copy link
Contributor

Choose a reason for hiding this comment

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

 attrs = {
    link: { serialize: false },
  };

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'll address the link attribute feedback in a different PR :) Ticket to address this feedback is VAULT-22908

ui/app/serializers/config-ui/message.js Outdated Show resolved Hide resolved
ui/app/serializers/config-ui/message.js Outdated Show resolved Hide resolved
ui/app/styles/components/messages-preview-image.scss Outdated Show resolved Hide resolved
ui/app/styles/helper-classes/layout.scss Outdated Show resolved Hide resolved
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.

Great work! Thanks for pairing with me through some of the questions.

@kiannaquach kiannaquach merged commit e3e9f7c into ui/VAULT-19096/customizable-banners Dec 22, 2023
63 checks passed
@kiannaquach kiannaquach deleted the ui/VAULT-21534/edit-custom-message branch December 22, 2023 15:24
kiannaquach added a commit that referenced this pull request Jan 23, 2024
* UI: [VAULT-21521] Initial config-ui engine and routes set up (#23922)

* UI: [VAULT-21526] Create adapter, serializer, and model files (#23947)

* UI: [VAULT-21588] Add Custom Messages to the sidebar (#23946)

* UI: [VAULT-21527] Mirage setup (#24000)

* UI: [VAULT-21530] Custom Messages List View w/ Pagination and LazyPaginatedQuery (#24133)

* UI: Add list to adapter query param (#24187)

* UI: [VAULT-21532] Create message (#24407)

* WIP create message

* Add breadcrumns

* Create and edit form

* Add save to create/edit form

* Add cancel and todo

* Fix cancel route

* Fix breadcrumb label to be title case

* add start time logic

* Update breadcrumb

* Fix breadcrumbs and merge conflict test

* Update create form description

* Fix sidenav so it always highlights

* Fix up forms

* Mostly working create form

* Form cleanup

* Fix link title and href form fields

* Default startTime

* Fix messages

* Update dropdown to use the updated ConfirmAction component

* Update create and edit form

* Add wip tests

* Fix breadcrumb formatter

* Comment out test

* Update create message test

* Update more tests

* Add comment for fixing date on edit

* Update Message form

* Code cleanup!

* Add validation tests

* Remove authenticated from route model

* SOme more code cleanup

* Add controller so authenticated is parsed

* Working radio buttons

* Use an object instead of arrays

* Wip date form

* Fix license headers

* Fix license headers addition of files

* Fix copyright format issues and clean up code

* Fix tests

* Rename FormField radio getter and ay11 improvements

* Address feedback

* Fix specific date so it remembers the values

* Address feedback!

* Update more form fields

* Use formfield action instead

* Update to every

* Update syntax of onchange

* Fix tests

* Update willDestroy so it doesnt break tests

* Remove set and brodcast datetimelocal

* Put FormField back the way it was in favor of putting FormField to a seperate PR

* Remove getter in formfield component file

* Address more feedback

* Put back test

* Update datetime string format var name and location

* UI: [VAULT-21534 VAULT-21533 VAULT-21536] edit, preview, and delete custom message (#24603)

* Working edit

* VAULT-21536 update delete message and create/update flash message

* VAULT-21533 add preview modal

* Update serializer

* Preview refinements

* Move preview to its own component

* Move breadcrumbs to setupController

* Add more tests

* Address some feedback

* Address more feedback!

* Update serailizer

* Remove stylesheet

* Add comment

* UI: [VAULT-21435] Message details (#24645)

* WIP

* Fix timezone bug

* Fix date issues on create/edit form

* Add details screen

* Use allFields instead of formFields

* Fix tests

* Address comments!

* UI: VAULT-21538 unauth endpoint message display (#24665)

* WIP unauth display

* Add modal custom message

* Close multiple modals

* Update todo with ticket number

* On init make custom message request

* Use serializer

* Update fetchMessages

* Add copyright headers

* Add services and serializers

* Send null instead of empty strings

* Fix tests!

* Add copywrite headers

* Add some acceptance tests

* Test cleanup

* Put tests back

* pass hooks to module

* Move module out

* Seperate tests

* Copywrite

* Add aria-prohibited-attr runList options

* Code cleanup

* Add date-time-local transform

* Add copyright headers

* Remove comments

* Remove date transform stuff for now!

* Put getISODateFormat back into the serailize function

* UI: Date time local transform (#24694)

* Date time local

* Add deserialize

* Add copyright header

* check if date exists

* Use parseISO for date strings since datefns requires this in new update

* Update tests

* Ensure we cehck for an ISOString

* Add checks so tests wont fail

* Update parseISO

* Address feedback

* UI: multiple banner message on create and edit form (#24742)

* WIP multiple banner message on create and edit form

* Fix tests

* Put checks back

* Add try/catch to query

* Fix breadcrumbs

* Add page size to pagination

* Add multiple modal message tests

* Address feedback

* Check for valid form first

* Add extra checks

* Address feedback

* Move getter to the route

* Fix tests!

* Address more feedback

* Use still when cancelling

* Update multiple banner modal

* Fix tests

* Set user confirmation to empty string

* UI: VAULT-21539 auth messages display (#24842)

* WIP auth message display

* Move block to show only when authenticated

* VAULT-22046 working search by name

* Some code clean up

* Fix merge conflict

* Add tests

* Fetch messages again after creation

* UI: [VAULT-22908] Update kv object editor, add max number of messages reached modal, small improvements (#24918)

* Update kv object editor to only use a single row

* continute using kv editype

* Fix failing dashboard tests!

* Fix failing test on sidebranch

* Fix tests and update validations

* Add optional tag

* Address feedback

* Add documentation

* Clear messages when logging out

* Fix tests!

* Add 100 message limit modal

* Add max message modal test

* Do more checks!

* Pair with Claire on the refactor of validator!

* Only show validationerror for multiple rows

* Update pageSize to 100 since when paginations are active it causes accessbility errors

* Fix tests!

* Add links to test

* Make banners dismissable

* Add cancel button

* Address feedback!

* Update test selectors

* Update validator

* Remove validations check in kvobjecteditor

* Revert validationError in kvobjecteditor template

* Put back if/else statements for link

* Add changelog

* UI: fix link bug and add colors (#24977)

* Fix edit bug and put transform back

* Edit badgeColor

* Add tests

* Revert changes to transform

* Edit badge colors

* remove universal object transform

* Update changelog filename

* UI: Add form inline warning (#24986)

* Add form inline warning

* Remove title

* Only show form warning for unauth

* Address feedback!
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 pr/no-changelog ui
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants