sul-dlss / happy-heron

Self-Deposit for the Stanford Digital Repository (SDR): H2 is a Rails web application enabling users to deposit scholarly content into SDR

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Implement new version section

justinlittman opened this issue · comments

Currently the version section displays:
image

The new version section should display:
image

For this ticket:

  • The new version section should only be visible when a feature flag is enabled; otherwise, the current version section should be displayed.
  • The form should submit the "What's changed?" value (like the current implementation); for now, the value of the radio buttons can be ignored. In other words, deposit should continue to function as it currently does.

Also, client side validation before deposit should ensure that user has made a selection and provided a "What's changing" value.

@astridu what should the UX be when someone selects an option, then changes their selection? Should it wipe out anything they had in the "What's changing?" box? Or hide that box?

@lwrubel Oooh, good question!
If they switch from Yes to No, then it will disable the upload files section, and anything they added to that section will not be changed. Plus, if they put something in the 'What's changing', it would be nice if we didn't wipe it out so then if they switched back, it was still there. Same with switching from No to Yes. Is that possible? Also, if they did upload files and then switch Yes to No to Yes, then could the files still be there? @amyehodge Are you ok w/this? Happy to huddle if needed.

For this ticket, I'm just working out the Yes/No and version description boxes. If you've got recommendations for the files box, would be great to drop those here: #3505

@astridu This sounds good. I've noted the preference for the file upload section on the other ticket @lwrubel mentioned. Thanks.

What should trigger the client side validation about whether Yes/No and is selected and what's changed is provided? Clicking the deposit/save-draft buttons?

@justinlittman @astridu for the purposes of this ticket, which involves client-side validation of the user version box, where should the error appear if the user does not click on the Yes/No options to create a new version and/or does not provide a message? I can put that error up near those fields, but it may be confusing to the user when they click on the Save as draft / deposit button and nothing seems to happen. This could also be initially implemented as a javascript alert and then later worked into the design.

@lwrubel If the user clicks the Deposit button and there are any errors on the page, the page scrolls back up to where the first error message is. I'm happy to give you a quick demo of how this works currently.

Thanks @amyehodge, I need to figure out how that is implemented to make it work for this box. I think those other validations may not be client-side? Will look.