Bug 1986319: Auto-select for full hash matches#1066
Open
moijes12 wants to merge 2 commits into
Open
Conversation
- Automatically select a revision when a full 40-character hash or a partial hex hash (length >= 4) matches exactly one result or matches a result's revision hash. - Ensure the revision dropdown remains open after auto-selecting a full 40-character hash. - Automatically open the revision dropdown when a selected revision is removed from the view. - Added a new test suite `src/__tests__/Search/SearchAutoSelect.test.tsx` to verify these behaviors. - Updated existing snapshots in `src/__tests__/Search/__snapshots__`.
Updating screenshots
✅ Deploy Preview for mozilla-perfcompare ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview
Automatically select a single matching revision from search results (partial or full hash), and keep the autocomplete dropdown open when a full 40-char hash is pasted. Also reopen the dropdown when a selected revision is removed. Adds tests and updates snapshots.
Changes Introduced
Files Modified
src/components/Search/SearchInputAndResults.tsx: added isDropdownOpen state, refs, effects, and open/onOpen/onClose handlers; updated input/change handlers and selection logic.src/tests/Search/SearchAutoSelect.test.tsx: tests for auto-selection and dropdown behavior.Testing
Fixes Bug-1986319
@kala-moz @beatrice-acasandrei