mozilla / perfcompare

Improved Performance Comparison Tool
Mozilla Public License 2.0
39 stars 93 forks source link

Extract a component `SearchInputAndResults` for the `SearchInput` and its dropdown #635

Closed julienw closed 6 months ago

julienw commented 6 months ago

Extracting these 2 components into a separate comment makes sense in terms of component responsibilities. Indeed the SearchInput controls its Dropdown. Using a component to contain both makes it possible for this component to keep all the necessary state to control this behavior This is also common code for both SearchOverTime and SearchView, so it makes sense to extract it.

Please look at the two last commits only. Commit 1: this extracts the common code to a separate component Commit 2: this changes this component to make it more generic, so that it works the same for both CompareWithBase and CompareOverTime, without relying on class names. There are a bunch of snapshot changes because this adds a new container to the pair SearchInput / SearchResultsList, if you look at them by disabling whitespace changes it is much easier to see these changes.

netlify[bot] commented 6 months ago

Deploy Preview for mozilla-perfcompare ready!

Name Link
Latest commit 91801b929b9afa8bc6ed0132ea6c5ca0cc3d7fb7
Latest deploy log https://app.netlify.com/sites/mozilla-perfcompare/deploys/66154a4058702400085a29e8
Deploy Preview https://deploy-preview-635--mozilla-perfcompare.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

codecov[bot] commented 6 months ago

Codecov Report

Attention: Patch coverage is 97.77778% with 1 lines in your changes are missing coverage. Please review.

Project coverage is 98.67%. Comparing base (884b00c) to head (545ebf7).

:exclamation: Current head 545ebf7 differs from pull request most recent head 91801b9. Consider uploading reports for the commit 91801b9 to get more accurate results

Files Patch % Lines
src/components/Search/SearchOverTime.tsx 75.00% 1 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## beta #635 +/- ## ========================================== - Coverage 98.68% 98.67% -0.02% ========================================== Files 63 64 +1 Lines 1372 1358 -14 Branches 217 212 -5 ========================================== - Hits 1354 1340 -14 Misses 16 16 Partials 2 2 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.