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(v2/end-page-builder-2) edit end page from builder #4047

Merged
merged 21 commits into from
Jul 7, 2022

Conversation

hanstirtaputra
Copy link
Contributor

Builds on #3983

Problem

Second and last part of end page builder PR.

This PR adds the functionality to build the end/thank you page through the form builder

Closes #3361

Solution

Breaking Changes

  • No - this PR is backwards compatible

Before & After Screenshots

Stories for AdminFormPage/Create will reflect the change

@karrui karrui changed the base branch from form-v2/develop to form-v2/feat/end-page-builder-1 June 24, 2022 08:43

interface BuilderDrawerContainerProps {
title: string
content: JSX.Element
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: probably can use react's children prop instead, then we can just inline the content instead of assigning it to the `contenq prop

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Got it, updated to use children prop

@hanstirtaputra hanstirtaputra marked this pull request as draft June 27, 2022 03:26
@hanstirtaputra hanstirtaputra marked this pull request as ready for review June 27, 2022 05:32
Base automatically changed from form-v2/feat/end-page-builder-1 to form-v2/develop June 29, 2022 02:16
@hanstirtaputra hanstirtaputra force-pushed the form-v2/feat/end-page-builder-2 branch from 9e6407b to 191f7ef Compare June 29, 2022 02:34
Comment on lines 179 to 183
{stateData.state === BuildFieldState.EditingEndPage ? (
<EndPageView />
) : (
<FormBuilder placeholderProps={placeholderProps} />
)}
Copy link
Contributor

@karrui karrui Jul 5, 2022

Choose a reason for hiding this comment

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

instead of rendering between end page and builder view, should we just render both and hide them appropriately (by toggling display with display css prop)? This allows for the state and scroll position of either previews to be maintained

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good idea, I've updated the PR to do that, thanks

Copy link
Contributor

@karrui karrui left a comment

Choose a reason for hiding this comment

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

lgtm, please request review from pearly in chromatic next time!

>
<Stack w="100%">
<Flex justifyContent="center" pt="1rem" pb="0.5rem">
<Image src={form?.admin?.agency?.logo ?? ''} h="4rem" />
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: do we need the empty string '' default? src accepts undefined

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oh then we don't need '' default! Removed it

@hanstirtaputra hanstirtaputra merged commit 420142e into form-v2/develop Jul 7, 2022
@hanstirtaputra hanstirtaputra deleted the form-v2/feat/end-page-builder-2 branch July 7, 2022 02:42
@justynoh justynoh mentioned this pull request Oct 5, 2022
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