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-1743 Implement "Request Access" form #499

Merged
merged 14 commits into from
Oct 30, 2024
Merged

CRDCDH-1743 Implement "Request Access" form #499

merged 14 commits into from
Oct 30, 2024

Conversation

amattu2
Copy link
Member

@amattu2 amattu2 commented Oct 17, 2024

Overview

This PR introduces a new feature for external users (User, Submitter, Org Owner) to request a role and/or organization change via their profile.

It also incorporates related DX QoL changes. See details below.

Note

I added a "StyledDialogComponents" folder, but did not migrate any existing dialogs to these prestyled components. If we get related work (bugs/tasks) for the dialogs, we can probably migrate them at that point.

Most of the dialogs have the same general design, with the exception of width and content-specific customizations. If it doesn't make sense to have a centralized set of components, I can remove this folder.

Related note – I left the explicit font specification on the dialog components, if any dialog can appear on the Model Navigator page (eg. CLI Tool dialog), Model Navigator will try to override our default Nunito font.

Warning

This PR has several tests that refuse to pass in CI consistently. I plan to revisit this in #511 as I'm unsure what the root issue is ATM.

Change Details (Specifics)

  • Add a "Request Access" form for certain external user roles to request a specific role and organization assignment
  • Deduplicate the Autocomplete input field styling and create a component for it in the StyledFormComponents folder
  • Add the standard dialog components to a generic folder (similar to StyledFormComponents)
  • Create a new query specifically to fetch organization names, which is heavily cached once fetched

Related Ticket(s)

CRDCDH-1743 (Task)

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

coveralls commented Oct 29, 2024

Pull Request Test Coverage Report for Build 11598672571

Details

  • 52 of 66 (78.79%) changed or added relevant lines in 14 files are covered.
  • 2 unchanged lines in 2 files lost coverage.
  • Overall coverage increased (+0.2%) to 53.681%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/components/AccessRequest/index.tsx 10 11 90.91%
src/components/Questionnaire/CustomAutocomplete.tsx 1 3 33.33%
src/content/users/ProfileView.tsx 0 4 0.0%
src/components/AccessRequest/FormDialog.tsx 28 35 80.0%
Files with Coverage Reduction New Missed Lines %
src/content/users/ProfileView.tsx 1 0.0%
src/components/Questionnaire/CustomAutocomplete.tsx 1 3.88%
Totals Coverage Status
Change from base Build 11597267637: 0.2%
Covered Lines: 3692
Relevant Lines: 6382

💛 - Coveralls

@amattu2
Copy link
Member Author

amattu2 commented Oct 29, 2024

NOTE: The additional input field has a false-positive 508 issue. This is the same issue that is described here #510. However, because this field does need to be multi-line, I can't find a solution for it.

Screenshot 2024-10-29 at 3 17 21 PM

@amattu2 amattu2 marked this pull request as ready for review October 29, 2024 19:50
@amattu2 amattu2 removed the 🚧 Do Not Merge This PR is not ready for merging label Oct 29, 2024
@amattu2 amattu2 mentioned this pull request Oct 29, 2024
Alejandro-Vega
Alejandro-Vega previously approved these changes Oct 30, 2024
Copy link
Collaborator

@Alejandro-Vega Alejandro-Vega left a comment

Choose a reason for hiding this comment

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

Everything LGTM! I like the centralized styled components for the dialog. Thanks for adding that. I don't have any actual requested changes, just some comments.

src/components/AccessRequest/FormDialog.tsx Show resolved Hide resolved
src/components/HistoryDialog/index.test.tsx Show resolved Hide resolved
@amattu2
Copy link
Member Author

amattu2 commented Oct 30, 2024

Skipping re-review, a merge commit dismissed the previous approval.

@amattu2 amattu2 merged commit b6281e2 into 3.1.0 Oct 30, 2024
7 checks passed
@amattu2 amattu2 deleted the CRDCDH-1743 branch October 30, 2024 17:44
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