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

Block copy/paste: Paste missing a snackbar & should it replace or append? #49255

Open
jasmussen opened this issue Mar 22, 2023 · 6 comments
Open
Labels
[Feature] Paste + Raw Handling Related to the ability to convert content to blocks, paste handling, etc [Type] Discussion For issues that are high-level and not yet ready to implement. [Type] Enhancement A suggestion for improvement.

Comments

@jasmussen
Copy link
Contributor

When I select a block and press ⌘C, the block gets copied, highlighted by a snackbar.

There's no snackbar when I paste, making it unclear that it actually worked, because the paste action replaces the block.

Shown in this GIF, successfully copying a post title block. Not visible in the GIF is me pressing ⌘V repeatedly to paste. If you see the list view, the ellipsis blinks, indicating that the block actually does get replaced. But without a snackbar confirming this, it isn't obvious:

copy paste

Outside of the snackbar, I wonder: should the block-level paste action always replace, or should it append? My expectation from other design apps is that it should append. This is different from a partial text selection, where I would expect it to replace.

@jasmussen jasmussen added [Type] Enhancement A suggestion for improvement. [Type] Question Questions about the design or development of the editor. [Feature] Paste + Raw Handling Related to the ability to convert content to blocks, paste handling, etc labels Mar 22, 2023
@richtabor
Copy link
Member

I don't think we need a paste snackbar—if you can see a result of pasting, though the "copied" snackbar is helpful as there is no other indicator of success.

But it looks like in the recording, you're technically copying the block—but pasting the block's styling. Copy/pasting blocks and styles are essentially the same action, just dependent on if you're selected on another block or not.

Here's the same flow, but showing the styles being applied:

CleanShot.2023-03-22.at.15.26.06.mp4

But we do have a snackbar that indicates the result of copying/pasting styles, when you use the "Copy styles" and "Paste styles" controls (which I also don't think is necessary; there is already a visual indication of styles pasted).

CleanShot.2023-03-22.at.15.30.33.mp4

We should consider making "Copy/Paste" aways append (not have the dual function as copying/pasting styles) and maintain a copied snackbar. And perhaps use that same logic for the Copy/Paste of styling (copied snackbar).

@jasmussen
Copy link
Contributor Author

I appreciate your attention to detail and a non-intrusive flow, but in the two videos you shared, it actually wasn't clear enough to me visually that a paste operation was succesful.

We should consider making "Copy/Paste" aways append (not have the dual function as copying/pasting styles) and maintain a copied snackbar. And perhaps use that same logic for the Copy/Paste of styling (copied snackbar).

That seems a good starting point, as it would accomodate a clear visual paste operation. But in absence of this, I'd add a paste snackbar.

@richtabor
Copy link
Member

I appreciate your attention to detail and a non-intrusive flow, but in the two videos you shared, it actually wasn't clear enough to me visually that a paste operation was succesful.

The pasting I demonstrated was pasting of the styles (the color/font sizes) — not appending a new block. :)

@jasmussen
Copy link
Contributor Author

Oh sure, and although that has some visual effect if the copied block has styles, if it doesn't, you won't know it worked. It's not a strong opinion, but I think snackbars are kinda perfect for this, my main frustration here is that the snackbars linger for so long.

@richtabor
Copy link
Member

Ah, I'm following now. :)

…my main frustration here is that the snackbars linger for so long.

Yes.

@kevin940726
Copy link
Member

But it looks like in the recording, you're technically copying the block—but pasting the block's styling. Copy/pasting blocks and styles are essentially the same action, just dependent on if you're selected on another block or not.

Pasting styles actually have a totally different flow though, and the original gif is not that flow.

Seems like pasting a block on another block always replaces the original block. The exception is when the user focuses on a rich-text element rather than selecting the whole block. In that case, pasting a block triggers onSplit and inserts a block at the desired location. Though it may seem confusing, I think it's behaving as expected. (c.c. @ellatrix in case I'm wrong)

That said, the question in the title is still valid though, and we can discuss more in this issue :).

@kevin940726 kevin940726 added [Type] Discussion For issues that are high-level and not yet ready to implement. and removed [Type] Question Questions about the design or development of the editor. labels Apr 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Paste + Raw Handling Related to the ability to convert content to blocks, paste handling, etc [Type] Discussion For issues that are high-level and not yet ready to implement. [Type] Enhancement A suggestion for improvement.
Projects
None yet
Development

No branches or pull requests

3 participants