Skip to content

Support presentation preferences for Markdown embedded editors - #341742

Merged
Henning Dieterichs (hediet) merged 5 commits into
mainfrom
hediet/markdown-editor-presentation
Oct 15, 2026
Merged

Henning Dieterichs (hediet) merged 5 commits into
mainfrom
hediet/markdown-editor-presentation

Conversation

@hediet

@hediet Henning Dieterichs (hediet) commented Oct 15, 2026 •

Copy link
Copy Markdown
Member

Summary

Expose generic presentation preferences for contributed Markdown code-block editors and consume their published runtime implementation.

  • Accept and validate resizable, fullWidth, fullView, and minHeight in static contributions and exported provider results.
  • Forward preferences through the Markdown editor RPC descriptor and include them in descriptor equality checks.
  • Preserve contribution defaults when a resolved preference is undefined, while retaining explicit false overrides.
  • Upgrade @vscode/markdown-editor from 0.0.2-121 to the published 0.0.2-130 release, including its registry lockfile integrity.
  • Document the contract and add contribution/RPC schema and preference-merging regression tests.

Companion package implementation: https://github.com/microsoft/vscode-packages/pull/366 (merged and published). The publication blocker is resolved; no local dependency link is committed. This is generic extension integration and contains no Team Tools or VS Code Apps implementation.

Validation

Validated against a worktree-local npm installation of @vscode/markdown-editor@0.0.2-130 (not the development checkout):

  • 12 presentation/schema and generated-manifest tests passed.
  • Markdown editor webview build passed.
  • Markdown editor and extension TypeScript checks passed.
  • Generated manifest check: unchanged.
  • Targeted ESLint and precommit hygiene passed.

The previous Windows / Electron-Unit run had 25,079 passing tests and one unrelated teardown failure: session-storage compatibility cleanup received EBUSY unlinking agent-host.db. A new CI run is triggered by the dependency/fix commit.

Forward validated resizable, full-width and full-view preferences from static contributions and exported providers.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI balanced review requested due to automatic review settings October 15, 2026 10:10

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

Undefined resolve-result preferences erase contribution defaults instead of inheriting them.

1 open finding
What changed in this PR

Adds presentation preferences for contributed Markdown embedded editors. Runtime controls remain dependent on the companion package release and dependency update.

Changes:

  • Validates and forwards presentation preferences through provider descriptors and RPC.
  • Includes preferences in equality checks.
  • Documents the contract and adds contribution/schema tests.
File Description
extensions/​markdown-language-features/​src/​test/​markdownEditorProvider.test.ts Tests contribution preference validation.
extensions/​markdown-language-features/​src/​preview/​markdownEditorProvider.ts Validates, merges, forwards, and compares preferences.
extensions/​markdown-language-features/​src/​preview/​markdownEditorProtocol.ts Adds the presentation RPC schema.
extensions/​markdown-language-features/​src/​markdownExtensions.ts Reads and compares contribution preferences.
extensions/​markdown-language-features/​scripts/​codeBlockEditorPresentation.test.mts Tests schema acceptance and rejection.
extensions/​markdown-language-features/​schemas/​package.schema.json Defines contribution presentation options.
extensions/​markdown-language-features/​CONTRIBUTING.md Documents presentation preferences and precedence.

🧠 Review effort: Balanced


💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Preserve contributed presentation defaults when providers return undefined optional fields.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@hediet
Henning Dieterichs (hediet) marked this pull request as ready for review October 15, 2026 15:02
@github-actions

github-actions Bot commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

Base: d771f022 Current: 5b19988f

No screenshot changes.

roblourens
roblourens previously approved these changes Oct 15, 2026
Keep the published Markdown editor 0.0.2-130 dependency while incorporating main's clipboard-media changes.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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.

4 participants