Skip to content

feat(canvas): allow split view while resolving merge conflicts - #1681

Open
shsteimer wants to merge 14 commits into
mainfrom
mrgelyt
Open

shsteimer wants to merge 14 commits into
mainfrom
mrgelyt

Conversation

@shsteimer

@shsteimer shsteimer commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

Allow Split view on pages with LOC/MSM merge conflicts. Layout stays disabled while conflicts exist; the split preview is highlighted, read-only, and follows each conflict's open tab until conflicts are resolved in the doc pane. Paired with adobe/da-nx#970 (must release first).

Refs #1144

  • Preview body tags conflict content with data-diff="local|upstream"; prose2aem keeps it through block, list-item and image conversion.
  • Edit indices are stripped from conflict content sent to the preview (they point at the conflict node, so clicking mounted the upstream side); the outline keeps them.
  • Preview read-only while conflicts exist: SET_READ_ONLY to the iframe, host drops node-update/image-replace (undo/redo kept), block toolbar hidden, selection toolbar limited to Comment, drops into the preview refused.
  • Pending preview actions (dialogs, variant picker, Replace block, toolbar image upload) are cancelled/ignored once it locks; upload placeholders now have unique ids.
  • The preview follows each conflict's open tab in the doc pane: Local, Upstream, or Difference (word diff with inline styles for text). Block conflicts show Local on the Difference tab — a word diff of a whole block isn't reliable yet; Upstream works for blocks.
  • Header: Layout disabled while conflicts exist, Content and Split enabled; layout moves to split when conflicts appear.
  • mergeConflictsState replays and is cleared on doc teardown.

Reviewer notes

  • Difference tab on a block conflict shows the local block (known limitation). Comments on conflict text, or on items in a list that holds a conflict, get no highlight in the preview.
  • Needs da-nx#970 deployed; against an older quick-edit the preview stays editable.
  • Header has-conflicts attribute and its CSS dimming the left panel are unchanged.

Testing against this da-nx branch

  • Sites whose tools/quick-edit/quick-edit.js reads quick-edit=<branch> (e.g. Frescopa) load the branch via the URL below.
  • Sites on the da-universal bootstrap (most customer projects) hardcode https://da.live/nx/public/plugins/quick-edit/quick-edit.js and ignore the param, so the iframe runs production quick-edit (no highlight, preview not read-only). Use a DevTools local override (Sources > Overrides) on that URL with:
    export { default } from 'https://mrgelyt--da-nx--adobe.aem.live/nx/public/plugins/quick-edit/quick-edit.js';
    export * from 'https://mrgelyt--da-nx--adobe.aem.live/nx/public/plugins/quick-edit/quick-edit.js';
    Reload with DevTools open and "Disable cache" ticked.

Test URLs (page with merge conflicts; quick-edit=<branch> loads this da-nx branch in the iframe on frescopa):

@aem-code-sync

aem-code-sync Bot commented Nov 9, 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

…view

posAtDOM cannot see inside a conflict node view, so indices on conflict
content pointed at the conflict node and clicking it mounted the upstream
side. The preview body now omits them; the outline keeps the indexed body.

Co-authored-by: pi coding agent
…the banner

Conflicts now allow content and split views only. Layout is disabled, and a
layout view moves to split when conflicts appear. The split preview stays
read-only and highlighted.

Co-authored-by: pi coding agent
@shsteimer shsteimer changed the title feat(canvas): allow layout and split views while resolving merge conflicts feat(canvas): allow split view while resolving merge conflicts Nov 9, 2026
The preview shows the local, upstream or word-diff side of a conflict to
match the tab open in the doc pane. Block pairs stay on local for the diff.

Co-authored-by: pi coding agent
@shsteimer

Copy link
Copy Markdown
Contributor Author
Image

@shsteimer
shsteimer marked this pull request as ready for review November 19, 2026 15:24
Co-authored-by: pi coding agent

This branch was successfully deployed

1 active deployment
mrgelyt — a8dec15f Deployed Nov 19, 2026 by aem-code-sync[bot]
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