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] Embed pdfs for onboarding #81

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

kevin3656
Copy link
Collaborator

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

Screenshot 2025-02-28 at 2 58 38 AM

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

@kevin3656 kevin3656 linked an issue Feb 28, 2025 that may be closed by this pull request
@kylezryr kylezryr changed the title feat: Embed pdfs for onboarding [feat] Embed pdfs for onboarding Mar 4, 2025
@kylezryr
Copy link
Collaborator

kylezryr commented Mar 4, 2025

image
the styling looks a little funky on mobile view and is also small on desktop view, perhaps just something to do with the container styles, we'd like it to fill the whole page if possible

Copy link
Collaborator

@kylezryr kylezryr left a 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:

  1. 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
  2. some minor changes to avoid repeated code
  3. fixing lint errors!

great job overall, I know this sprint was a little complex and it's working really well!!

Copy link
Collaborator

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
Copy link
Collaborator

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',
}}
>
Copy link
Collaborator

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 && (
Copy link
Collaborator

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
Copy link
Collaborator

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;
}
}
Copy link
Collaborator

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>
Copy link
Collaborator

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!

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.

Embed Garden Guide PDFs in Onboarding
2 participants