Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Drag & drop reordering of "chapters" in the Table of Contents #5301

Closed
schlessera opened this issue Feb 28, 2018 · 8 comments
Closed

Drag & drop reordering of "chapters" in the Table of Contents #5301

schlessera opened this issue Feb 28, 2018 · 8 comments
Labels
[Feature] Drag and Drop Drag and drop functionality when working with blocks [Feature] List View Menu item in the top toolbar to select blocks from a list of links. [Type] Enhancement A suggestion for improvement.
Milestone

Comments

@schlessera
Copy link
Member

I think it would be useful to be able to reorder "chapters" through drag & drop in the "Table of Contents" section in the right sidebar.

image 2018-02-28 at 11 16 05 am

Dragging a specific heading would move that heading and all blocks immediately below it up to and excluding the next heading of the same level.

Dragging headings could also change their level, depending on where you drag them to.

Let's go through a quick example of how I think this could work.

  • A "chapter" is the heading block that was selected, and all blocks immediately following up to and excluding the next heading of the same level or up to the end of the document.
  • If the author drags the entry "H2 The Inserter Tool" entry below the "H2 Media Rich" entry, the "H2 The Inserter Tool" chapter gets moved below the "H2 Media Rich" chapter and is the last chapter in the document from then on.
  • If the author drags the entry "H3 Sub-heading A" on top of the "H2 The Inserter Tool", the chapter "H3 Sub-heading A" moves from being a sub-chapter of "H2 Visual Editing" to being a sub-chapter of "H2 The Inserter Tool".
  • If the author drags the entry "H3 Sub-heading B" between the entries "H2 The Inserter Tool" and "H2 Visual Editing", the chapter "H3 Sub-heading B" gets moved in-between these two chapters and changes its level to "H2 Sub-heading B".

This would make re-ordering the structure of a larger document much faster and easier (no need to scroll around over multiple pages of content) and less error-prone (like copy-pasting only partial chapters).

@schlessera schlessera added the [Feature] Writing Flow Block selection, navigation, splitting, merging, deletion... label Feb 28, 2018
@mtias mtias added the [Type] Enhancement A suggestion for improvement. label Mar 6, 2018
@mtias mtias added this to the Bonus Features milestone Mar 6, 2018
@Soean Soean added the [Feature] Drag and Drop Drag and drop functionality when working with blocks label Jun 28, 2018
@ZebulanStanphill
Copy link
Member

ZebulanStanphill commented Jul 11, 2018

This issue should probably be renamed to “Drag & drop reordering of “chapters” in the Document Outline”, since the Table of Contents is now called the Document Outline.

Also, to quote myself in the duplicate issue, #7888:

Side note: it would be nice if there was a version of the Document Outline that included all blocks instead of just Heading blocks. That would be even more useful to have a drag-and-drop enhancement for. Maybe a toggle on the Document Outline pop-up to show all blocks?

@paaljoachim
Copy link
Contributor

paaljoachim commented Oct 23, 2018

The Table of Contents seems fairly similar to the Insert Summary feature #7115 and the Block navigation feature.

@ZebulanStanphill
Copy link
Member

Should this issue be closed in favor of #5301 or vice-versa? Also, since there is now a Block Navigation menu, would it still make sense to add drag and drop to the Document Outline as well?

@youknowriad youknowriad modified the milestones: WordPress 5.x, Future Mar 25, 2019
@mtias mtias added the [Feature] List View Menu item in the top toolbar to select blocks from a list of links. label Nov 17, 2019
@ellatrix
Copy link
Member

It would be nice if the block navigation and document outline could be combined (blocks collapse into headings) and we just implement drag and drop once in this list. :)

@paaljoachim
Copy link
Contributor

paaljoachim commented Jan 22, 2021

Buzzing @shaunandrews to this issue...

@shaunandrews
Copy link
Contributor

I'm with @ellatrix on this one; I have a hard time justifying the existence of both the Document Outline and the List View. There's long been talk of combining the two UI's somehow, and I think that's likely the better solution to work towards.

@priethor
Copy link
Contributor

Ongoing PR that combines the document outline and the List View, which supports Drag&Drop: #14956

@mtias
Copy link
Member

mtias commented Jul 27, 2022

I think we can close this as it's supported in List view. We should fold the outline into it eventually, probably as a filtered down view (display only headings).

@mtias mtias closed this as completed Jul 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Drag and Drop Drag and drop functionality when working with blocks [Feature] List View Menu item in the top toolbar to select blocks from a list of links. [Type] Enhancement A suggestion for improvement.
Projects
None yet
Development

No branches or pull requests

10 participants