-
Notifications
You must be signed in to change notification settings - Fork 337
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
Copy & Paste for Blocks #6436
Comments
@mavuio This is a really nice prototype, Thank you for providing this 🚀 |
As note for myself here and the @sulu/core-team we also need to decide if the Image Map Content Type should have similar functionality then. But I think we also have not yet there the |
We decided to add this feature to our next milestone. Design to match the sulu look and feel is in progress for it. |
hi ! i'm glad you're implementing that feature. because i see "Implement block action for copying and cutting a single block #6630" ➜ will you support only actions on a single block or are you also planning implementing multi-block actions ? the copying of a whole list of blocks is a real time-saver in my daily work, the single block copy is fine, but |
@mavuio multi is also planned with 2.5 but will be an own pull request. |
…locks (#6669) * Implement prototype with copy & paste functionality See #6436 * Add BlockToolbar for multi copy and paste functionality * Add UPGRADE for draftHandle to draft rename * Implemented copy, cut, duplicate, delete multiple selected blocks * Implement design for selected blocks * Add handling of removing and block mode selection * Fix flow issues * Update blocks snapshots * Fix js lint * Add test case for selected block * Add SelectionHandle test case * Update BLockCollection snapshots * Reenable error ons reaching limits * Fix selection scss import * Add test for every block toolbar action * Add test case for SortableBlock Mode * Fix deprecation * Update snapshots * Change handleSelect to handleSelect and handleUnselet * Update UPGRADE.md Co-authored-by: Luca Rath-Heel <luca-rath@hotmail.com> * Update src/Sulu/Bundle/AdminBundle/Resources/js/components/BlockCollection/SortableBlockList.js Co-authored-by: Luca Rath-Heel <luca-rath@hotmail.com> * Fix overflow issue in block content part * Rename selection mode to selectable mode * Fix linting * Fix mode selection to selectable Co-authored-by: Manfred Wuits <manfred@mavu.io> Co-authored-by: Luca Rath-Heel <luca-rath@hotmail.com>
hi !
i'd like to have a copy&paste feature in the block-editor, and am willing to contribute such a feature to
sulu.
i have started to implement a basic working version of that feature in my own fork and want to discuss the details of how
the feature could work.
TOC:
A) the basic feature would be:
copy: to enable editors to select one or many blocks from a single List (top or nested "SortableBlockList") and copy them
to a clipboard attached to the editor's session
paste: the block(s) on the clipboard can then be inserted into any other Block-List ("SortableBlockList") which the editor has access to.
blocks can only be pasted if all of them could be created with a simple "add block" click at the target -location as well
(taking valid block-types and list-limits into account)
B) UX design:
B1) action-button:
i would propose a dedicated kind of "action"-button for each block, which reveals a context menu with a list of available actions for that block:
the placement and design of this needs to be discussed (i placed it at the bottom right of the block for now), also the popup-menu and its icons and wording.
B.2) multi-select:
when clicking "multi-select" i'd suggest to start a multi-select mode:
we'd need to enable checkboxes for each block to be selected, and some buttons
similar how that looks like in my other-php-CMS:
or in my other-elixir-CMS:
for sulu-UX i'd suggest we just turn each action-button within the activated list into a checkbox if multi-select mode
ist started and add a somehow highlighted button-area on top.
as you see from my examples i also included some none copy-paste features in the multi-select mode, which may be of interest:
B.3) paste:
pasting is also triggered with the action-button e.g. like here:
the only drawback with this solution occurs, when at the target list there is no block present to begin with, as then there's no action button to click
i have a version with "paste here" buttons at the end of the list (and between the blocks) as well, but that feels a bit more obstrusive:
maybe a paste-here at the end of the list besides the add button + the action-item solution does the trick ?
B.4) action-menu items:
first we need to agree which actions we want, then on their exact wording:
B.5) add block
then optionally we could also do:
solving maybe #6103 ?
B.6) hide unhide ?
btw: when at it, i'd also like to have:
hide / unhide
as a quick way to toggle "Don't display on public website" for one or many blocks
C) code implementation details
not much to talk about yet
i just need a basic confirmation of which of those features you want to allow in sulu-core,
where the basic UX-placement could be (exact ui-design might need a longer decision-process in parallel)
so that i find the right abstractions within the react components, to come up with a PR
which is not totally off what might get accepted.
after that i'd go on with asking about code-specific questions,
like:
➜ looking forward to your feedback and holiday-greetings from vienna.
The text was updated successfully, but these errors were encountered: