Skip to content

feat: allow block/table copy and drag#762

Open
usman-khalid wants to merge 3 commits intoadobe:mainfrom
usman-khalid:drag-table
Open

feat: allow block/table copy and drag#762
usman-khalid wants to merge 3 commits intoadobe:mainfrom
usman-khalid:drag-table

Conversation

@usman-khalid
Copy link
Contributor

Description

Introduces a tableDragHandle plugin which:

  • adds ability to drag and drop blocks/tables (useful for restructuring content easily in the editor)
  • adds ability to select an entire table and copy

Related Issue

#761

Motivation and Context

It can be difficult currently for authors to move blocks around on a page or copy blocks easily, as you have to drag your cursor across all cells of a table and then copy/paste.

How Has This Been Tested?

Screenshots (if appropriate):

2026-01-28 10 03 24

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • I have signed the Adobe Open Source CLA.
  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@aem-code-sync
Copy link

aem-code-sync bot commented Feb 4, 2026

Page Scores Audits Google
📱 / PERFORMANCE A11Y SEO BEST PRACTICES SI FCP LCP TBT CLS PSI
🖥️ / PERFORMANCE A11Y SEO BEST PRACTICES SI FCP LCP TBT CLS PSI

chrischrischris
chrischrischris previously approved these changes Feb 4, 2026
Copy link
Contributor

@chrischrischris chrischrischris left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

Lets wait for #741 to be merged before this one as that refactors how plugins are loaded.

@auniverseaway
Copy link
Member

I've been thinking quite a bit about this feature. I think we can simplify to get something everyone will be happy with.

Overarching thoughts on the current implementation

  1. Most blocks have content in them: images, text, headings, lists, etc. as such, this demo video is a bit misleading on how this would work with real content (totally fine).
  2. Many (most?) authors are on laptops. At this viewport size, authors will likely have to click, hold, drag up, and have the window also scroll while still holding a mouse button. We've all been here before. This will be tedious and an accessibility nightmare in the real world.

Proposed solution to move forward

  1. Leave the handle.
  2. Click to expose a menu containing select, copy, or cut functions.
  3. Authors do whatever they want.

To me, this is going to be a simpler and more accessible way for authors to move blocks around without going overboard with our own word processor conventions... and yes, Google Docs has this feature and it also has accessibility issues.

Screencast.From.2026-02-08.10-39-44.webm

Copy link
Member

@auniverseaway auniverseaway left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See notes.

@chrischrischris chrischrischris self-requested a review February 9, 2026 14:55
@usman-khalid
Copy link
Contributor Author

usman-khalid commented Feb 9, 2026

I've been thinking quite a bit about this feature. I think we can simplify to get something everyone will be happy with.

Overarching thoughts on the current implementation

  1. Most blocks have content in them: images, text, headings, lists, etc. as such, this demo video is a bit misleading on how this would work with real content (totally fine).
  2. Many (most?) authors are on laptops. At this viewport size, authors will likely have to click, hold, drag up, and have the window also scroll while still holding a mouse button. We've all been here before. This will be tedious and an accessibility nightmare in the real world.

Proposed solution to move forward

  1. Leave the handle.
  2. Click to expose a menu containing select, copy, or cut functions.
  3. Authors do whatever they want.

To me, this is going to be a simpler and more accessible way for authors to move blocks around without going overboard with our own word processor conventions... and yes, Google Docs has this feature and it also has accessibility issues.

Screencast.From.2026-02-08.10-39-44.webm

@auniverseaway - good point about the demo tables - most use cases would likely have content making them taller which would make dragging difficult (although I do think there's value in letting authors do this - in a lot of cases you simply want to move a block after a section break that's immediately after or something similar). But happy to remove the ability to drag if there's an accessibility concern here.

Re: exposing a menu on click - I don't think we even need this? Cut and copy have fairly standard shortcuts that most people already know. This plugin already allows you to click the handle to select the entire table. The author can then just choose to cut/copy via keyboard.

Attaching demo. Let me know your thoughts and I'll just remove the drag & drop.

2026-02-09 16 02 13

@auniverseaway
Copy link
Member

Great work. My vote:

  1. Let's do only select for now [1].
  2. Lean on keyboard shortcuts.

[1] Having this research in our pocket is going to be helpful later on. "Have you thought about?" is something we hear a lot from customers.

@usman-khalid
Copy link
Contributor Author

Great work. My vote:

  1. Let's do only select for now [1].
  2. Lean on keyboard shortcuts.

[1] Having this research in our pocket is going to be helpful later on. "Have you thought about?" is something we hear a lot from customers.

@auniverseaway — updated to remove drag&drop functionality. Just allows table select now when the icon is clicked.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants