mozilla / perfcompare

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

Filter columns #673

Closed julienw closed 3 months ago

julienw commented 4 months ago

This implements filtering by column.

The initial commits in the PR are #678 so please don't look at them here. Then the commits are:

  1. update the user-event library: indeed the new version expose a type that I'd like to use in the tests
  2. Some moving around of types. This also removes some types that are not used.
  3. Some more refactoring around how the short platform name and icon are computed. Indeed I want to reuse this in the filtering.
  4. This is the meat of the PR, where the implementation for filtering happens. I tried to implement this so that we'd loop over the results only once for filtering. Ideally we'd do the "processResults" in the same loop too, but decided to leave this for future work, also to keep the code cleaner.
  5. This changes the "expand icon" to a "filter icon". Indeed I wanted to provide an indicator when a filter is active on a column. It's only conveyed by the color so it's not perfect, but I still added some title and aria-label to try to provide a good accessibility.
  6. and 7. are about tests.

It's not 100% perfect, especially the style for the filtering menu should be polished. Indeed some other styles are conflicting with that and I'd like to work on that in another PR.

deploy preview

netlify[bot] commented 4 months ago

Deploy Preview for mozilla-perfcompare ready!

Name Link
Latest commit fd0c11bfd0bbbfe68432a8b2bb096820e0c74dc5
Latest deploy log https://app.netlify.com/sites/mozilla-perfcompare/deploys/667961d6fded320008de3742
Deploy Preview https://deploy-preview-673--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 4 months ago

Codecov Report

Attention: Patch coverage is 97.27273% with 3 lines in your changes missing coverage. Please review.

Project coverage is 91.46%. Comparing base (2a6c2f2) to head (170af90).

:exclamation: Current head 170af90 differs from pull request most recent head fd0c11b

Please upload reports for the commit fd0c11b to get more accurate results.

Files Patch % Lines
src/components/CompareResults/TableHeader.tsx 94.87% 1 Missing and 1 partial :warning:
src/components/CompareResults/ResultsTable.tsx 98.18% 1 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## beta #673 +/- ## ========================================== - Coverage 91.47% 91.46% -0.01% ========================================== Files 70 71 +1 Lines 1653 1710 +57 Branches 301 311 +10 ========================================== + Hits 1512 1564 +52 - Misses 112 116 +4 - Partials 29 30 +1 ```

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