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

[DUOS-1964][risk=no] WIP Add DataAccessGovernance section to Data Submission Form #1747

Closed
wants to merge 27 commits into from

Conversation

connorlbark
Copy link
Contributor

Addresses

https://broadworkbench.atlassian.net/browse/DUOS-1964


Have you read Terra's Contributing Guide lately? If not, do that first.

  • Label PR with a Jira ticket number and include a link to the ticket
  • Label PR with a security risk modifier [no, low, medium, high]
  • PR describes scope of changes
  • Get a minimum of one thumbs worth of review, preferably two if enough team members are available
  • Get PO sign-off for all non-trivial UI or workflow changes
  • Verify all tests go green
  • Test this change deployed correctly and works on dev environment after deployment

@connorlbark connorlbark changed the title [DUOS-1964][risk=no] WIP Add DataAccessGovernance section to Data Submission Form [DUOS-1964][risk=no] Add DataAccessGovernance section to Data Submission Form Aug 16, 2022
@connorlbark connorlbark marked this pull request as ready for review August 16, 2022 13:30
@connorlbark connorlbark requested a review from a team as a code owner August 16, 2022 13:30
@connorlbark connorlbark marked this pull request as draft August 16, 2022 15:05
};

const secondaryGroupHtml = () => {
const fields = findAllSetFields(consentGroup, secondaryConsentFields);
Copy link
Contributor

Choose a reason for hiding this comment

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

Since teh file is kind of long, I'd prefer keeping related variables next to each other! Can we put const secondaryConsentFields declaration above this? (or we can hard code it into the func parameter, since it's not used anywhere else)

} = props;

const primaryGroupHtml = () => {
const field = findFirstSetField(consentGroup, primaryConsentFields);
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we define primaryConsentFields here too?

return setFields;
};

const primaryConsentFields = [
Copy link
Contributor

Choose a reason for hiding this comment

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

Would it be worth converting this into like key:value?

Suggested change
const primaryConsentFields = [
const primaryConsentFields = {
generalResearchUse: 'General Research Use',
...
}

and then when the array value is required, we can keys(primaryConsentFields) to get the array?

{ value: 'Not Determined', label: 'Not Determined' }
];

// const dataLocationOptions = ["AnVIL Workspace", "Terra Workspace", "TDR Location", "Not Determined"]
Copy link
Contributor

Choose a reason for hiding this comment

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

Is there a reason the array didnt work? The options looks pretty similar!

} = props;

const [consentGroup, setConsentGroup] = useState({
...{
Copy link
Contributor

Choose a reason for hiding this comment

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

can we move this variable out with a name to describe it? like defaultConsentGroupValues?

id: idx+'_consentGroupForm'
}, [

div({
Copy link
Contributor

Choose a reason for hiding this comment

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

Are these divs necessary? Can their attributes be put on ConsentGroupSummary?

// name
div({ className: 'form-group' }, [
label({
id: idx+'_consent_group_name_label',
Copy link
Contributor

Choose a reason for hiding this comment

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

nitpick:

Suggested change
id: idx+'_consent_group_name_label',
id: `${idx}_consent_group_name_label`,

className: 'control-label',
style: DataSubmitterStyles.header,
}, ['Consent Group Name*']),
div({ className: '' }, [
Copy link
Contributor

Choose a reason for hiding this comment

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

nit:

Suggested change
div({ className: '' }, [
div([

input({
type: 'text',
style: DataSubmitterStyles.textInput,
name: idx+'_consent_group_name',
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
name: idx+'_consent_group_name',
name: `${idx}_consent_group_name`,

div({ className: '' }, [
input({
type: 'text',
style: DataSubmitterStyles.textInput,
Copy link
Contributor

Choose a reason for hiding this comment

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

Whenever we have these, I always think it's just better to use css, but c'est la vie! :P

If you wanted to migrate these over to using the FormField objects, I dont know how much of these comments are valuable / useful

@connorlbark
Copy link
Contributor Author

@lu-c thank you for all the super helpful feedback!! i will look over this later today & incorporate it all. I agree on all your major points (esp. about preferring CSS). My plan is to migrate all of this over to FormField objects once your PR is merged in, which will I think clean up A LOT of what's not so great in my PR :)

@connorlbark connorlbark changed the title [DUOS-1964][risk=no] Add DataAccessGovernance section to Data Submission Form [DUOS-1964][risk=no] WIP Add DataAccessGovernance section to Data Submission Form Aug 22, 2022
connorlbark and others added 6 commits August 24, 2022 12:48
Co-authored-by: Gregory Rushton <rushtong@users.noreply.github.com>
Co-authored-by: Gregory Rushton <rushtong@users.noreply.github.com>
@connorlbark connorlbark closed this Sep 7, 2022
@connorlbark connorlbark deleted the DUOS-1964 branch September 19, 2022 14:47
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.

2 participants