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

feat(form-v2/form-instructions-2): pull PublicSwitchEnvMessage into public form wrapper #4323

Merged

Conversation

justynoh
Copy link
Contributor

Problem

The react message currently shows up immediately before the form fields. However, we want this to be at the top of the form, immediately after the header. Moving it into the public form wrapper allows the message, form instructions and form fields to be displayed in the correct order.

Makes progress towards [#4236 ]

Solution

Breaking Changes

  • No - this PR is backwards compatible

@justynoh justynoh requested a review from wanlingt July 26, 2022 02:24
Copy link
Contributor

@wanlingt wanlingt left a comment

Choose a reason for hiding this comment

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

lgtm!

Copy link
Contributor

@timotheeg timotheeg left a comment

Choose a reason for hiding this comment

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

lgtm

<InlineMessage variant="warning" mb="1.5rem" mt={{ base: '2rem', md: '0' }}>
<Text>
You’re filling this form on the new FormSG. If you have trouble
submitting,{' '}
Copy link
Contributor

Choose a reason for hiding this comment

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

Just checking: explicit space wasn't needed?

Copy link
Contributor

Choose a reason for hiding this comment

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

oops that was my bad! I'll change it in my react-to-angular PR since it should apply to both PublicSwitchEnvMessage and AdminSwitchEnvMessage :)

@justynoh justynoh merged commit 30f2000 into form-v2/feat/form-instructions Jul 27, 2022
@justynoh justynoh deleted the form-v2/feat/form-instructions-2 branch July 27, 2022 07:32
justynoh added a commit that referenced this pull request Jul 28, 2022
* feat(form-v2/form-instructions-1): display instructions on public forms, admin builder and preview tool (#4306)

* feat: display instructions on public form

* feat: display instructions in builder and preview.

* feat: pull PublicSwitchEnvMessage into PublicFormWrapper (#4323)

* feat(form-v2/form-instructions-3): pull sidebar out into PublicFormWrapper and add instructions to sections sidebar (#4391)

* feat: pull sidebar out to public form wrapper, update contexts to include instructions if it exists. added story for public form with instructions.

* feat: added stories for preview and admin

* chore: margin update for FormInstructions for mobile compatibility

* feat: update preview form provider with instructions as well.

* fix: add long instructions story, fix nits

* feat: newline rendering for form instructions

* feat: updates to stories
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