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

Backport the preview and test features to original Form component #1240

Merged

Conversation

dsamojlenko
Copy link
Member

@dsamojlenko dsamojlenko commented Nov 9, 2022

Summary | Résumé

This PR backports some customizations we had made to the Form component for use in the Preview and TestDataDelivery functions of the FormBuilder. We had been maintaining a separate copy of the Form component in order to test, but are now backporting those changes, and updating the references to it.

There are three new props on the Form component:

  • isPreview (optional | boolean) indicates if this is a Preview and if so, disables the Submit button
  • renderSubmit (optional | JSX.Element) if you need to customize around the Submit button (for example, to have a message appear next to it)
  • onSuccess (optional | function) on successful submit, fire a provided action, preventing a full redirect (for TestDataDelivery)

Also added the Introduction and PrivacyPolicy RichText components to the form render as well.

Pull Request Checklist

Please complete the following items in the checklist before you request a review:

  • Have you completely tested the functionality of change introduced in this PR? Is the PR solving the problem it's meant to solve within the scope of the related issue?
  • The PR does not introduce any new issues such as failed tests, console warnings or new bugs.
  • If this PR adds a package have you ensured its licensed correctly and does not add additional security issues?
  • Is the code clean, readable and maintainable? Is it easy to understand and comprehend.
  • Does your code have adequate comprehensible comments? Do new functions have docstrings?
  • Have you modified the change log and updated any relevant documentation?
  • Is there adequate test coverage? Both unit tests and end-to-end tests where applicable?
  • If your PR is touching any UI is it accessible? Have you tested it with a screen reader? Have you tested it with automated testing tools such as axe?

@github-actions
Copy link
Contributor

github-actions bot commented Nov 9, 2022

Copy link
Contributor

@bryan-robitaille bryan-robitaille left a comment

Choose a reason for hiding this comment

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

LGTM

@dsamojlenko dsamojlenko merged commit b59f39a into develop Nov 10, 2022
@dsamojlenko dsamojlenko deleted the feature/merge_preview_features_to_original_form_component branch November 10, 2022 14:59
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