Treat HistoryView item clicks as (de)select in selection mode#3068
Treat HistoryView item clicks as (de)select in selection mode#3068
Conversation
|
| // Go to selection mode | ||
| fireEvent.click(screen.getByTestId("toggle-selection-mode-button")) | ||
|
|
||
| const taskContainer = screen.getByTestId("task-item-1") |
There was a problem hiding this comment.
There's an inconsistency with the test ID naming: in most tests, the task item is referenced with virtuoso-item-1, but in the handles selection mode clicks test, it uses task-item-1. Please verify and update the test ID for consistency.
| const taskContainer = screen.getByTestId("task-item-1") | |
| const taskContainer = screen.getByTestId("virtuoso-item-1") |
This comment was generated because it violated a code review rule: mrule_oAUXVfj5l9XxF01R.
There was a problem hiding this comment.
virtuoso-item- is actually added in a mock, and doesn't have a click handler. I could change this to scope everything by virtuoso-item-1 and then click something within it, but I'm not sure that would have added much.
Context
Address #2457 by changing click task container click action in selection mode to select/unselect rather than going to the task.
Screenshots
before
history-click-before.mov
after
history-click-after.mov
How to Test
Important
In
HistoryView, task item clicks in selection mode now toggle selection instead of opening the task, with updated tests and localization.HistoryView.tsx, clicking a task item in selection mode now toggles selection instead of opening the task.data-testidto the selection mode toggle button for testing.handles selection mode clicksinHistoryView.test.tsxto verify task selection toggling.deselectAllandselectAlltext inhistory.jsonto lowercase.This description was created by
for 0c21c40. You can customize this summary. It will automatically update as commits are pushed.