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

#2729: Update Add a Domain Manager page - [ES] #2857

Merged
merged 24 commits into from
Oct 17, 2024

Conversation

erinysong
Copy link
Contributor

@erinysong erinysong commented Sep 26, 2024

Ticket

Resolves #2729

Changes

  • Update Add Domain Manager form so emails cannot be added as an org's domain manager if it is already associated with another org (either as domain manager or invited user).
  • Add breadcrumb to Add Domain Manager page directing user back to Domain Manager page.
  • Edit copy on Add Domain Manager page description.
  • Update fixtures to assign each user only 1 portfolio (as opposed to all portfolios previously).

Context for reviewers

Setup

Testing that users cannot add users who are domain managers/invited to other organizations

Go to getgov-es and set up at least the following items:

  • Turn on the organization feature waffle flag
  • 2 portfolio objects
  • 1 user assigned to the first portfolio and assigned as a domain manager to one of the portfolio's domains
  • A 2nd user assigned to the second portfolio
  1. Go to the domain page that you are assigned domain manager. Go to the Domain Managers page and add the email as the second user who you added to the other portfolio. You should not be able to add this user as a domain manager and view the error message indicating so. image
  2. Turn off the organization feature waffle flag. You should be able to now add this 2nd user as a domain manager now that portfolios no longer exist after turning off the org feature waffle flag.

Testing Other ACs

  1. On the Add a Domain Manager page, verify that the breadcrumb menu allows you go back to the Domain Managers page. You should verify this when org feature waffle flag is both on and off.
  2. Verify that the Add a Domain Manager page content matches the updated copy on Figma (can be found on the ticket AC)

Code Review Verification Steps

As the original developer, I have

Satisfied acceptance criteria and met development standards

  • Met the acceptance criteria, or will meet them in a subsequent PR
  • Created/modified automated tests
  • Added at least 2 developers as PR reviewers (only 1 will need to approve)
  • Messaged on Slack or in standup to notify the team that a PR is ready for review
  • Changes to “how we do things” are documented in READMEs and or onboarding guide
  • If any model was updated to modify/add/delete columns, makemigrations was ran and the associated migrations file has been commited.

Ensured code standards are met (Original Developer)

  • All new functions and methods are commented using plain language
  • Did dependency updates in Pipfile also get changed in requirements.txt?
  • Interactions with external systems are wrapped in try/except
  • Error handling exists for unusual or missing values

Validated user-facing changes (if applicable)

  • New pages have been added to .pa11yci file so that they will be tested with our automated accessibility testing
  • Checked keyboard navigability
  • Tested general usability, landmarks, page header structure, and links with a screen reader (such as Voiceover or ANDI)
  • Add at least 1 designer as PR reviewer

As a code reviewer, I have

Reviewed, tested, and left feedback about the changes

  • Pulled this branch locally and tested it
  • Reviewed this code and left comments
  • Checked that all code is adequately covered by tests
  • Made it clear which comments need to be addressed before this work is merged
  • If any model was updated to modify/add/delete columns, makemigrations was ran and the associated migrations file has been commited.

Ensured code standards are met (Code reviewer)

  • All new functions and methods are commented using plain language
  • Interactions with external systems are wrapped in try/except
  • Error handling exists for unusual or missing values
  • (Rarely needed) Did dependency updates in Pipfile also get changed in requirements.txt?

Validated user-facing changes as a developer

  • New pages have been added to .pa11yci file so that they will be tested with our automated accessibility testing

  • Checked keyboard navigability

  • Meets all designs and user flows provided by design/product

  • Tested general usability, landmarks, page header structure, and links with a screen reader (such as Voiceover or ANDI)

  • Tested with multiple browsers, the suggestion is to use ones that the developer didn't (check off which ones were used)

    • Chrome
    • Microsoft Edge
    • FireFox
    • Safari
  • (Rarely needed) Tested as both an analyst and applicant user

Note: Multiple code reviewers can share the checklists above, a second reviewers should not make a duplicate checklist

As a designer reviewer, I have

Verified that the changes match the design intention

  • Checked that the design translated visually
  • Checked behavior
  • Checked different states (empty, one, some, error)
  • Checked for landmarks, page heading structure, and links
  • Tried to break the intended flow

Validated user-facing changes as a designer

  • Checked keyboard navigability

  • Tested general usability, landmarks, page header structure, and links with a screen reader (such as Voiceover or ANDI)

  • Tested with multiple browsers (check off which ones were used)

    • Chrome
    • Microsoft Edge
    • FireFox
    • Safari
  • (Rarely needed) Tested as both an analyst and applicant user

Screenshots

Copy link

🥳 Successfully deployed to developer sandbox es.

Copy link

🥳 Successfully deployed to developer sandbox es.

