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

Instant Search: Update prototype with overlay design #14550

Merged
merged 78 commits into from
Feb 12, 2020

Conversation

jsnmoon
Copy link
Member

@jsnmoon jsnmoon commented Feb 1, 2020

Screen Shot 2020-01-31 at 5 04 14 PM

Changes proposed in this Pull Request:

  • New, overlay-oriented design
  • Improved integration with the Customizer (plus dark/light themes)
  • Added tests, bugfixes, photon support, and accessibility improvements

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

  • Yes, this is part of the Jetpack Instant Search project: p10gg3-9iP-p2. It has not been publically launched.

Testing instructions:

  1. Follow these setup instructions to set up Jetpack Instant Search on your site. Please note that the Jetpack Search widget will need to be added to twice: once to your site sidebar/footer and once to the Jetpack Search Sidebar within the search overlay.

  2. Submit a query into your site search input. Ensure that a search overlay appears with your search results.

  3. Enter your site's customizer (/wp-admin/customize.php) and navigate to the "Jetpack Search" section. Ensure that changing the settings there take effect on the overlay without a page reload.

  4. Try enabling and using filters on the widget in your site's sidebar/footer. Ensure that they behave as expected.

  5. Try enabling and using filters on the widget inside the search overlay. Ensure that they behave as expected.

Proposed changelog entry for your changes:

  • Implements an overlay-based design for Jetpack Instant Search.

bluefuton and others added 30 commits November 4, 2019 07:44
* Add label and button to search box and convert to functional component

* Correct lodash import
* Turn statements into sentence fragments
* Add appropriate landmark roles for elements
* Set portaled widget as a search form
* Use ordered list for search results
* [not verified] Add product search result component

* [not verified] Refactor renderResult into component

* [not verified] Convert SearchResult to stateless functional component

* [not verified] Move comments to new shared component

* [not verified] Move Tracks out to common SearchResult

* [not verified] Request additional fields for product results

* Correct field names and remove ratings for now

* Basic styling of cards with images

* Add price where available

* Read result_format from the query string

* Use ordered list

* Style cleanup

* Minor cleanup

* Remove resultFormat from component state

* SearchResults component cleanup

* Standardise class names

* Validate result format before using as CSS class

* Address review nits
* Add PhotonImage component

* Bump default dimensions to 300x300

* Bump asset size limit to 100kb
* Add label and button to search box and convert to functional component

* Correct lodash import
* Turn statements into sentence fragments
* Add appropriate landmark roles for elements
* Set portaled widget as a search form
* Use ordered list for search results
* [not verified] Add product search result component

* [not verified] Refactor renderResult into component

* [not verified] Convert SearchResult to stateless functional component

* [not verified] Move comments to new shared component

* [not verified] Move Tracks out to common SearchResult

* [not verified] Request additional fields for product results

* Correct field names and remove ratings for now

* Basic styling of cards with images

* Add price where available

* Read result_format from the query string

* Use ordered list

* Style cleanup

* Minor cleanup

* Remove resultFormat from component state

* SearchResults component cleanup

* Standardise class names

* Validate result format before using as CSS class

* Address review nits
* Add PhotonImage component

* Bump default dimensions to 300x300

* Bump asset size limit to 100kb
* Instant Search: use default values for getting results to avoid duplication

* getResults: default to empty object

Co-Authored-By: Jason Moon <4044428+jsnmoon@users.noreply.github.com>
@mdbitz mdbitz dismissed their stale review February 11, 2020 19:44

items resolved

@mdbitz
Copy link
Contributor

mdbitz commented Feb 11, 2020

@gibrown, @jsnmoon

A quick note about Jeremy's feedback, we need to remove the test for site_has_vip_index function that was removed.

public function test_site_has_vip_index( $expected, $constant = null, $filter = false ) {

Removing it should allow for the tests to pass and we'll be able to approve.

@jsnmoon jsnmoon requested a review from jeherve February 11, 2020 22:55
@jsnmoon jsnmoon dismissed jeherve’s stale review February 11, 2020 22:55

Fixed broken tests and updated the whitelist

@mdbitz mdbitz added [Status] Needs Review To request a review from Crew. Label will be renamed soon. and removed [Status] Needs Author Reply We would need you to make some changes or provide some more details about your PR. Thank you! labels Feb 11, 2020
Copy link
Contributor

@mdbitz mdbitz left a comment

Choose a reason for hiding this comment

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

Thanks for addressing all the feedback 🥇

I'm marking this approved, however I'll rely on @jeherve to see if there is anything special about the WP.com merge as there seems to be a conflict so it can't cleanly create.

Copy link
Member

@jeherve jeherve left a comment

Choose a reason for hiding this comment

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

This is not the easiest thing to review, but most of it seems to work at the moment. I have some comments, but nothing blocking in my opinion. This can all be addressed in follow-up PRs.


I am also getting those notices:

PHP Notice:  Undefined offset: 1 in wp-content/plugins/jetpack-dev/modules/widgets/search.php on line 643
PHP Notice:  Undefined offset: 1 in wp-content/plugins/jetpack-dev/modules/widgets/search.php on line 650

@jeherve jeherve added [Status] Ready to Merge Go ahead, you can push that green button! and removed [Status] Needs Review To request a review from Crew. Label will be renamed soon. labels Feb 12, 2020
@jsnmoon jsnmoon merged commit 9aee29d into master Feb 12, 2020
@matticbot matticbot added [Status] Needs Changelog and removed [Status] Ready to Merge Go ahead, you can push that green button! labels Feb 12, 2020
@jsnmoon
Copy link
Member Author

jsnmoon commented Feb 13, 2020

Thank you for your thorough review, @jeherve! :)

@zinigor
Copy link
Member

zinigor commented Feb 13, 2020

Deployed changes to package and yarn.lock in r202800-wpcom.

@gibrown
Copy link
Member

gibrown commented Feb 13, 2020

Thanks @zinigor

FYI, I will be working on the merge to wpcom early next week. It didn't get auto created.

@jeherve
Copy link
Member

jeherve commented Feb 13, 2020

It didn't get auto created.

That's indeed to be expected right now.

  • Fusion doesn't handle PRs that add new files just yet, so that's something you'll need to do manually.
  • Composer packages aren't quite running on WordPress.com just yet, so PHP files that rely on packages would fail tests once the diff would be created on WordPress.com.

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 [Type] Enhancement Changes to an existing feature — removing, adding, or changing parts of it
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants