Wp-calypso: Reader: Add sites to search results

Created on 18 Apr 2017  Â·  8Comments  Â·  Source: Automattic/wp-calypso

To Do

  • [x] Add feature flag for features on current pages
  • [x] Create new Site result component. Hook up to redux or flux follow info?
  • [ ] Add in header selector for Sites and Posts in existing search results
  • [x] Redux work for managing search results
  • [ ] Figure out how to switch views based on browser width. JS or CSS?
  • [ ] Reporting

Summary

site-search004

Notes:

  • New right side column for site results. If there were no site results, omit the column.
  • Site results include gravatar (if none, blavatar), site title, site description/tagline, byline, URL. Basically same text as on the Site View.
  • Clicking anywhere in the result takes you to the Site View for that site. Clicking the small follow link follows the site, natch.
  • Scrolling the page leaves the search box and “Posts/Sites” header in place.
  • Limit Site Description to 3 lines in wider screens.

When the browser gets too narrow to host both columns comfortably, switch to showing only one column with a toggle:

results-w-sites-mobile-1

site-search-mobile003

Notes:

  • Defaults to Posts. User can toggle to Sites using SectionNav.
  • Scrolling the page still leaves the search box and “Posts/Sites” header in place.
Reader [Status] Stale [Type] Enhancement

Most helpful comment

I've updated the mockups and notes in this issue to include the site URL. We're adding this back because some sites have generic titles and you won't be able to determine which one you may be looking for.

All 8 comments

At what breakpoint do you think we should drop the sidebar and move to the tabs?

I think we could handle two columns at 960px and up. (But if we remove the left side nav sidebar, we could drop that down to 660px and up. Working on that proposal now.)

At what breakpoint do you think we should drop the sidebar and move to the tabs?

Update URL? Sure! “&show=posts” and “&show=sites” or something like that?

When the viewport is narrow and the list is in a tab, we can use infinite list to load in more site results. How should we do that when results are in the sidebar? Should we ever load more? How many should we load by default?

How about, to start off site results, let’s just mirror what we’re doing for post results? If that’s not possible, let’s just pull in as many site results as will fit (10? 20?) and start there.

(notes from previous conversations with @fraying)

Thanks for the copypasta, @blowery

I've updated the mockups and notes in this issue to include the site URL. We're adding this back because some sites have generic titles and you won't be able to determine which one you may be looking for.

This issue has been marked as stale because it hasn't been updated in a while. It will be closed in a week. If you would like it to remain open, can you please comment below and see what you can do to get things moving with this issue? Thanks! 🙏

This landed ages ago.

Was this page helpful?
0 / 5 - 0 ratings