Skip to content

Add locked rows, reorder mode and screen reader support to MRT row reordering - #374

Open
zoharma wants to merge 3 commits into
mainfrom
zma/mrt-row-reorder-advanced
Open

zoharma wants to merge 3 commits into
mainfrom
zma/mrt-row-reorder-advanced

Conversation

@zoharma

@zoharma zoharma commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

Brings upstream the reordering work Atlas built on top of #344 (DiamondLightSource/atlas#236), plus further fixes.

From Atlas:

  • Lock rows with isRowMovable (no handle, no drop, no menu)
  • Move to top / bottom in the row menu
  • Drop rows looked up by id, so data changes mid-drag are safe
  • useRowReorder for a toggleable reorder mode

Added here:

  • Screen reader announcements; the drag handle is no longer a tab stop
  • Follow a row moved to another page and refocus its actions button
  • Ranked search results off while reordering
  • Fix a leaked dragover listener
  • Replace MRT's dashed drop box on locked rows
  • Hide the reorder columns from the Show/Hide menu

@zoharma
zoharma requested a review from a team November 9, 2026 15:17
@zoharma zoharma added the priority/p2-medium Planned, should do label Nov 9, 2026
@zoharma

zoharma commented Nov 10, 2026

Copy link
Copy Markdown
Contributor Author

@gfrn I was confused. Still need to review #344 first.

- Add isRowMovable to lock rows from drag, drop and the row menu
- Add Move to top / Move to bottom to the row menu
- Announce moves to screen readers; the drag handle is no longer a tab stop
- Follow a row moved to another page and refocus its actions button
- Look up dropped rows by id so data changes mid-drag are safe
- Turn off ranked search results while reordering
- Stop the dragover tracker when the dragged row is removed or a new drag starts
- Replace MRT's dashed drop box on locked rows
- Hide the reorder columns from the Show/Hide columns menu
- Add useRowReorder for a toggleable reorder mode
- Make the advanced dev table edge to edge
@zoharma
zoharma force-pushed the zma/mrt-row-reorder-advanced branch from 592d89a to 0868fad Compare November 12, 2026 10:58
@zoharma zoharma added this to the 0.9.0 milestone Nov 12, 2026
Comment thread src/themes/useRowReorder.test.tsx Resolved
- Replace the direct act() call with a rendered button clicked via userEvent

- Drop the unused act import
@zoharma
zoharma requested a review from gfrn November 13, 2026 10:41
@zoharma

zoharma commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor Author

@gfrn Can you please check again? Your comment was implemented.

gfrn
gfrn previously approved these changes Nov 20, 2026
@gfrn

gfrn commented Nov 20, 2026

Copy link
Copy Markdown
Collaborator

Looks good to me!

@zoharma

zoharma commented Nov 23, 2026

Copy link
Copy Markdown
Contributor Author

Thanks @gfrn! Sorry need another approval after conflict merge (changelog only)

@zoharma
zoharma requested a review from gfrn November 23, 2026 13:16
@gfrn

gfrn commented Nov 23, 2026

Copy link
Copy Markdown
Collaborator

Ah yes! Thanks, I always forget about the changelog

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

priority/p2-medium Planned, should do

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants