Automattic / Automattic/simplenote-electron
[Search] Match position indicator does not update when matches number changes
- Dominant language
- TypeScript
- Stars
- 5.3k
- Forks
- 588
- Avg merge
- 9h 45m
- Merged PRs (30d)
- 4
Description
### Expected
If the note is edited while search mode is active, the position indicator (`2 of 5` thing) should update the current position digit, if matches number changes.
### Observed
Current position indicator never changes regardless of matches number:
https://user-images.githubusercontent.com/73365754/112330234-86e9a280-8cc0-11eb-895e-d97d49d43ac9.mov
### Reproduced
1. Have a note with multiple instances of `word` in it
2. Search for `word`
3. Move the current match position in a note with `>` button or with `Ctrl/Cmd+G`, so that it becomes greater than one (e.g. `5 of 5`)
4. Start removing the instances of `word` until one remains ~> the indicator will show `5 of 1`
### Where did you see the bug
For example in
- System Make: Parallels Desktop on MBP 16"
- OS: Windows
- OS version: 10 Home 20H2 build 19042.508
- Simplenote app version: 2.9.0-beta1 desktop
Contributor guide
Research direction
Reproduce the issue in the Simplenote desktop app by editing a note while search mode is active and reducing the number of matches. Trace the search position indicator update path; done means the current-position digit stays valid when matches change, including the reproduced `5 of 1` case.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- desktop
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100