Skip to content

feat(canvas): add Add section button to outline panel - #1165

Open
shsteimer wants to merge 6 commits into
mainfrom
addsect
Open

feat(canvas): add Add section button to outline panel#1165
shsteimer wants to merge 6 commits into
mainfrom
addsect

Conversation

@shsteimer

@shsteimer shsteimer commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Adds insertSection(view) to blocks/canvas/editor-utils/blocks.js, which appends a single horizontal_rule node at the end of the doc to create a new empty section (mirrors the node-creation pattern already used in deleteSection/moveSection).
  • Adds an "Add section" button to ew-page-outline.js, rendered after the outline list, using the existing s2-icon-addcircle-20-n.svg icon (already used elsewhere, e.g. ew-block-library-modal.js). Click handler pulls the live view via getExtensionsBridge() and calls insertSection(view), letting the existing editorHtmlChangeparseSections pipeline re-render the outline.
  • Adds corresponding styles in ew-page-outline.css.

https://addsect--da-live--adobe.aem.live/

Co-Authored-By: Claude Sonnet 5 noreply@anthropic.com

Adds insertSection(view) to editor-utils/blocks.js, appending a single
horizontal_rule node at the end of the doc to create a new empty
section. Wires an "Add section" button into ew-page-outline.js's
outline list, dispatched via the extensions bridge like other outline
mutations.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@aem-code-sync

aem-code-sync Bot commented Jul 22, 2026

Copy link
Copy Markdown

Hello, I'm the AEM Code Sync Bot and I will run some actions to deploy your branch.
In case there are problems, just click the checkbox below to rerun the respective action.

  • Re-sync branch
Commits

# Conflicts:
#	blocks/canvas/ew-page-outline/ew-page-outline.js
#	test/unit/blocks/canvas/editor-utils/blocks.test.js
@shsteimer
shsteimer requested a review from hannessolo August 2, 2026 00:08
@shsteimer
shsteimer marked this pull request as ready for review August 2, 2026 00:08
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.

2 participants