-
Notifications
You must be signed in to change notification settings - Fork 131
Remove markdown cell rendered preview #10872
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
E2E Tests 🚀 |
nstrayer
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Works wonderful! Just a couple code style suggestions.
| /* When selected/editing AND no outputs: restore bottom rounding */ | ||
| /* When code cell is selected/editing AND no outputs: restore bottom rounding */ | ||
| .positron-notebook-cell.selected:has(.positron-notebook-cell-outputs.no-outputs) .positron-notebook-editor-container::after, | ||
| .positron-notebook-cell.editing:has(.positron-notebook-cell-outputs.no-outputs) .positron-notebook-editor-container::after, | ||
| .positron-notebook-cell:not(.selected):not(.editing):hover:has(.positron-notebook-cell-outputs.no-outputs) .positron-notebook-editor-container::after { | ||
| .positron-notebook-cell:not(.selected):not(.editing):hover:has(.positron-notebook-cell-outputs.no-outputs) .positron-notebook-editor-container::after, | ||
| /* When markdown cell is in edit mode (no output shown): restore bottom rounding */ | ||
| .positron-notebook-cell.selected:not(:has(.positron-notebook-cell-outputs)) .positron-notebook-editor-container::after, | ||
| .positron-notebook-cell.editing:not(:has(.positron-notebook-cell-outputs)) .positron-notebook-editor-container::after, | ||
| .positron-notebook-cell:not(.selected):not(.editing):hover:not(:has(.positron-notebook-cell-outputs)) .positron-notebook-editor-container::after { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is getting a bit crazy. I wonder if using nested syntax may make things a bit easier to reason about.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed this is a bit intense. I'll update this to see if I can make it easier to read!
| {!editorShown && ( | ||
| <div className='cell-contents positron-notebook-cell-outputs'> | ||
| <div | ||
| className='positron-notebook-markdown-rendered' | ||
| onDoubleClick={() => cell.toggleEditor()} | ||
| > | ||
| { | ||
| markdownString.length > 0 ? | ||
| <Markdown content={markdownString} /> | ||
| : <div className='empty-output-msg'> | ||
| {emptyMarkdownCell} | ||
| {doubleClickToEdit} | ||
| </div> | ||
| } | ||
| </div> | ||
| </div> | ||
| </div> | ||
| )} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we standardize on using just a ternary or the && short circuiting? Small preference for ternary due to risks of truthy eval in js.
seeM
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like this!
Addresses #10455
This updates markdown cells so that they:
pencilicon in action bar (instead of chevron down) to toggle edit modecheckmarkicon in action bar (instead of chevron up) to toggle view modeAFTER
Screen.Recording.2025-12-01.at.4.10.58.PM.mov
Release Notes
New Features
Bug Fixes
QA Notes
@:positron-notebooks