wp-calypso icon indicating copy to clipboard operation
wp-calypso copied to clipboard

[Spike] Sites Management Page: "Hidden" sites don't appear unless the user searches for them

Open p-jackson opened this issue 2 years ago • 2 comments

Calypso allows you to "hide" sites using this legacy interface https://dashboard.wordpress.com/wp-admin/index.php?page=my-blogs&show=hidden

The Calypso site switcher doesn't display these sites by default Image

But as soon as you start typing in the site switcher's search box the hidden sites appear.

I don't know how often this is used by customers, but a12s use this feature a lot.

In terms of design we don't know whether we'd want to expose this feature using some text at the bottom of the page (like the site switcher does), or using a filter dropdown which is more in keeping with the current design. Or whether we want to have the feature at all. That's why this is a spike. @SaxonF @vindl

This spike is done when:

  • we understand whether it'll be trivial to access a site's hidden flag using our current way of fetching site excerpts. It's also possible that this data comes from a different endpoint, which would make implementing this feature a touch more difficult.

p-jackson avatar Aug 09 '22 04:08 p-jackson

The <SiteSelector> component uses getVisibleSites() to determine which sites are visible vs. hidden:

https://github.com/Automattic/wp-calypso/blob/0b34a51b66b803979b309150ca3fbfc55ba5c549/client/components/site-selector/index.jsx#L567

Like @wojtekn identified earlier, getVisibleSites() simply filters on the visible attribute:

https://github.com/Automattic/wp-calypso/blob/0b34a51b66b803979b309150ca3fbfc55ba5c549/client/state/selectors/get-visible-sites.js#L11-L17

danielbachhuber avatar Aug 10 '22 13:08 danielbachhuber

I put together a prototype with #66459

danielbachhuber avatar Aug 10 '22 14:08 danielbachhuber