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

FixCreateForm #378

Merged
merged 5 commits into from
Oct 9, 2023
Merged

FixCreateForm #378

merged 5 commits into from
Oct 9, 2023

Conversation

jordanlesich
Copy link
Collaborator

Description

Fixes blank description issue.

Motivation & context

Users were sometimes not getting description data to the metadata contract. This was a state management issue with the form.

Steps to reproduce.

On the current production build:

  1. Fill out the Create DAO form up to the Artwork section
  2. Instead of filling out the description, click on the text area, then click away. Add some artwork.
  3. Then click back to the description and add it.
  4. Then submit the form.

This should cause the state to stick to the first value that was entered. But not when we try to update that value.

Code review

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist

  • I have done a self-review of my own code
  • Any new and existing tests pass locally with my changes
  • My changes generate no new warnings (lint warnings, console warnings, etc)

@vercel
Copy link

vercel bot commented Oct 1, 2023

@jordanlesich is attempting to deploy a commit to the Nouns Builder Team on Vercel.

A member of the Team first needs to authorize it.

@vercel
Copy link

vercel bot commented Oct 2, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
nouns-builder ✅ Ready (Inspect) Visit Preview Oct 4, 2023 2:01am
testnet-nouns-builder ✅ Ready (Inspect) Visit Preview Oct 4, 2023 2:01am

Copy link
Collaborator

@isaaczaak isaaczaak left a comment

Choose a reason for hiding this comment

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

works on testnet and mainnet

formik={formik}
id={'projectDescription'}
onChange={(e) => {
formik.handleChange(e)
Copy link
Member

@taayyohh taayyohh Oct 4, 2023

Choose a reason for hiding this comment

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

It looks like the pattern established in the other forms is that we update the store in the handleSubmit -- perhaps we should keep that pattern in this file?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

For sure!

inputLabel={'Artwork'}
formik={formik}
id={'artwork'}
onChange={formik.handleChange}
Copy link
Member

Choose a reason for hiding this comment

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

We should be sure to update the store on submit for this field as well -- in the current build you cannot reupload artwork (which has been a known bug) but this PR reveals the issue, would be great to fix this as well

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Just took a little dive on this one.

There's definitely the issue with not being to upload properly, but it looks like there's another issue with the preview (it still sticks to the old artwork preview, even if I upload new files) , which I suspect is why the formValues weren't being to the store in the first place.

Since there are users who are having issues with the description rn, would it be okay if we get this fix in and then fix the Artwork issue on a separate PR? Seems like there's a lot going on under the hood that I'll need to wade through.

Copy link
Collaborator

@isaaczaak isaaczaak Oct 6, 2023

Choose a reason for hiding this comment

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

Just tried again and the entire app crashes for me. I agree with @jordanlesich 's suggestion that we should fix the artwork upload issue in a separate PR.

Copy link
Member

@taayyohh taayyohh left a comment

Choose a reason for hiding this comment

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

looking good, just a few comments

@jordanlesich jordanlesich merged commit e4ce01a into ourzora:main Oct 9, 2023
0 of 3 checks passed
@jordanlesich jordanlesich deleted the fixDescription branch October 9, 2023 16:26
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.

3 participants