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

chore: refactor to move endpage block to generic folder #7248

Merged

Conversation

kathleenkhy
Copy link
Contributor

@kathleenkhy kathleenkhy commented Apr 5, 2024

Problem

Related to PR (#7232) to refactor by moving EndPageBlock.tsx file to a generic folder (out of the public-form folder) - this is to reduce confusion that the EndPageBlock.tsx is not entirely isolated to the public-form context and may cause downstream bugs and issues if the component is rendered incorrectly.

Pushing out a new PR since the previous PR is quite behind the develop branch after launching MRF, and local can't run properly even after resolving conflicts.

seems easier to re-do the chore on the new dev branch

Closes FRM-1710

Solution

By moving EndPageBlock.tsx to a generic folder that is not within public-form or admin-form

Tests

  • Create a non-payment form
  • Proceed to the Thank You page tab that it is working as intended
  • Check Preview that the Thank you page is rendered properly
  • Open the form and make a submission - check that the Thank You page is rendered properly
  • Create a payment form
  • Proceed to the Thank You page tab that it is working as intended
  • Check Preview that the Thank you page is rendered properly
  • Open the form and make a submission - check that the Thank You page is rendered properly

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

Copy link

linear bot commented Apr 5, 2024

@kathleenkhy kathleenkhy requested a review from KenLSM April 5, 2024 06:53
import { useAdminForm } from '~features/admin-form/common/queries'
import { PREVIEW_MOCK_UINFIN } from '~features/admin-form/preview/constants'
import { useEnv } from '~features/env/queries'
import { EndPageBlock } from '~features/public-form/components/FormEndPage/components/EndPageBlock'
import { PaymentsThankYouSvgr } from '~features/public-form/components/FormEndPage/components/PaymentsThankYouSvgr'
Copy link
Contributor

@KenLSM KenLSM Apr 5, 2024

Choose a reason for hiding this comment

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

import { ThankYouSvgr } from '~features/public-form/components/FormEndPage/components/ThankYouSvgr'
import { PaymentsThankYouSvgr } from '~features/public-form/components/FormEndPage/components/PaymentsThankYouSvgr'

these two seem to also be likely candidates to move over to the generic folders together?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yup that makes sense! I'll add these 2 Svgr files to the generic components folder FormEndPage too

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! Thanks @kathleenkhy

@kathleenkhy kathleenkhy merged commit 547d6ce into develop Apr 8, 2024
22 checks passed
@kathleenkhy kathleenkhy deleted the chore/refactoring-endpage-block-to-generic-folder branch April 8, 2024 08:07
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.

2 participants