-
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
Add/richer titan navigation #48781
Add/richer titan navigation #48781
Conversation
Here is how your PR affects size of JS and CSS bundles shipped to the user's browser: App Entrypoints (~6 bytes added 📈 [gzipped])
Common code that is always downloaded and parsed every time the app is loaded, no matter which route is used. Sections (~932 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. |
if ( ! externalManagementUrl || isFetchingExternalManagementUrl ) { | ||
return <VerticalNavItem isPlaceholder={ true } />; | ||
} | ||
return <VerticalNavItem path={ externalManagementUrl }>{ linkTitle }</VerticalNavItem>; |
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.
We may want to have the external
attribute set to true here so the item clearly indicates it is an external link. (Though it then opens in a new window, which is a change in behaviour from what we have now.)
if ( isEnabled( 'titan/phase-2' ) ) { | ||
return <TitanManagementNav domain={ domain } key={ domainKey } />; | ||
} | ||
return <TitanControlPanelLoginCard domain={ domain } key={ domainKey } />; |
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.
Also worth keeping in mind that this will be rendered both in the domain specific view, as well as the site specific view where we list all domains that have email. Maybe we want to have a check in place to see if we're listing all domains or just one?
Same goes for the TitanControlPanelLoginCard
component now. If we enable the iframe flag, and we have 2 domains with Titan, we render both iframes if we go to /email/<site_slug>
, which is not ideal.
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.
The TitanControlPanelLoginCard
component with the iframe has this problem already when it displays the iframe. I'm happy to just replace that with the dedicated nav moving forward.
RE showing multiple email management for a site -- does the nav take up too much space? I tried to keep it relatively small, as I noticed the logic supports showing details for multiple domains.
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.
does the nav take up too much space?
I don't think so, it should be fine IMO.
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.
Also, just to be clear, once we flip the titan/phase-2
feature flag, the new page that's supposed to show the embedded control panel is only visible when a specific domain is selected.
domain.titanMailSubscription.subscriptionId | ||
) } | ||
> | ||
{ translate( 'Update your billing and payment settings' ) } |
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.
The navigation doesn't work 'as expected' when one navigates to 'Update your billing and payment settings'. It returns to a page that lists all subscriptions.
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'll queue this up for a later card.
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.
Save some minor, non-blocking comments - Looks good!
This Pull Request is now available for translation here: https://translate.wordpress.com/deliverables/5433841 Thank you @daledupreez for including a screenshot in the description! This is really helpful for our translators. |
Translation for this Pull Request has now been finished. |
Changes proposed in this Pull Request
titan/iframe-control-panel
flag) OR the external Titan console (when the feature is not enabled)titan/manage
to wrap the embedded control panel, as we need a way to signal when we are loading the dedicated management path.Note: For now, I haven't added any styles, as I want some feedback on the core approach first.
Testing instructions
Note 1: The nav section of this feature is currently behind the
titan/phase-2
feature flag, but the newtitan/manage
path is not protected by that feature flag, as it's highly unlikely anyone gets to that URL, and it doesn't expose any new functionality anyway.Note 2: The PR takes into account the
titan/iframe-control-panel
feature flag as well:titan/phase-2
flags are enabled, the clicking on the Titan nav option for "Manage your email settings and accounts" should load the newtitan/manage
page and show the embedded management console.titan/iframe-control-panel
flag is disabled, but thetitan/phase-2
flag is enabled, clicking on "Manage your email settings and accounts" should immediately launch the external control panel.a. Enable the
titan/phase-2
feature flag in the UI by adding?flags=titan/phase-2
to the URL you're using (either locally or on calypso.live).b. Purchase Titan for a domain you own.
titan/phase-2
andtitan/iframe-control-panel
flags are enabled.titan/iframe-control-panel
flag and keep thetitan/phase-2
flag enabled. (You can do this by adding?flags=titan/phase-2,-titan/iframe-control-panel
to the URL.)?flags=-titan/phase-2,-titan/iframe-control-panel
to the URL to make this happen.)titan/iframe-control-panel
and disabletitan/phase-2
.And then repeat these steps (especially those involving navigation) starting from the all domains view.