Skip to content

feat: connect resource replacement to the editor lifecycle - #1272

Open
Maxxich wants to merge 1 commit into
feat/resource-replacement-codemirrorfrom
feat/resource-replacement-editor
Open

Maxxich wants to merge 1 commit into
feat/resource-replacement-codemirrorfrom
feat/resource-replacement-editor

Conversation

@Maxxich

@Maxxich Maxxich commented Sep 24, 2026 •

Copy link
Copy Markdown

Depends on PR: feat: support resource replacement in CodeMirror

Expose resource replacement configuration and operation controls through the editor
API. Lazily share configured dependencies across both modes, prevent mode switching
while processing, and release views/controllers safely on detach and StrictMode
reconnection. Add integration documentation and editor integration coverage.

Summary by Sourcery

Connect asynchronous resource replacement to the editor lifecycle and expose the controls needed to manage it safely.

New Features:

  • Expose resource replacement configuration, status events, pending-operation queries, and cancellation controls through the public editor API.
  • Support asynchronous resource replacement for configured paste and drop content in both WYSIWYG and markup modes.

Bug Fixes:

  • Safely cancel pending replacements and ignore late responses when editors detach, reconnect under StrictMode, or are destroyed.
  • Prevent mode switching and local history actions while resource replacement operations are pending.

Enhancements:

  • Share lazily created editor dependencies and resource replacement controllers across both editing modes while preserving editor content across lifecycle reconnections.

Documentation:

  • Add comprehensive documentation for configuring resource metadata, resolver behavior, lifecycle integration, history, and standalone CodeMirror usage.

Tests:

  • Add editor lifecycle unit coverage and cross-browser integration coverage for resource replacement, cancellation, mode locking, history, serialization, focus, and native clipboard behavior.

@gravity-ui

gravity-ui Bot commented Sep 24, 2026

Copy link
Copy Markdown

Storybook Deployed

@gravity-ui

gravity-ui Bot commented Sep 24, 2026

Copy link
Copy Markdown

🎭 Playwright Report

@Maxxich
Maxxich marked this pull request as ready for review September 24, 2026 10:56

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry @Maxxich, your pull request is larger than the review limit of 150,000 diff characters

@Maxxich
Maxxich changed the base branch from main to feat/resource-replacement-codemirror October 5, 2026 09:07
@d3m1d0v
d3m1d0v added this pull request to stack #1320 October 5, 2026 13:17

This branch has not been deployed

No deployments
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