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

Create admin page to check status of emails #35815

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

gherceg
Copy link
Contributor

@gherceg gherceg commented Feb 20, 2025

Product Description

image

Technical Summary

@AmitPhulera mentioned this idea and I'm reminded of it every time support asks a developer to check if an email is blocked. It would have been nice to reuse the same logic that is used when running the management command check_bounced_email, which effectively calls BouncedEmail.get_hard_bounced_emails, but there was a lot going on there and I was a bit hesitant to make changes to it since it is used in production code as well.

While not the DRYest addition to our codebase, I think it is a net positive as is.

A reasonable next iteration on this would be to allow unblocking an email from this UI, but I figured this is a good enough start and didn't want to sink too much time into it.

Feature Flag

Safety Assurance

Safety story

Just a change to the HQ admin page. The least safe part of this is the idea of taking action based on this information, but I've tried to keep the logic the same for how it does in BouncedEmail.get_hard_bounced_emails.

Automated test coverage

QA Plan

No

Rollback instructions

  • This PR can be reverted after deploy with no further considerations

Labels & Review

  • Risk label is set correctly
  • The set of people pinged as reviewers is appropriate for the level of risk of the change

@gherceg gherceg marked this pull request as ready for review February 20, 2025 21:49
class="form-control"
placeholder="[email protected]"
/>
<input class="btn btn-primary" type="submit" />
Copy link
Member

Choose a reason for hiding this comment

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

i prefer button elements, also better for translating text (which seems to be using the default)

Suggested change
<input class="btn btn-primary" type="submit" />
<button class="btn btn-primary" type="submit" >{% trans "Check Status" %}</button>

@@ -0,0 +1,39 @@
{% extends "hqwebapp/bootstrap3/base_section.html" %}
Copy link
Contributor

Choose a reason for hiding this comment

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

B5 please. I think/hope the only things you'll need to change are the button (use btn-outline-primary) and form-inline (doesn't exist in B5).

Copy link
Contributor

Choose a reason for hiding this comment

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

On second thought, I can't remember if you can do this without splitting the rest of the app, so maybe not. Adding new B3 pages is unfortunate, though.

@@ -2617,6 +2617,9 @@ def sidebar_items(self):
{'title': _('Manage deleted domains'),
'url': reverse('tombstone_management'),
'icon': 'fa fa-minus-circle'},
{'title': _('Check email status'),
'url': reverse('email_status'),
'icon': 'fa fa-envelope-circle-check'},
Copy link
Contributor

Choose a reason for hiding this comment

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

quality choice

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