Skip to content

feat(quick-edit): add live SET_READ_ONLY and generic data-diff highlight - #970

Open
shsteimer wants to merge 4 commits into
mainfrom
mrgelyt
Open

shsteimer wants to merge 4 commits into
mainfrom
mrgelyt

Conversation

@shsteimer

@shsteimer shsteimer commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

Quick-edit support for showing merge conflicts in EW layout: a live read-only toggle and a generic diff highlight. Paired with adobe/da-live#1681.

Refs adobe/da-live#1144

  • SET_READ_ONLY { readOnly } (host → iframe) — lets the host lock/unlock the preview without reloading. Locks inline editors, image/block drops and DROP_TARGET. Can only lock: effective state is !config.canWrite || readOnly.
  • data-diff="<kind>" marker — visual highlight in layout. local/upstream styled to match content view; added/removed/changed reserved for version comparison ([EW] Support version comparison in layout mode da-live#1651), other kinds get a neutral outline.
  • Markers are restored after decoration by data-block-index / data-prose-index; markers without an index (li, picture, paired-conflict blocks) are kept as delivered.
  • Documented in docs/quick-edit-events.md.

Reviewer notes

  • Release before the da-live PR: an older quick-edit ignores SET_READ_ONLY, so layout would stay editable. No capability flag.
  • The host still drops node-update / image-replace itself; the iframe still sends history and selection messages while locked.
  • A marker dropped by decoration with no index can't be restored.

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

Co-authored-by: pi coding agent

This branch was successfully deployed

1 active deployment
mrgelyt — eb1e6c30 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