mozilla / perfcompare

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

Compare overtime checked and displayed revisions #640

Closed Carla-Moz closed 5 months ago

Carla-Moz commented 5 months ago

This PR fulfills the requirements of Handle checked and displayed selected revisions. This is the last remaining part of the Compare over time component. The hash to hide it is removed. The "Compare" button will remain disabled (see this commit) until the next PR to add react-router config to fetch the data.

New File Created: In this commit, I created a new file called useSearchResults because both the Revisions component in "With base" and "Overtime" handle the search results toggle the same way, including showing the error when the user attempts to select more than 3 revisions. This required updating the CompareWithBase file.

Style Tweaks: In this commit, I did a small update on styles/SearchContainerStylesand styles/Documents to better reflect the overflow of the search results dropdown.

Update test coverage in CompareOvertTime.test: please check this commit.

Side note: I talked to Dasha about toggling the display of the "Compare with Base" and "Compare Over time" component in which clicking on one hides the content below their respective headers so they function like radio buttons. This is not handled in this PR but something I think would be helpful to do in a future PR.

netlify[bot] commented 5 months ago

Deploy Preview for mozilla-perfcompare ready!

Name Link
Latest commit 936c88e4b196f817fbbb9097d485873dcbd5dce9
Latest deploy log https://app.netlify.com/sites/mozilla-perfcompare/deploys/66342b09624d6d0008507398
Deploy Preview https://deploy-preview-640--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 5 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 97.88%. Comparing base (7e0f0bc) to head (936c88e).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## beta #640 +/- ## ========================================== + Coverage 97.76% 97.88% +0.11% ========================================== Files 66 66 Lines 1387 1417 +30 Branches 235 241 +6 ========================================== + Hits 1356 1387 +31 + Misses 29 28 -1 Partials 2 2 ```

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

julienw commented 5 months ago

Side note: I talked to Dasha about toggling the display of the "Compare with Base" and "Compare Over time" component in which clicking on one hides the content below their respective headers so they function like radio buttons. This is not handled in this PR but something I think would be helpful to do in a future PR.

Yeah I don't like the current situation much either, happy to improve it in any way.