-
Notifications
You must be signed in to change notification settings - Fork 2
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] Embed pdfs for onboarding #81
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks great overall, everything is working functionality wise on my end! just a couple of things:
- I know you said there was no styling so just some suggestions of what to style:
a. PDF previous and next buttons
b. adjusting the size of the PDF preview to fit the whole screen, right now its only a small portion of the height
c. adjusting the styling and copy of the PDF screen title to match Figma - some minor changes to avoid repeated code
- fixing lint errors!
great job overall, I know this sprint was a little complex and it's working really well!!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is there a reason this file got deleted? i think it should not be deleted it might break stuff
marginBottom: '8px', | ||
}} | ||
> | ||
Garden Set Up Guide |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could we change this to a H3
and make it say "Learn How to Set Up a [name of user type, e.g. Individual or School] Garden"
padding: '8px 16px', | ||
borderRadius: '8px', | ||
}} | ||
> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we make this div a styled component, e.g. PDFButtonsContainer
so that the code is cleaner?
</div> | ||
</Flex> | ||
<ButtonDiv> | ||
{onBack && ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is there a reason we're checking for onBack
to be true before rendering the back button? would there be any case in which onBack
is false and we don't want to display the back button?
} | ||
} | ||
if (step === 3.5) { | ||
// If user selects "No" for plot, show extra step |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this comment (and the one below) should say something along the lines of "if user is on PDF screen, move them to review screen"
setStep(4); // Go to extra step | ||
return; | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is it possible to swap the order of the if statements to be something like the below just to avoid repeated code?
if (selectedPlot == false) {
if (step === 3) {
//handle here
} else if (step === 3.5) {
//handle here
}
}
//handle if selectedPlot is not false
disabled={currentPage === numPages} | ||
> | ||
Next | ||
</Button> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
note: the PDF previous and next buttons have no styling right now but we'll style them in the future when we have updated designs!
What's new in this PR 🧑🌾
Description
Added pdfs to onboarding flow. when a user indicates they do not have a plot the next page will display a pdf guide with instructions on setting up a garden, according to their user type
Screenshots
How to review
onboarding page.tsx is the main file worked on. Test going through onboarding and check out the different pdfs when you choose different usertype. on web view is better right now, mobile display pdf proportions are off. the buttons at the bottom navigate the pdf pages
Next steps
Styling ! no deisngs for pdf page rn so this sprint just focused on the pdf implementation. also rn the buttons are funky ideally they should be smaller and within the pdf maybe ?
Relevant links
Online sources
Related PRs
CC: @ccatherinetan