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

fix: correcting submission button bug for MRF #7232

Merged
merged 2 commits into from
Apr 3, 2024

Conversation

kathleenkhy
Copy link
Contributor

@kathleenkhy kathleenkhy commented Apr 2, 2024

Problem

Previous PR (#7186) to prevent the Submission button from showing for MRF Respondent #2 onwards resulted in a bug (and incident) where users would not be able to access the Admin view of non-payment forms' Thank You page.

The PR was subsequently reverted to undo the problem introduced. (#7231)

Solution

To add the use of Public Form Context to the parent of EndPageBlock (i.e. FormEndPage). The EndPageBlock component is also used in the Admin View (to show as a preview while the Admin use edits the form), resulting in an error because the component that is public-form is also rendered in admin-form.

Breaking Changes

  • No - this PR is backwards compatible

Tests

  • Create a non-payment form
  • Proceed to the Thank You page tab

MRF Form test

  • Create an MRF form
  • Create 2 workflows
  • Submit the 1st workflow - the Submit another response button should be present
  • Submit the 2nd workflow - the Submit another response button should not be present

@KenLSM
Copy link
Contributor

KenLSM commented Apr 2, 2024

We should also refactor frontend/src/features/public-form/components/FormEndPage/components/EndPageBlock.tsx out of public-form and place it in a generic component folder, rather than one that implies it’s solely used for public-form i.e., possessing PublicFormContext.

It’s not very idiomatic and I can see myself getting conned by this gotcha.

@justynoh justynoh changed the base branch from develop to release-al2 April 3, 2024 02:11
Copy link
Contributor

@KenLSM KenLSM left a comment

Choose a reason for hiding this comment

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

LGTM!

@KenLSM KenLSM merged commit bcd965d into release-al2 Apr 3, 2024
33 checks passed
@KenLSM KenLSM deleted the fix/mrf-submission-button branch April 3, 2024 04:23
@KenLSM KenLSM mentioned this pull request Apr 3, 2024
26 tasks
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.

None yet

3 participants