-
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
Sites Management Page: Visually distinguish 'redirect' sites #66750
Sites Management Page: Visually distinguish 'redirect' sites #66750
Conversation
Here is how your PR affects size of JS and CSS bundles shipped to the user's browser: Sections (~101 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. |
Works well 👍 One thing I noticed is that the site switcher displays both the site status pill and the redirect pill: While the SMD only displays the redirect status: But I don't think it's incorrect. The site status doesn't matter if it's a redirect because the redirect takes effect immediately, so it has precedence over the status. Is that correct? If not (meaning we want to have parity), one thing we could do is to add a pill to the right of the site URL and maintain the status in its column. |
Correct. Good thing we're refactoring the Site Switcher soon! |
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.
Great work 👍
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.
Code looks good.
Tested and working as described.
I've found that the redirect shows a wrong empty state:
However, we can fix this in another PR.
wp-calypso/client/sites-dashboard/components/no-sites-message.tsx
Lines 104 to 105 in 839c330
if ( status === 'coming-soon' ) { | |
return ( |
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.
Great that we have the "no redirect sites" state now 👍
This Pull Request is now available for translation here: https://translate.wordpress.com/deliverables/7483033 Thank you @danielbachhuber for including a screenshot in the description! This is really helpful for our translators. |
Thanks for the quick fix! I took a look at the ellipsis menu actions for redirects, and although they work, they're perhaps not that relevant for a site redirect. Something for i2 I think.
I thought about maybe hiding the CC @SaxonF just making sure he's aware of the changes. |
This is a good first pass, nice work @danielbachhuber ! |
@p-jackson You're welcome!
Yeah, it's not a perfect abstraction. However, if
I'd lean towards hiding from the dropdown unless there's at least one, too. Our Sites Management Page will become rapidly complex unless we actively keep the UI clear. |
That's true. Putting |
Translation for this Pull Request has now been finished. |
Fixes #66746
Proposed Changes
Visually distinguishes 'redirect' sites in the List view and Grid view, and uses
site.options.unmapped_url
instead ofsite.URL
for redirect sites:Testing Instructions
/sites-dashboard
.