-
-
Notifications
You must be signed in to change notification settings - Fork 22
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
#190/show required fields lables on add item page by default #213
#190/show required fields lables on add item page by default #213
Conversation
…ass onImageUploaded instead relates enBloc-org#190
👷 Deploy request for cool-creponne-3e1272 pending review.Visit the deploys page to approve it
|
🤖 meep morp! This PR is now marked as stale because there has been no activity for a while. Please guarantee this is still a relevant PR. |
Removed comment. Thanks Co-authored-by: eliazzo <114364165+eliazzo@users.noreply.github.com>
🤖 meep morp! This PR is now marked as stale because there has been no activity for a while. Please guarantee this is still a relevant PR. |
Hey @AlexVOiceover, |
Hi @nichgalzin and team, I have resolved the conflicts by merging the latest changes from the Thank you! |
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.
Thanks for the update Alex.
Asked to remove an unnecessary file here.
playwright-report/index.html
Outdated
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.
We no longer use Playwright on the code base so I presume this is an old report that got staged. Can you remove this from the PR please?
The comprobation of the mandatory fields on the form and the presence of the image cannot be done in separate react components, that way it will only perform the "outer" component once that the nested one was resolved. setError and isRequired were left on the props for compatibility with other potential components that use this functionality, these should be udpated. |
Closing this PR as the issue has been handed over to another contributor |
Description
Closes #190
The add item form now shows correctly the fields that need to be filled even when an image wasn't attached yet. The previous behaviour was forcing the user to have an image uploaded.
Files changed
app/(dashboard)/add-item/page.tsx
Makes the comprobation of the image being uploaded
components/form/UploadImageInput.tsx
Will pass as a prop a flag to specify if the image was uploaded (onImageUpload)
app/(dashboard)/add-item/pageTypes.ts
This file was created to extend the type PartialItem to include the boolean 'imageUploaded'
UI changes
Tests
Manual tested. Try to create item without image and without some required fields