Skip to content

Instant Search: Add localization and formatting of all dates#13748

Merged
gibrown merged 4 commits intoinstant-search-masterfrom
fix/instant-search-filter-display
Oct 14, 2019
Merged

Instant Search: Add localization and formatting of all dates#13748
gibrown merged 4 commits intoinstant-search-masterfrom
fix/instant-search-filter-display

Conversation

@gibrown
Copy link
Copy Markdown
Member

@gibrown gibrown commented Oct 14, 2019

Pass the locale from the backend and use it to properly format the dates in the results and the date filtering.

@jsnmoon it looks like date filtering is not fully working (I think on master). Haven't figured out what broke it yet.

Fixes #13390

Testing instructions:

  • Add define( "JETPACK_SEARCH_PROTOTYPE", true ); to your wp-config.php.
  • Ensure that your site has the Jetpack Pro plan and Jetpack Search enabled.
  • Add a Jetpack Search widget to the Search page sidebar and configure some date filters.
  • Try searching and filtering.
  • Try setting different locales. Can set it for the whole site or use a filter like so:
function jp_instant_search_options( $options ) {
	$options['locale'] = 'ko-KR';
	//$options['locale'] = 'en-GB';
	//$options['locale'] = 'ar-EG';
	return $options;
}
add_filter( 'jetpack_instant_search_options', 'jp_instant_search_options' );

@gibrown gibrown added [Status] Needs Review This PR is ready for review. [Feature] Search For all things related to Search Instant Search labels Oct 14, 2019
@gibrown gibrown requested review from a team and jsnmoon October 14, 2019 15:21
@gibrown gibrown self-assigned this Oct 14, 2019
@jsnmoon
Copy link
Copy Markdown
Contributor

jsnmoon commented Oct 14, 2019

it looks like date filtering is not fully working (I think on master). Haven't figured out what broke it yet. (@gibrown)

I just pushed out a date filtering hotfix and rebased this branch on top of it.

@jsnmoon jsnmoon force-pushed the fix/instant-search-filter-display branch from 1fe7d21 to c5a4970 Compare October 14, 2019 20:21
Copy link
Copy Markdown
Contributor

@jsnmoon jsnmoon left a comment

Choose a reason for hiding this comment

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

Looks good to go. I commented inline where we're beginning to accrue tech debt.

@gibrown gibrown merged commit e8df94c into instant-search-master Oct 14, 2019
@gibrown gibrown deleted the fix/instant-search-filter-display branch October 14, 2019 21:04
@matticbot matticbot added [Status] Needs Changelog and removed [Status] Needs Review This PR is ready for review. labels Oct 14, 2019
jsnmoon added a commit that referenced this pull request Oct 23, 2019
* Implement minimal search results and spelling correction (#13365)
* Add filtering display (#13371)
* Fix search result display bugs and make improvements (#13393)
* Add rudimentary support for filtering on post types (#13430)
* Add support for filtering on categories and tags (#13505)
* Add instant search sorting based on the URL (#13377)
* Add support for filtering on dates (#13545)
* Add custom taxonomy filtering (#13605)
* add sort widget (#13614)
* fix many theme incompatibilities (#13602)
* Add infinite scrolling (#13684)
* Add caching to the api requests (#13714)
* Clean up some design bugs/issues (#13721)
* Fix labels for post types when we have them. (#13750)
* Add localization and formatting of all dates (#13748)
* search from any page on the site (#13713)
* Hook up default options (inc. sort) (#13742)
* Add TrainTracks analytics (#13730)
* Create PostTypeIcon component (#13790)
* Upgrade to Preact 10 (#13794)
* Add comments component (#13797)
* Address review feedback
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.

4 participants