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

Allow flash message type to be specified in Form #6546

Merged
merged 1 commit into from
Feb 22, 2024

Conversation

peterhudec
Copy link
Contributor

@peterhudec peterhudec commented Feb 21, 2024

Description of change

Adds an option to Form component to specify the type of the flash message it sets when the form is submitted successfully.

Test instructions

  1. Paste this code snipped somewhere (or tweak an existing form):
     <Form
        // ...
       flashMessage={() => [
         'Heading',
         'Body',
         // The third, optional item in the array denotes the message type
         'info', // info | warning | success | error | muted
       ]}
     >
        {/* ... */}
     </Form>
  2. Submit the form
  3. Verify that the flash message displayed wherever the form might redirect has the color matching the type specified above

Other than that, there should be no noticable change and a ll tests should still be passing.

@peterhudec peterhudec requested a review from a team as a code owner February 21, 2024 15:15
@peterhudec peterhudec force-pushed the form-flash-message-type branch from 202690d to f5f72fb Compare February 21, 2024 15:18
Copy link

cypress bot commented Feb 21, 2024

Passing run #51282 ↗︎

0 26 0 0 Flakiness 0

Details:

Allow flash message type to be specified in Form
Project: data-hub-frontend Commit: ded7548552
Status: Passed Duration: 02:03 💡
Started: Feb 22, 2024 1:30 PM Ended: Feb 22, 2024 1:32 PM

Review all test suite changes for PR #6546 ↗︎

@peterhudec peterhudec force-pushed the form-flash-message-type branch from f5f72fb to ded7548 Compare February 22, 2024 13:25
@peterhudec peterhudec merged commit b4e4d77 into main Feb 22, 2024
16 checks passed
@peterhudec peterhudec deleted the form-flash-message-type branch February 22, 2024 15:24
chopkinsmade pushed a commit that referenced this pull request Feb 22, 2024
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