MHR and PPR | Retrieve, Column Search and Filter | Persistent Highlight & Auto-Focus in Search Results
- Dominant language
- JavaScript
- Stars
- 23
- Forks
- 62
- Avg merge
- 24m
- Merged PRs (30d)
- 1
Description
## User Story
**As a** registry staff member,
**I want** the system to keep the matched row highlighted, even after I open and review that registration,
**So that** I can always see which record I’m working on, and automatically jump to the next one when I perform a new Retrieve Search or choose a different row.
### Context
Staff is frustrated at loosing the record that they are looking at.. The highlight seemed to work before but no longer seems to be working as expected. Through conversation it became clear that there were some other needs that would help staff do their work more efficiently so rather than editing a bug I created this story.
#### UX/UI Link:
_To be added_
### Business Rules
- [ ] On submitting a **Retrieve Search** value, the system must:
- [ ] Locate the first **Registration Number** match.
- [ ] Scroll the table to that row and apply a persistent highlight, row color, bold whatever works
- [ ] Set keyboard focus to the highlighted row.
- [ ] The highlight **persists** when the analyst:
- [ ] Opens the registration details and then returns to the list.
- [ ] Navigates away and back via browser Back/Forward.
- [ ] The highlighted row is **replaced** when:
- [ ] A new Retrieval is executed and returns a match.
- [ ] A search in the column is executed
- [ ] The analyst clicks or arrow-keys onto a different row.
- [ ] Table filters/search are adjusted and produce a new first visible match.
- [ ] Only **one** row can be highlighted at any time.
- [ ] If no match exists, display non-blocking toast “No matching record found.”
### Acceptance Criteria / Scenarios
1. **Locate & Persist**
- **GIVEN** a results table with 100+ rows (Liz I'm guessing the number of rows here)
**WHEN** I enter a valid registration number and press **Enter**
**THEN** the table scrolls to the matching row
**AND** the row receives the highlight style
**AND** I open the registration details and return
**THEN** the same row is still highlighted and scrolled into view.
2. **Replace Highlight on New Retrieve or Column Search**
- **GIVEN** a row is highlighted
**WHEN** I run a new Retrieval or Column search that finds a different row
**THEN** the table scrolls to the new match
**AND** the previous highlight is removed
**AND** the new match is now highlighted.
3. **Click to Change Focus**
- **GIVEN** a row is highlighted
**WHEN** I click another row in the table
**THEN** the clicked row gains the highlight
**AND** the previous highlight is removed.
4. **No Match Scenario**
- **GIVEN** I enter a registration number with no corresponding row
**WHEN** I press **Enter**
**THEN** the table position does not change
**AND** a toast notification “No matching record found” appears for 5 s.
### Notes
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with the results table and the Retrieve Search, column-search, row-selection, and registration-details return flows. Trace how the selected row and table position are currently managed, then verify behavior for matching, non-matching, navigation, and row replacement scenarios. Done means one highlighted row persists as specified and the no-match toast appears without changing the table position.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- frontend
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100