Skip to content

Dashboard: warn when Profile email uses a custom domain#112201

Merged
StevenDufresne merged 9 commits into
trunkfrom
add/dashboard-custom-domain-email-warning
Jul 6, 2026
Merged

Dashboard: warn when Profile email uses a custom domain#112201
StevenDufresne merged 9 commits into
trunkfrom
add/dashboard-custom-domain-email-warning

Conversation

@StevenDufresne

@StevenDufresne StevenDufresne commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

Fixes DOTMSD-1310

Proposed Changes

  • Add a warning under the Email address field on the Dashboard Profile page when the account email is on a custom domain (any domain not on a known free-provider list).
  • The warning explains that account recovery would be lost if the domain expires, and suggests a free email provider.
  • Ports the behavior from Calypso's account settings. The Dashboard is self-contained (it doesn't reuse Calypso client code), so the free-provider detection is reimplemented locally.
Current This PR
Screenshot 2026-07-02 at 2 24 34 PM Screenshot 2026-07-02 at 2 17 12 PM

Why are these changes being made?

  • The new Dashboard Profile page dropped the custom-domain email warning that Calypso shows. Because a user's account recovery is tied to that email, losing the domain can lock them out — so the warning should carry over.

Considerations

Use a banner

This looks better, but demands visual attention.

Screenshot 2026-07-02 at 2 20 25 PM

Testing Instructions

  • Go to /me/account on the Dashboard.
  • With the account email on a custom domain (or type e.g. test@somedomain.com), confirm the warning appears under the Email address field.
  • With a free provider (e.g. test@gmail.com), confirm no warning shows.
  • Confirm the warning is hidden while an email change is pending.

Considerations

  • Local vs shared helper: duplicated the free-provider allowlist locally rather than extracting a shared package, to respect the Dashboard's self-contained architecture. The list changes rarely, so the duplication is cheap.
  • Inline text vs banner: presented as help text under the input (matching Calypso's altitude) rather than a Notice banner.

Pre-merge Checklist

  • Has the general commit checklist been followed? (PCYsg-hS-p2)
  • Have you written new tests for your changes?
  • Have you tested the feature in Simple (P9HQHe-k8-p2), Atomic (P9HQHe-jW-p2), and self-hosted Jetpack sites (PCYsg-g6b-p2)?
  • Have you checked for TypeScript, React or other console errors?
  • For UI changes, have you tested the affected components in dark mode?
  • Have you tested accessibility for your changes? Ensure the feature remains usable with various user agents (e.g., browsers), interfaces (e.g., keyboard navigation), and assistive technologies (e.g., screen readers) (PCYsg-S3g-p2).
  • Have you used memoizing on expensive computations? More info in Memoizing with create-selector and Using memoizing selectors and Our Approach to Data
  • Have we added the "[Status] String Freeze" label as soon as any new strings were ready for translation (p4TIVU-5Jq-p2)?
    • For UI changes, have we tested the change in various languages (for example, ES, PT, FR, or DE)? The length of text and words vary significantly between languages.
  • For changes affecting Jetpack: Have we added the "[Status] Needs Privacy Updates" label if this pull request changes what data or activity we track or use (p4TIVU-aUh-p2)?

🤖 Generated with Claude Code

Ports the custom-domain account-recovery warning from Calypso's
account settings to the new Dashboard Profile page.

Ref: DOTMSD-1310
Render the warning as help text under the email input (matching
Calypso's altitude) instead of a Notice banner.

Ref: DOTMSD-1310
Drop the custom has-warning styling; show the warning through the
InputControl help prop with default styling. No bespoke CSS.

Ref: DOTMSD-1310
@StevenDufresne
StevenDufresne marked this pull request as ready for review July 2, 2026 05:45
@StevenDufresne
StevenDufresne requested a review from a team as a code owner July 2, 2026 05:45
@matticbot matticbot added the [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. label Jul 2, 2026
Comment thread client/dashboard/me/profile-personal-details/test/email-utils.test.ts Outdated
…tion test

Per client/dashboard/docs/testing.md, simple utilities are covered via
integration tests. Move the subdomain edge case into index.test.tsx.

Ref: DOTMSD-1310

@fushar fushar left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Tested. Works. Left a very small comment.

BTW it seems the before-after images in the PR description are the same.

Comment thread client/dashboard/me/profile-personal-details/email-section.tsx Outdated
Co-authored-by: Ashar Fuadi <ashar.fuadi@automattic.com>
@StevenDufresne

Copy link
Copy Markdown
Contributor Author

BTW it seems the before-after images in the PR description are the same.

They are not. See label case :). That's how great this PR is.

@github-actions

github-actions Bot commented Jul 2, 2026

Copy link
Copy Markdown

Looks like one of the E2E tests has failed.

You can fix them following these steps:

  1. Check out this branch locally:
    gh pr checkout 112201
  2. Start Claude Code in the repo:
    claude
  3. Run the /fix-e2e-tests skill, passing this PR number:
    /fix-e2e-tests 112201
    

@fushar fushar left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

They are not. See label case :). That's how great this PR is.

Ohhhh I see, I thought Current means the MSD profile page before this PR 👍

@StevenDufresne

Copy link
Copy Markdown
Contributor Author

Ohhhh I see, I thought Current means the MSD profile page before this PR

No, :). Current means calypso's account page. Confusion noted. Will be more accurate with copy moving forward.

@StevenDufresne
StevenDufresne added this pull request to the merge queue Jul 6, 2026
Merged via the queue into trunk with commit 746b23f Jul 6, 2026
15 checks passed
@StevenDufresne
StevenDufresne deleted the add/dashboard-custom-domain-email-warning branch July 6, 2026 00:52
@github-actions github-actions Bot removed the [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. label Jul 6, 2026
@a8ci18n

a8ci18n commented Jul 6, 2026

Copy link
Copy Markdown

This Pull Request is now available for translation here: https://translate.wordpress.com/deliverables/34220110

Some locales (Hebrew) have been temporarily machine-translated due to translator availability. All other translations are usually ready within a few days. Untranslated and machine-translated strings will be sent for translation next Monday and are expected to be completed by the following Friday.

Thank you @StevenDufresne for including a screenshot in the description! This is really helpful for our translators.

@a8ci18n

a8ci18n commented Jul 8, 2026

Copy link
Copy Markdown

Translation for this Pull Request has now been finished.

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.

4 participants