Copy link

🥳 Successfully deployed to developer sandbox es.

@@ -23,6 +23,15 @@ class InvalidDomainError(ValueError):
pass


class OutsideOrgMemberError(ValueError):
Copy link
Contributor Author

@erinysong erinysong Sep 26, 2024

Choose a reason for hiding this comment

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

We can delete this error class and all references to it once we allow users to be members of multiple orgs as per the ticket ACs

Copy link

🥳 Successfully deployed to developer sandbox es.

@@ -831,6 +857,8 @@ def _send_domain_invitation_email(self, email: str, requestor: User, add_success
"requestor_email": requestor_email,
},
)
if add_success:
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Moved this into the try statement since we shouldn't be sending emails if we do run into Exceptions that aren't EmailSendingError - feel free to let me know if there was a reason we did this previously though!

@AnnaGingle AnnaGingle requested review from AnnaGingle and removed request for a team September 30, 2024 15:18
class OutsideOrgMemberError(ValueError):
"""
Error raised when an org member tries adding a user from a different .gov org.
To be deleted when users can be members of multiple orgs.
Copy link
Contributor

Choose a reason for hiding this comment

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

love the comment here too! great!

@therealslimhsiehdy therealslimhsiehdy self-assigned this Sep 30, 2024
Copy link
Contributor

@therealslimhsiehdy therealslimhsiehdy left a comment

Choose a reason for hiding this comment

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

The HTML file looks good and follows the Figma design:
Screenshot 2024-09-30 at 11 34 34 AM
Screenshot 2024-09-30 at 11 36 26 AM
Screenshot 2024-09-30 at 11 36 54 AM

Running into some issues with getting the suggested error with the organization_feature flag on (users from 2nd portfolio, approved user), and even with the organization_feature flag off (still unable to add any user as domain manager). I turned off the disable_email_sending flag as well even though the emails I'm using are on the allow list, so something may be funky with the errors.py file I'm assuming 😭

Copy link

github-actions bot commented Oct 8, 2024

🥳 Successfully deployed to developer sandbox es.

Copy link

github-actions bot commented Oct 8, 2024

🥳 Successfully deployed to developer sandbox es.

Copy link

github-actions bot commented Oct 9, 2024

🥳 Successfully deployed to developer sandbox es.

Copy link

github-actions bot commented Oct 9, 2024

🥳 Successfully deployed to developer sandbox es.

Copy link

github-actions bot commented Oct 9, 2024

🥳 Successfully deployed to developer sandbox es.

Copy link
Contributor

@therealslimhsiehdy therealslimhsiehdy left a comment

Choose a reason for hiding this comment

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

LGTM -- caveat that to merge the test that is failing must be fixed!

Tested out with flag on a user that was already in a different org (red banner), one that was in same org (successful, green banner) Screenshot 2024-10-10 at 9 35 44 AM
Screenshot 2024-10-10 at 9 36 14 AM

With flag turned off, was able to add user that was previously in a different org
Screenshot 2024-10-10 at 9 49 10 AM

@erinysong erinysong requested a review from a team October 10, 2024 21:38
@gabydisarli gabydisarli requested review from gabydisarli and removed request for a team October 15, 2024 18:42
@gabydisarli
Copy link
Contributor

Hi Erin! The content on the Domain managers page (both org model + non-org model) needs to be updated. Please refer to this section of the content document for this page.

@gabydisarli

This comment was marked as resolved.

@gabydisarli

This comment was marked as resolved.

@erinysong
Copy link
Contributor Author

erinysong commented Oct 15, 2024

Thank you for bringing to attention the new content @gabydisarli! Just updated content with the following

Add a domain manager - domain view
image

Add a domain manager - org model view
image

Domain manager page content updates
image

Copy link

🥳 Successfully deployed to developer sandbox es.

@gabydisarli
Copy link
Contributor

Thanks for making these content updates, Erin! On the domain managers page, can you remove the final line of the last bullet points "Add another domain manager..."

@gabydisarli
Copy link
Contributor

Screenshot 2024-10-16 at 11 19 40 AM

Can we change this text to: <[email protected]> is already a member of another .gov organization.

@erinysong
Copy link
Contributor Author

@gabydisarli good catches and thank you! Just pushed those content fixes and the updates should be deployed on getgov-es soon!
image

Copy link

🥳 Successfully deployed to developer sandbox es.

@erinysong erinysong merged commit ce7064d into main Oct 17, 2024
10 checks passed
@erinysong erinysong deleted the es/2729-domain-manager-updates branch October 17, 2024 18:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
carryover Carryover from a previous sprint
Projects
None yet
Development

Successfully merging this pull request may close these issues.

"Add a domain manager" page updates
4 participants