Skip to content

Forward port fix #8410: copy/cut/paste blocks inside container blocks to … - #8417

Open
nileshgulia1 wants to merge 1 commit into
mainfrom
fix-copy-blocks-19
Open

Forward port fix #8410: copy/cut/paste blocks inside container blocks to …#8417
nileshgulia1 wants to merge 1 commit into
mainfrom
fix-copy-blocks-19

Conversation

@nileshgulia1

Copy link
Copy Markdown
Member

…main

Ports the container-level multi-selection and clipboard toolbar from fix-copy-blocks-eea-style (Volto 18) to main (Volto 19).

Changes:

  • Container/Edit.jsx: container-local selected/multiSelected state and BlocksToolbar for child blocks.
  • Container/EditBlockWrapper.jsx: pass modifier clicks through to child selection instead of forcing single selection.
  • Block/Edit.jsx: detect events originating in nested block forms and only activate the container as a single selection; preserve modifier click semantics on the container chrome.
  • Form/Form.jsx: use props.uiState.selected when promoting the active block into a multi-selection; avoid null ghost selections.
  • BlocksToolbar.jsx + cloneBlocks.ts: read blocksClipboard from the split localStorage keys (blocksClipboard.cut / blocksClipboard.copy) written by persistentReducers, fixing cross-tab sync/remount restore.
  • Add unit tests for Block/Edit, Container/Edit, and Form selection.
  • Add Cypress tests for copy/cut into Grid.

Adapted for main:

  • Kept Volto 19 saveAsDraft wiring in Form.jsx/Form.test.jsx.
  • Container/Edit.test.jsx uses main's Loadable.jsx mock path.

Refs #8410


If your pull request closes an open issue, include the exact text below, immediately followed by the issue number. When your pull request gets merged, then that issue will close automatically.

Closes #


If your pull request includes changes to the documentation—either in narrative documentation, Storybook, or configuration—then a pull request preview will be generated and a link will populate in the description of your pull request below.
By clicking that link, you can use the visual diff menu in the upper right corner to navigate to pages that have changes, then display the diff by checking the Show diff checkbox.

…main

Ports the container-level multi-selection and clipboard toolbar from
fix-copy-blocks-eea-style (Volto 18) to main (Volto 19).

Changes:
- Container/Edit.jsx: container-local selected/multiSelected state and
  BlocksToolbar for child blocks.
- Container/EditBlockWrapper.jsx: pass modifier clicks through to child
  selection instead of forcing single selection.
- Block/Edit.jsx: detect events originating in nested block forms and
  only activate the container as a single selection; preserve modifier
  click semantics on the container chrome.
- Form/Form.jsx: use props.uiState.selected when promoting the active
  block into a multi-selection; avoid null ghost selections.
- BlocksToolbar.jsx + cloneBlocks.ts: read blocksClipboard from the
  split localStorage keys (blocksClipboard.cut / blocksClipboard.copy)
  written by persistentReducers, fixing cross-tab sync/remount restore.
- Add unit tests for Block/Edit, Container/Edit, and Form selection.
- Add Cypress tests for copy/cut into Grid.

Adapted for main:
- Kept Volto 19 saveAsDraft wiring in Form.jsx/Form.test.jsx.
- Container/Edit.test.jsx uses main's Loadable.jsx mock path.

Refs #8410
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.

1 participant