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

#2591: Remove profile feature flag - [MEOWARD] #2738

Merged
merged 33 commits into from
Sep 19, 2024

Conversation

asaki222
Copy link
Contributor

@asaki222 asaki222 commented Sep 10, 2024

Ticket

Resolves #2591

Changes

  • Removed the profile feature flag.
  • Modified code, and tests

Context for reviewers

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 meoward.

@asaki222 asaki222 closed this Sep 10, 2024
@asaki222 asaki222 deleted the meoward/2591-Remove-Profile-feature-flag branch September 10, 2024 15:37
@asaki222 asaki222 restored the meoward/2591-Remove-Profile-feature-flag branch September 10, 2024 15:48
@asaki222 asaki222 reopened this Sep 10, 2024
Copy link

🥳 Successfully deployed to developer sandbox meoward.

1 similar comment
Copy link

🥳 Successfully deployed to developer sandbox meoward.

Copy link

🥳 Successfully deployed to developer sandbox meoward.

Copy link

🥳 Successfully deployed to developer sandbox meoward.

Copy link
Contributor

@CocoByte CocoByte left a comment

Choose a reason for hiding this comment

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

Hi! Maybe I jumped the gun on reviewing this, but it looks like there are a number of failing tests still. If this is still under construction, mind adding "[DRAFT]" to front of the PR title?

@CocoByte CocoByte self-assigned this Sep 11, 2024
@asaki222 asaki222 changed the title Meoward/2591 remove profile feature flag DRAFT - Meoward/2591 remove profile feature flag Sep 11, 2024
Copy link

🥳 Successfully deployed to developer sandbox meoward.

@asaki222 asaki222 changed the title (Draft) #2591: Remove profile feature flag - [MEOWARD] #2591: Remove profile feature flag - [MEOWARD] Sep 17, 2024
@abroddrick abroddrick dismissed CocoByte’s stale review September 17, 2024 19:23

changes addresses, tests passing

Copy link
Contributor

@zandercymatics zandercymatics left a comment

Choose a reason for hiding this comment

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

Looks like there are still some references to profile_feature!
image

recipient = obj.creator
else:
recipient = None
# TODO 2574: remove lines 1977-1978 (refactor as needed)
Copy link
Contributor

Choose a reason for hiding this comment

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

Still need this todo?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I can remove!

@@ -15,7 +15,7 @@
</svg>
{% endif %}
{% endif %}
<a href="{% namespaced_url 'domain-request' this_step %}"
<a href="{% namespaced_url 'domain-request' this_step %}"
Copy link
Contributor

Choose a reason for hiding this comment

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

seems like this file was accidentally included? I'm in favor of keeping this though as its some cleanup stuff

@@ -39,4 +39,4 @@
{% endfor %}
</ul>
</nav>
</div>
</div>
Copy link
Contributor

Choose a reason for hiding this comment

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

I'd say though just remember to end the file with a newline. I think thats our convention typically

Copy link
Contributor Author

Choose a reason for hiding this comment

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

updated

src/registrar/templates/domain_request_status.html Outdated Show resolved Hide resolved
src/registrar/tests/test_views.py Outdated Show resolved Hide resolved
senior_official=contact_user,
)
def test_domain_your_contact_information_when_profile_feature_on(self):
"""test that Your contact information is not accessible when profile feature is on"""
with override_flag("profile_feature", active=True):
Copy link
Contributor

Choose a reason for hiding this comment

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

looks like you missed a reference to profile_feature! I think for this test though you can actually delete it - we won't need it anymore

Comment on lines 762 to 763
home_page = self.app.get(reverse("user-profile"))
self.assertContains(home_page, self.domain.name)
Copy link
Contributor

Choose a reason for hiding this comment

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

(Blocking) why was this changed? We shouldn't see the domain name on user-profile

Copy link
Contributor Author

Choose a reason for hiding this comment

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

When a new user first logs in, they are taken to the user-profile page, instead of the home.

Copy link
Contributor

@zandercymatics zandercymatics Sep 18, 2024

Choose a reason for hiding this comment

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

@asaki222 I see your point regarding testing that! However, this test is supposed to test on if a domain invite adds that domain to the domain table after the user logs in. They only see this profile page when they are missing information on the user object - which would be why you are seeing that behavior

Since the purpose of this test is different, can you revert this? You will need to just add more data to the user object defined on 755. I think title and phone, but maybe one additional field. This will cause the user to redirect to home

The only weird thing about this is why the test is passing at all - basically I don't think the domain name should exist on the user profile page. Looking at it now, this is actually a bug caused by line 739 - the email address has the name of the domain!

Copy link
Contributor

@zandercymatics zandercymatics Sep 18, 2024

Choose a reason for hiding this comment

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

Regarding that error with the test - do you mind adding a line like self.assertNotContains(home_page, email_address) as well?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@zandercymatics if I revert this test, and added the
self.assertNotContains(home_page, email_address), it would fail since its technically on the home page. Is that what you meant?

Copy link

🥳 Successfully deployed to developer sandbox meoward.

@asaki222
Copy link
Contributor Author

Looks like there are still some references to profile_feature! image

Removed @zandercymatics , I must have missed these when I was trying to debug

Copy link

🥳 Successfully deployed to developer sandbox meoward.

1 similar comment
Copy link

🥳 Successfully deployed to developer sandbox meoward.

Copy link

🥳 Successfully deployed to developer sandbox meoward.

Copy link
Contributor

@zandercymatics zandercymatics left a comment

Choose a reason for hiding this comment

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

Your changes look great! I ran it locally and it works on meoward!
Just two more things:

  1. There are some old documentation artifacts for profile_feature in adding-feature-flags.md and on the function description for waffle_flag.py. Can you remove those?
  2. There is a blocking change on that test_domain_invitation flow one! I left some more details as to why - its a pretty subtle one
    image

Copy link

🥳 Successfully deployed to developer sandbox meoward.

Copy link

🥳 Successfully deployed to developer sandbox meoward.

Copy link
Contributor

@zandercymatics zandercymatics left a comment

Choose a reason for hiding this comment

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

your changes look good but I think you need to lint. The jobs haven't passed yet - but if all of them do then all is good. You just need to also remove the references in our documentation, then I will approve after both of those are true!

Copy link

🥳 Successfully deployed to developer sandbox meoward.

Copy link

🥳 Successfully deployed to developer sandbox meoward.

1 similar comment
Copy link

🥳 Successfully deployed to developer sandbox meoward.

@asaki222 asaki222 merged commit 9f300ef into main Sep 19, 2024
10 checks passed
@asaki222 asaki222 deleted the meoward/2591-Remove-Profile-feature-flag branch September 19, 2024 14:23
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.

Remove Profile feature flag and its references
4 participants