Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Dec 10, 2025

Empty markdown cells in readonly notebook diff viewers display "double-click or press enter to edit" despite being uneditable.

Changes

Modified BackLayerWebView._generateStyles() to conditionally set the empty cell placeholder based on readonly state:

'notebook-cell-markup-empty-content': this.notebookEditor.creationOptions.isReadOnly
    ? nls.localize('notebook.emptyMarkdownPlaceholderReadonly', "Empty markdown cell")
    : nls.localize('notebook.emptyMarkdownPlaceholder', "Empty markdown cell, double-click or press enter to edit."),

The CSS variable is consumed by the markdown renderer in extensions/markdown-language-features/notebook/index.ts which applies it as ::before pseudo-element content for .emptyMarkdownCell.

Original prompt

This section details on the original issue you should resolve

<issue_title>Change rendered text in readonly markdown code to not include or p;ress enter to edit</issue_title>
<issue_description>Open a diff virewer for notebooks with an empty md output.
The following is displayed
Screenshot 2024-08-28 at 09 49 20

Given that the content is readonly, we should not include the text double-click or press enter to edit</issue_description>

Comments on the Issue (you are @copilot in this section)


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI and others added 2 commits December 10, 2025 02:27
Co-authored-by: DonJayamanne <1948812+DonJayamanne@users.noreply.github.com>
Co-authored-by: DonJayamanne <1948812+DonJayamanne@users.noreply.github.com>
Copilot AI changed the title [WIP] Remove edit prompt from readonly markdown output Fix: Remove edit instructions from readonly markdown cells in notebook diffs Dec 10, 2025
Copilot AI requested a review from DonJayamanne December 10, 2025 02:34
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.

Change rendered text in readonly markdown code to not include or p;ress enter to edit

2 participants