Skip to content
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

Add support for filtering on dates #13545

Merged
merged 4 commits into from
Sep 26, 2019

Conversation

jsnmoon
Copy link
Member

@jsnmoon jsnmoon commented Sep 25, 2019

Changes proposed in this Pull Request:

This enables filtering search results by year or month using search widget checkboxes.

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

Yes, this adds date-based filtering to Jetpack Instant Search.

Testing instructions:

  • Add define( "JETPACK_SEARCH_PROTOTYPE", true ); to your wp-config.php.
  • Ensure that your site has the Jetpack Pro plan and has Jetpack Search enabled.
  • Add a Jetpack Search widget to the Search page sidebar.
  • Add a date filter to the Jetpack Search widget. Note that it's possible to filter by month or year for each of the following options:
    • Date posted
    • Date posted in GMT
    • Date modified
    • Date modified in GMT
  • Enter a query into a search widget. Alternatively, navigate to a search page like /?s=privacy.
  • Ensure that you can select a date filter checkbox.

Proposed changelog entry for your changes:

No.

@jsnmoon jsnmoon self-assigned this Sep 25, 2019
@jsnmoon jsnmoon changed the title Add support for filtering on dates (year, month, day) Add support for filtering on dates Sep 25, 2019
@jsnmoon jsnmoon changed the base branch from master to instant-search-master September 25, 2019 20:33
@jsnmoon jsnmoon force-pushed the add/instant-search-date-filter branch from e4a1936 to 490554d Compare September 25, 2019 20:35
@jsnmoon jsnmoon added [Status] Needs Review To request a review from Crew. Label will be renamed soon. and removed [Status] In Progress labels Sep 25, 2019
@jsnmoon jsnmoon requested review from gibrown and a team September 25, 2019 20:37
@jsnmoon jsnmoon marked this pull request as ready for review September 25, 2019 20:37
@jsnmoon jsnmoon requested a review from a team as a code owner September 25, 2019 20:37
@jsnmoon jsnmoon force-pushed the add/instant-search-date-filter branch from 821cde5 to d6917f7 Compare September 25, 2019 22:38
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.

WFM. Minor suggestions.

modules/search/instant-search/lib/api.js Show resolved Hide resolved
modules/search/instant-search/lib/api.js Outdated Show resolved Hide resolved
Co-Authored-By: Greg Ichneumon Brown <greg@automattic.com>
@jsnmoon jsnmoon merged commit b2c7bc4 into instant-search-master Sep 26, 2019
@jsnmoon jsnmoon deleted the add/instant-search-date-filter branch September 26, 2019 18:39
@matticbot matticbot added [Status] Needs Changelog and removed [Status] Needs Review To request a review from Crew. Label will be renamed soon. labels Sep 26, 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 [Type] Feature Request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants