hypothesis / lms

LTI app for integrating with learning management systems
BSD 2-Clause "Simplified" License
45 stars 14 forks source link

Navigate in dashboard tables when "confirming" a row #6339

Closed acelaya closed 1 month ago

acelaya commented 1 month ago

Allow navigating to the corresponding course or assignment when "confirming" a dashboard activity table row (double-clicking or pressing Enter when the row is focused).

https://github.com/hypothesis/lms/assets/2719332/ec89da2f-c9d5-4436-b728-c9781e813595

Testing steps

  1. Check out this branch.
  2. Open a an assignment dashboard.
  3. Navigate one level up, to the course view.
  4. Double-click any of the assignment rows. You should be taken to that assignment's view.
  5. Go back to the course view again, then use the Tab key to focus elements until the first row is focused.
  6. Using the arrow keys, move focus to any assignment row, then press Enter. You should be taken to that assignment's view.

The same should work in the home view.

acelaya commented 1 month ago

I think some confusion might arise from rows showing a pointer cursor and different background color on hover, yet they are not selected and don't do anything when single-clicked. One way to address this would be to allow for the selection of rows, even if we don't take advantage of the selection in any way yet. I could imagine in future that we might show some contextual information that depends on the selected row.

I would personally find it more intuitive that navigation happened on single-click, not on double-click. That would address that kind of confusion without having to deal with selections for now.

However, there's no straightforward way to achieve that without internal changes in the DataTable. That was the reason I opened https://github.com/hypothesis/frontend-shared/pull/1576