Skip to content

feat: add visual HTML block editing - #1306

Draft
makhnatkin wants to merge 12 commits into
feat/html-block-view-modefrom
feat/html-block-inline-edit
Draft

makhnatkin wants to merge 12 commits into
feat/html-block-view-modefrom
feat/html-block-inline-edit

Conversation

@makhnatkin

@makhnatkin makhnatkin commented Oct 1, 2026 •

Copy link
Copy Markdown
Collaborator

Improve HTML block editing

  • Added three editing variants with element properties, inline HTML source, and a source overlay.
  • Preserved the clicked text position when opening element source on double-click.
  • Updated element outlines to match block selection.
  • Added coverage for text, images, cancellation, and editing after scrolling.

Summary by Sourcery

Enable visual and source-based editing of HTML block elements while preserving selection context, scrolling, and responsive layout.

New Features:

  • Add visual HTML block editing with element text and attribute properties, inline source editing, and source overlay editing.
  • Support opening element source at the clicked text position and optionally opening block source on double-click.
  • Provide configurable HTML block editing modes and expose all variants in the demo stories.

Bug Fixes:

  • Preserve element position and viewport scrolling while opening editors, including after scrolling and in narrow viewports.
  • Keep HTML block outlines and hover controls aligned with the selected element without shifting preview content.

Enhancements:

  • Improve the HTML block toolbar and source editor presentation with responsive controls, line numbers, save/cancel actions, and localized labels.

Tests:

  • Expand visual coverage for text and image editing, attributes, cancellation, source positioning, scrolling, hover behavior, responsive layouts, and pointer-move handling.
  • Add unit coverage for mapping preview carets to source HTML and safely replacing matched elements.

@gravity-ui

gravity-ui Bot commented Oct 1, 2026

Copy link
Copy Markdown

Storybook Deployed

@gravity-ui

gravity-ui Bot commented Oct 1, 2026

Copy link
Copy Markdown

🎭 Playwright Report

@makhnatkin
makhnatkin force-pushed the feat/html-block-inline-edit branch 3 times, most recently from b99c123 to de157f4 Compare October 1, 2026 09:28
@makhnatkin makhnatkin changed the title feat: add visual editing for HTML blocks feat: add visual HTML block editing Oct 1, 2026
@makhnatkin
makhnatkin force-pushed the feat/html-block-inline-edit branch from 4081a49 to bc4200e Compare October 9, 2026 23:25
@makhnatkin
makhnatkin added this pull request to stack #1356 October 9, 2026 23:25

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