-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Email: Surface different warning message when the email subscription and domain are owned by different users #68601
Email: Surface different warning message when the email subscription and domain are owned by different users #68601
Conversation
Here is how your PR affects size of JS and CSS bundles shipped to the user's browser: Sections (~145 bytes added 📈 [gzipped])
Sections contain code specific for a given set of routes. Is downloaded and parsed only when a particular route is navigated to. Legend What is parsed and gzip size?Parsed Size: Uncompressed size of the JS and CSS files. This much code needs to be parsed and stored in memory. Generated by performance advisor bot at iscalypsofastyet.com. |
This Pull Request is now available for translation here: https://translate.wordpress.com/deliverables/7564892 Thank you @wongasy for including a screenshot in the description! This is really helpful for our translators. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've left a number of comments but the most important one is probably documenting the differences between canCurrentUserAddEmail
and canDomainOwnerAddEmail
in a clear way.
client/my-sites/email/email-different-domain-owner-message/index.tsx
Outdated
Show resolved
Hide resolved
client/my-sites/email/email-different-domain-owner-message/index.tsx
Outdated
Show resolved
Hide resolved
client/my-sites/email/email-different-domain-owner-message/index.tsx
Outdated
Show resolved
Hide resolved
client/my-sites/email/email-management/home/email-plan-warning-notice.tsx
Show resolved
Hide resolved
eventName="calypso_email_providers_nonowner_impression" | ||
eventProperties={ { source } } | ||
/> | ||
<p className="email-non-owner-message__non-owner-message"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not a big fan of reusing the class name of another component. Could we find a way to share styles between those two components in a cleaner way?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems that it's typo, since we have styles for className email-non-domain-owner-message__non-owner-message
@wongasy WDYT about wrapping these two components ( |
const onClickLink = ( eventType: 'login' | 'support' ) => { | ||
const properties = { | ||
action: eventType, | ||
source, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@AllTerrainDeveloper Let's also send the property context: 'different-owners'
, we can set the context for the other non-owner and non-domain-owner components that you built as well.
It's a good idea to group them, but I prefer no to do it this in this Pull Request, lets first merge/deploy what we have achieved so far and then better place them in the structure of Calypso |
@AllTerrainDeveloper If we already know that they folder structure will be changed, let's start with the restructure in the main PR, instead of circling back to it, so we don't have to do a separate deploy just to move the files around and having to go through regression testing. |
54339c3
to
20735b5
Compare
c120f97
to
4c0555e
Compare
I saw this message too late :( anyway it would be more painful as I would have to apply the renaming painfully 3 times with each rebase... I can do it here or in another PR, I'm fine with both options. |
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is looking good. I have some comments.
client/lib/domains/is-domain-and-email-subscriptions-owned-by-different-users.ts
Outdated
Show resolved
Hide resolved
client/lib/domains/is-domain-and-email-subscriptions-owned-by-different-users.ts
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
} | ||
|
||
.email-non-domain-owner-message__non-owner-message { | ||
.email-non-domain-owner-message__non-owner-message-message { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.email-non-domain-owner-message__non-owner-message-message { | |
.email-non-domain-owner-message__non-owner-message { |
DRY 😉
… to the selected domain
…er and use it in the new link buttons
- Move logic to extract the domain user name - Explicit function description to ease the location of the event logged in Tracks - Change the style class name & padding for the notice. - Extract the function that builds the URL login page with email comparison and user login name
…ct component to do not overflow the main render.
Add source in tracking
Add new styles to the main sheet Keep showing old notices.
… to the selected domain
…er and use it in the new link buttons
- Move logic to extract the domain user name - Explicit function description to ease the location of the event logged in Tracks - Change the style class name & padding for the notice. - Extract the function that builds the URL login page with email comparison and user login name
…ct component to do not overflow the main render.
…on queryString to a higher scope.
…and domain are owned by different users
Co-authored-by: Stéphane Thomas <email@stephanethomas.com>
Co-authored-by: Stéphane Thomas <email@stephanethomas.com>
80bea5d
to
d516aa9
Compare
Rebased again due to conflicts... |
Translation for this Pull Request has now been finished. |
Proposed Changes
In the case where the domain and email subscription are owned by different users, our new messaging that suggests the user to contact the owner of the email / domain will not work. Since the user must be both the domain and email subscription owner in order to make a purchase. Therefore, we will need separate messaging to address this scenario, and this PR introduces a new component for this case.
Testing Instructions
Pre-merge Checklist
Related to #