-
Notifications
You must be signed in to change notification settings - Fork 0
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
204 feature create form template upload pdf page #207
204 feature create form template upload pdf page #207
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
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.
Added some comments + make sure to delete package-lock.json and cd into apps/web
and use yarn add react-dropzone
to add the package. I think package-lock.json shows up when you use npm install
and we only want to use one package manager for the project.
* @param backLink page router will push on click of 'back' | ||
* @param disabled whether the 'save & continue' button should be activated | ||
*/ | ||
export const FormTemButtons = ({ |
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.
Let's name this FormTemplateButtons
for clarity.
import { BlueTriangle, WhiteCheck } from '@web/static/icons'; | ||
import { useRouter } from 'next/router'; | ||
|
||
export const SideCreateForm = ({ curStep }: { curStep: number }) => { |
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.
🔥
apps/web/src/pages/upload.tsx
Outdated
|
||
export default function Upload() { | ||
const router = useRouter(); | ||
const [pdf, setPdf] = useState<string | ArrayBuffer | null>(null); |
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.
You should be able to pull from main (git pull origin main
) and use the useBlob
hook's localBlobData
state and uploadLocalBlob
and clearLocalBlob
functions to do operations regarding storing PDF data in state.
apps/web/src/pages/upload.tsx
Outdated
</Text> | ||
</Flex> | ||
<input | ||
type="file" |
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.
You should also be able to use inputFileRef
from useBlob
here for upload to cloud storage at the end (Review step probably)
Changes to blob: - includes size as a string for form display on upload page - takes a file rather than a change event because dropbox processes change events and gives a list of accepted files
Description
Created an upload page for the first step in form template process. Allows users to browse or drag pdf.
Motivation and Context
Implement redesigns for form template creation flow.
Closes [#204 ]
How has this been tested?
Tried dragging and browsing for files. Upload size and title were correctly saved/displayed. Styles were inspected and spacing matches Figma.
Screenshots (if appropriate):
Not shown in pictures but on the next page, the upload step will display as a blue check mark in the sidebar.
Types of changes
Since this redirects users creating a form template to the start of the new flow, and the other pages are not finished yet, we will not be able to create new templates using this flow until the others are implemented.
The previous modal was not deleted, there are just no links to it right now.
Checklist: