WordPress / gutenberg

The Block Editor project for WordPress and beyond. Plugin is available from the official repository.
https://wordpress.org/gutenberg/
Other
10.46k stars 4.18k forks source link

Table: Reorder rows manually #54025

Open bjhomer opened 1 year ago

bjhomer commented 1 year ago

What problem does this address?

It's currently difficult to reorder rows in a table. For example, I was building a table that listed the development status of a bunch of API endpoints. At first, I just had them sorted by the URL, like this:

URL Status
https://example.org/account Done
https://example.org/create-order In Progress
https://example.org/delete-account Done
https://example.org/view-order Waiting

Then I decided that I wanted to group them into sections, like this:

URL Status
Account
https://example.org/account Done
https://example.org/delete-account Done
Orders
https://example.org/create-order In Progress
https://example.org/view-order Waiting

There's not an easy way to reorder existing rows in a table, though. I have to insert blank rows, then copy and paste the contents of each cell one by one. That's inefficient.

What is your proposed solution?

I'd love if, when a cell is focused, there were a control that let me reorder the rows. It could be a floating control to the left of the table with Up/Down arrows. Even better would be a drag handle that let me drag the row into the desired position.

spencerfinnell commented 1 year ago

Previously/related: https://github.com/WordPress/gutenberg/issues/6923