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

CRDCDH-1517 Add additional tooltips to Data Submission Dashboard #464

Merged
merged 22 commits into from
Sep 18, 2024

Conversation

Alejandro-Vega
Copy link
Collaborator

@Alejandro-Vega Alejandro-Vega commented Sep 9, 2024

Overview

Added additional tooltips to the Validation control options as well as workflow buttons.

Change Details (Specifics)

  • Created a config file for tooltip static content
  • Refactored the entire submit button logic to be more readable, invert logic so that it decides when to enable button instead of disable, and made it easier to identify which error is causing the button to remain disabled
  • Created config file for submit button conditions. This is used to easily list out all the conditions for the submit button to remain disabled, as well as reasons for an admin override
  • Added required property to ensure some conditions won't be bypassed by the admin override
  • Added ability to provide a tooltip for each of the conditions
  • Assigned tooltips for each of the conditions per requirements

Submit button logic:

Enable submit button conditions: (NOTE: 'Initialized' = not null)

  • Validation should not currently be running (REQUIRED)
  • Metadata and Data File should not have 'New' status (REQUIRED)
  • Submission should not have submission level errors, such as orphaned files (REQUIRED)
  • Metadata validation should be initialized for 'Delete' intention
  • Metadata validation should be initialized for 'Metadata Only' submissions
  • Data file validation should be initialized for 'Metadata and Data Files' submissions
  • Metadata validation should be initialized for 'Metadata and Data Files' submissions
  • There should be no validation errors for metadata or data files

Admin Override submit button conditions: (It cannot override required conditions)

  • Submission has validation errors
  • Submission is missing either metadata or data files for 'Metadata and Data Files' submissions

Related Ticket(s)

CRDCDH-1517

@Alejandro-Vega Alejandro-Vega added the 🚧 Do Not Merge This PR is not ready for merging label Sep 9, 2024
@Alejandro-Vega Alejandro-Vega added this to the 3.1.0 (PMVP-M2) milestone Sep 9, 2024
@coveralls
Copy link
Collaborator

coveralls commented Sep 9, 2024

Pull Request Test Coverage Report for Build 10911450077

Details

  • 52 of 60 (86.67%) changed or added relevant lines in 7 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.2%) to 47.291%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/content/dataSubmissions/DataSubmissionActions.tsx 0 2 0.0%
src/content/dataSubmissions/DataSubmission.tsx 0 6 0.0%
Totals Coverage Status
Change from base Build 10852756507: 0.2%
Covered Lines: 2782
Relevant Lines: 5333

💛 - Coveralls

@coveralls

This comment was marked as outdated.

@Alejandro-Vega Alejandro-Vega marked this pull request as ready for review September 17, 2024 14:11
@Alejandro-Vega Alejandro-Vega removed the 🚧 Do Not Merge This PR is not ready for merging label Sep 17, 2024
Copy link
Member

@amattu2 amattu2 left a comment

Choose a reason for hiding this comment

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

Awesome job with the submit action button refactoring. Extracting the ruleset to a config file will make it much easier in the future to add/edit rules.

I annotated a few suggestions, none of which are critical or show stoppers.

src/content/dataSubmissions/DataSubmission.tsx Outdated Show resolved Hide resolved
src/utils/dataSubmissionUtils.ts Outdated Show resolved Hide resolved
src/components/DataSubmissions/ValidationControls.tsx Outdated Show resolved Hide resolved
src/utils/dataSubmissionUtils.ts Outdated Show resolved Hide resolved
Copy link
Member

@amattu2 amattu2 left a comment

Choose a reason for hiding this comment

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

LGTM! Nice job

@amattu2 amattu2 merged commit cb0d5b7 into 3.1.0 Sep 18, 2024
6 checks passed
@amattu2 amattu2 deleted the CRDCDH-1517 branch September 18, 2024 13:39
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