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

337 multiple values field type #351

Merged
merged 23 commits into from
Apr 16, 2024
Merged

Conversation

ekraffmiller
Copy link
Contributor

@ekraffmiller ekraffmiller commented Mar 21, 2024

What this PR does / why we need it:

Hard-coded version of multiple metadata values input, to be modified for the dynamic Create Dataset form

Which issue(s) this PR closes:

Special notes for your reviewer:

Suggestions on how to test this:

Does this PR introduce a user interface change? If mockups are available, please link/include them here:

Is there a release notes update needed for this change?:

Additional documentation:

@ekraffmiller ekraffmiller changed the base branch from develop to feature/316-create-functional-create-dataset-form March 21, 2024 11:48
@coveralls
Copy link

coveralls commented Mar 21, 2024

Coverage Status

coverage: 97.324% (-0.4%) from 97.694%
when pulling 8191241 on 337-multiple-values-field-type
into 3aa4685 on develop.

@ekraffmiller ekraffmiller marked this pull request as ready for review March 25, 2024 13:00
@ekraffmiller ekraffmiller added pm.GREI-d-2.7.1 NIH, yr2, aim7, task1: R&D UI modules for creating datasets and supporting publishing workflows pm.GREI-d-2.7.2 NIH, yr2, aim7, task2: Implement UI modules for creating datasets and publishing workflows Size: 3 A percentage of a sprint. 2.1 hours. SPA: Create Dataset Form labels Mar 25, 2024
Base automatically changed from feature/316-create-functional-create-dataset-form to develop March 28, 2024 10:42
@MellyGray MellyGray self-assigned this Apr 2, 2024
Copy link
Contributor

@MellyGray MellyGray left a comment

Choose a reason for hiding this comment

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

Looks good 🎉

I've just added a few suggestions for minor improvements.

Also, should we remove the dynamic field from the design system?

@MellyGray MellyGray assigned ekraffmiller and unassigned MellyGray Apr 2, 2024
@ekraffmiller
Copy link
Contributor Author

Thanks @MellyGray I made the changes you suggested. The e2e test is currently failing on get total dataset counts, which the clear test data PR should fix.

MellyGray
MellyGray previously approved these changes Apr 4, 2024
Copy link
Contributor

@MellyGray MellyGray left a comment

Choose a reason for hiding this comment

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

LGTM!

@MellyGray MellyGray removed their assignment Apr 4, 2024
@GPortas GPortas self-assigned this Apr 10, 2024
Copy link
Contributor

@GPortas GPortas left a comment

Choose a reason for hiding this comment

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

There is a failing e2e test. I'm not sure if this is a known error with an associated issue to fix it or if the error was introduced in this PR.

e2eeerrr

I have tested the create dataset form with the new multiple field in storybook and it looks good! But I have found some issues.

multiplefields.mov
  1. After the initial load, why is it the only field that appears with a red border, if the others are also required?

  2. After clicking the "add" button, to add one more author name, the other required fields show their red border.

  3. I've been playing with "add" and "delete" buttons. You can see how after removing the second author name when we have three authors, the form is automatically submitted.

@GPortas GPortas assigned ekraffmiller and unassigned GPortas Apr 11, 2024
@ekraffmiller
Copy link
Contributor Author

ekraffmiller commented Apr 12, 2024

Thanks @GPortas for finding that form submission bug! I fixed that, and updated the validation to use the same hook as the other fields, so now I think the behavior is consistent with the rest of the form. There is one small issue where if you add an author field, but keep it blank, the validation doesn't flag it, but I think that's ok because it is requiring at least one author, and also the validation will be changed when it is added to the dynamic fields version of the form.

The e2e tests are failing because of race conditions when clearing test data, which I think will be fixed by this PR #360

@ekraffmiller ekraffmiller assigned GPortas and unassigned ekraffmiller Apr 12, 2024
Copy link
Contributor

@GPortas GPortas left a comment

Choose a reason for hiding this comment

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

Thanks for the addressed changes, @ekraffmiller

Maybe the following issues are not very relevant now because the field validation is going to change soon. Possibly not to address in this PR, but at least to keep in mind. Please let me know what you think:

The second author field does not show a required field message if it is left blank, anyway if we add a third author field and then remove it and leave the second blank, the required field message appears (I reproduce this in the recording below).

createdatasetformauthorfield.mov

if you add an author field, but keep it blank, the validation doesn't flag it, but I think that's ok because it is requiring at least one author

In JSF, if you add a multiple field that is required and leave it blank, the required field message is displayed. I think we should replicate this.

jsfauthors

@ekraffmiller ekraffmiller assigned GPortas and unassigned ekraffmiller Apr 15, 2024
@GPortas GPortas merged commit dd47171 into develop Apr 16, 2024
14 checks passed
@GPortas GPortas deleted the 337-multiple-values-field-type branch April 16, 2024 10:42
jayanthkomarraju pushed a commit to jayanthkomarraju/dataverse-frontend that referenced this pull request May 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pm.GREI-d-2.7.1 NIH, yr2, aim7, task1: R&D UI modules for creating datasets and supporting publishing workflows pm.GREI-d-2.7.2 NIH, yr2, aim7, task2: Implement UI modules for creating datasets and publishing workflows Size: 3 A percentage of a sprint. 2.1 hours. SPA: Create Dataset Form
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Convert fields from the Create Dataset Form to multiple values field type
4 participants