-
Notifications
You must be signed in to change notification settings - Fork 184
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
Fix #1461 - Update UI of subdomain onboarding module #1513
Conversation
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 appears to introduce a bug; see inline comment.
React re-implementation of #1513.
Vincent's comment via Slack: |
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.
Unfortunately I encountered another bug. I've described the cause inline, but you can reproduce it yourself if you register a subdomain during the onboarding flow, rather than beforehand. Could you give that a try?
<p class="c-premium-onboarding-subdomain">@{{ user_profile.subdomain }}</p> | ||
<span class="c-premium-onboarding-mozmail">.mozmail.com</span> | ||
</div> |
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.
Ah, I'm running into another error, and I see why you're not running into it (and not in the other one either): they only occur when you claim a subdomain during the onboarding, not if you already have a subdomain before starting the onboarding. That's presumably also why there was JavaScript to set the subdomain in there, rather than just in the Django template.
This is what it looks like for me after registering a subdomain:
The reason for that is that at the time the back-end serves up this page, user_profile.subdomain
is not set yet. And when the subdomain is registered, the page is not reloaded, so the contents of this element is still @None.mozmail.com
when it is made visible.
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.
Ohh! I understand now, thank you so much. I re-added the Javascript that I deleted as well as the .js-premium-onboarding-domain-registration-preview
class back into the module. I hope that works now, it looks fine on my end.
@@ -189,7 +189,7 @@ | |||
modalRegistrationSuccessState.classList.remove("is-hidden"); | |||
|
|||
const domainPreview = document.querySelector(".js-premium-onboarding-domain-registration-preview"); | |||
domainPreview.textContent = domain + ".mozmail.com"; | |||
domainPreview.textContent = domain; |
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.
Removed ".mozmail.com" here since I'm adding that string directly into the HTML.
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.
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.
Reviewed!
a649980
to
1d79845
Compare
1d79845
to
44469f3
Compare
React re-implementation of #1513.
React re-implementation of #1513.
This PR fixes #1461.
New feature description
This updates the design of the subdomain module on the premium onboarding flow for users who already have a pre-existing subdomain.
Screenshot (if applicable)
Mobile view:
Desktop view:
How to test
Have an with a premium account with a subdomain set, on the inspect tool turn off the
display: none
property on.c-multipart-premium-onboarding
and.c-premium-onboarding-step
.Checklist
/static/scss/libs/protocol/css/includes/tokens/dist/index.scss
).