Skip to content

Conversation

@bluefuton
Copy link
Contributor

@bluefuton bluefuton commented Nov 13, 2019

Address feedback from @joanrho on the mobile experience when using the standard 'minimal' result format.

https://cloudup.com/cK8mBUIKy95/f

Changes proposed in this Pull Request:

On the smallest breakpoint:

  • Move date above search results
  • Improve appearance of comment matches

Screen Shot 2019-11-14 at 15 21 37

On larger breakpoints:

  • line up the result title and date
  • remove padding around search result container (retained for mobile)

Is this a new feature or does it add/remove features to an existing part of Jetpack?

  • No - it's part of the Instant Search prototype and merges into instant-search-master.

Testing instructions:

Follow the setup instructions in https://github.com/Automattic/jetpack/blob/instant-search-master/modules/search/instant-search/README.md.

Check the results at different breakpoints. Example query: /?s=card&blog_id=84860689

Proposed changelog entry for your changes:

  • Not required.

@bluefuton bluefuton requested a review from a team November 13, 2019 22:54
@bluefuton bluefuton self-assigned this Nov 13, 2019
@bluefuton bluefuton removed the request for review from a team November 13, 2019 22:54
@bluefuton bluefuton added [Status] Needs Review This PR is ready for review. and removed [Status] In Progress labels Nov 14, 2019
@bluefuton bluefuton requested review from gibrown and jsnmoon November 14, 2019 02:18
onClick={ this.onClick }
/>
</h3>
<div className="jetpack-instant-search__search-result-minimal-header">
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just adding a wrapper element here.

Copy link
Member

@gibrown gibrown left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I feel like we should move the date between the title and the content? It feels odd to me floating above. Or maybe it just needs to be smaller. I guess another option is we could show the url rather than the date. When the date matters, it tends to be in the URL, and there are a lot of sites where date doesn't matter.

I think this also breaks margins on some other themes. 2015: http://gibrown.wpsandbox.me/demo/?s=related%20psts&blog_id=20115252&theme=twentyfifteen

I use this on my site to quickly test other themes:

function filter_theme( $theme ) {
	if ( $_GET['theme'] ) {
		$theme = sanitize_key( $_GET['theme'] );
	}
	return $theme;
}
add_filter( 'stylesheet', 'filter_theme', 1 );
add_filter( 'template', 'filter_theme', 1 );

cc @keoshi

@keoshi
Copy link
Contributor

keoshi commented Nov 18, 2019

I feel like we should move the date between the title and the content?

I agree. Moving the date, which is accessory information, between the title and content would bring more attention to the relevant info (matched terms in title/content). To the best of my knowledge, the date is never part of a search result, correct?

Google also does an interesting thing with dates, by including them in the content's block:

image

I think that's overdoing it for our context, but cool to keep the blocks tidy nonetheless.

As for the URL, I don't think it's relevant if we show the date by itself, since you're already searching in a single domain (I'm assuming?) and it would just add a lot of https://sitename.com/blah... creating a repetitive pattern.

@gibrown
Copy link
Member

gibrown commented Nov 19, 2019

To the best of my knowledge, the date is never part of a search result, correct?

Correct, it should never be a part of the matching content.

As for the URL, I don't think it's relevant if we show the date by itself, since you're already searching in a single domain (I'm assuming?)

So currently everything is for a single domain, but cross site search does work for VIPs in the existing Jetpack Search, and would be easy for us to implement and I could see us doing it early next year. It is probably a week of work.

When a result has no content, then we do use the path as a fallback:

Screen Shot 2019-11-19 at 8 34 34 AM

The other fallback we have is tags and categories:

Screen Shot 2019-11-19 at 8 35 38 AM

So I think there could be something where we always show the path in these results, and then also show the domain when there are multiple sites.

@keoshi
Copy link
Contributor

keoshi commented Nov 19, 2019

That's great info to know, @gibrown — thank you!

@bluefuton
Copy link
Contributor Author

Some good feedback here about date placement (or substituting it with other things). Let's continue discussing that and I'll close out this PR for now.

I've created two PRs with changes from here that are ready to go:

@bluefuton bluefuton closed this Nov 27, 2019
@bluefuton bluefuton deleted the instant-search-minimal-results-mobile branch December 10, 2019 22:21
@kraftbj kraftbj removed the [Status] Needs Review This PR is ready for review. label Sep 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Feature] Search For all things related to Search Touches WP.com Files

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants