Bug-1986319: Allow auto selection of full hash matches#1024
Bug-1986319: Allow auto selection of full hash matches#1024moijes12 wants to merge 1 commit intomozilla:mainfrom
Conversation
Updated `SearchInputAndResults` to: * Track input value as state * Check if the input is a hash and if it matches an existing has * Auto select the hash if it matches the full hash
✅ Deploy Preview for mozilla-perfcompare ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1024 +/- ##
==========================================
- Coverage 96.18% 95.86% -0.32%
==========================================
Files 110 110
Lines 3143 3166 +23
Branches 708 715 +7
==========================================
+ Hits 3023 3035 +12
- Misses 118 129 +11
Partials 2 2 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
| }, []); | ||
|
|
||
| // Helper to check if the search term matches a full 40 character revision hash | ||
| const isFullRevisionHash = (searchTerm: string) => |
There was a problem hiding this comment.
Since we are permitting partial searches (by short hash), this improvement should also apply to short hashes, not solely to full revision hashes.
Note: This request improvement was added by me in bugzilla, but it is actually something that came up in our latest feedback google form. It's missing some details and it was anonymous, so we'll need to make some decisions regarding the behaviour.
@kala-moz What do you think?
There was a problem hiding this comment.
@beatrice-acasandrei I agree with your comment on the bug. The behavior should remain the same except now the checkbox is checked and the revision is shown in the component after the hash is pasted. This should also work for short hashes.
|
@moijes12 I've run out of time today so I'll review this tomorrow! |
Sure Kala. |
kala-moz
left a comment
There was a problem hiding this comment.
Thanks for taking this on! Right now this somewhat works for full hashes. The problem is that after pasting the full hash, the revision dropdown doesn't appear below the search input so the user can't change their selection. And if the user manually deletes the revision from the view, the revision dropdown still doesn't appear. The user is stuck with their original selection. We'll have to investigate why this happens. And like Beatrice said, this should also work for short hashes.
Updated
SearchInputAndResultsto:@kala-moz @beatrice-acasandrei
Fixes Bug-1986319