dandi / dandi-archive

DANDI API server and Web app
https://dandiarchive.org
13 stars 10 forks source link

metadata editor: Contributor: URL #1384

Closed bendichter closed 1 year ago

bendichter commented 1 year ago

Once you touch the URL field, it is now required to submit the form. The SAVE ITEM button is inactive if the field is empty.

image
satra commented 1 year ago

it is true that the min length is 1, but it is also a non-required field. i don't see this effect on my editor unless i go in and type something. in that scenario i can click on clear form to get rid of the edit mode and start again.

waxlamp commented 1 year ago

I just tried on mobile, and I don't get the behavior you reported, @bendichter -- my experience matches that of @satra.

However, I think it's a UX bug that typing in a character then treats the URL field as if it's required, and I don't think the workaround of pressing the "clear form" button is adequate (since it may lose the user's work on other fields).

waxlamp commented 1 year ago

@mvandenburgh, @satra: I'm not sure where to fix this behavior. It could be a problem with the schema or with the VJSF rendering of the form against that schema. My gut tells me it's unlikely to be a schema bug because of what you said upthread, @satra.

@mvandenburgh, can you take a quick, diagnostic look into whether there's some issue with VJSF here?

bendichter commented 1 year ago

However, I think it's a UX bug that typing in a character then treats the URL field as if it's required, and I don't think the workaround of pressing the "clear form" button is adequate (since it may lose the user's work on other fields).

Yes, thank you @waxlamp, this was my point. I think it's confusing to restrict submission of a form based on an optional field that is empty, and inconvenient to clear the form in order to fix the issue.

I think this is minor, since it does not strictly prevent users from entering metadata. I just noticed it and wanted to file it as an area for improved UX

satra commented 1 year ago

this is likely an upstream fix. i don't know how closely we are tracking upstream versions of VJSF. we used to do that more closely when we started implementing the meditor.

waxlamp commented 1 year ago

Mike has built a good relationship with the VJSF people, so if there's a fix required on their end, I think he'll be able to navigate that.

mvandenburgh commented 1 year ago

Yeah this seems like a VJSF issue, I'll take a brief look there and see what's going on

this is likely an upstream fix. i don't know how closely we are tracking upstream versions of VJSF. we used to do that more closely when we started implementing the meditor.

afaik, we haven't been tracking upstream versions of VJSF at all since the redesigned meditor was finished. But I'll take a look at the more recent releases first to see if this isn't just a matter of bumping the VJSF version.

mvandenburgh commented 1 year ago

I've confirmed that this is indeed an issue with VJSF itself. Here's a MVCE with the latest version of VJSF https://codepen.io/mvandenburgh/pen/WNjzGdw. I'll file an issue in the VJSF repo. (edit: https://github.com/koumoul-dev/vuetify-jsonschema-form/issues/395)

dandibot commented 1 year ago

:rocket: Issue was released in v0.3.45 :rocket: