Markdown toolbar > Preview toggle feature (#10963)

* Added toggle preview button to Markdown toolbar. Revised components, theme and styles to present the preview as a second column beside the markdown.

* Added showPreview to model and began working on togglePreview.

* Uncommented use of cellModel.showPreview

* add cell model event for onPreviewChange

* Renamed my showPreview boolean to prevent confusion with local boolean used in toogglePreview.

* Added CSS class when preview is enabled. Adjusted styles accordingly.

* Swapped icon show/hide references for correct sequence. Modified updatePreview to include state of doShowPreview.

* Added check for isEditMode so we can run togglePreview and show it once editor closes.

* Added listener to code.component that triggers layoutEmitter on changes to peview.

* Renamed local boolean doShowPreview. Removed unneeded code. Fixed ambiguity in my use of booleans, adding a getter and setter to textCell.

* Cleaned up implementation of new get/set for toggling preview.

Co-authored-by: chlafreniere <hichise@gmail.com>
This commit is contained in:
Hale Rankin
2020-06-26 13:47:17 -07:00
committed by GitHub
parent 00fe535add
commit 7ef8acf04e
11 changed files with 130 additions and 35 deletions

View File

@@ -74,7 +74,7 @@
width: 16px;
}
.notebookEditor .in-preview .actions-container .action-item:last-child {
margin-right: 8px;
margin-right: 14px;
}
.notebookEditor
.in-preview
@@ -83,20 +83,11 @@
.notebook-button {
margin-right: 0;
}
.notebookEditor
.in-preview
.actions-container
.action-item:last-child
.notebook-button.fixed-width {
.notebookEditor .in-preview .actions-container .action-item:last-child .notebook-button.fixed-width {
background-size: contain;
margin-left: 8px;
margin-right: -28px;
}
.notebookEditor
.in-preview
.actions-container
.action-item
.notebook-button.fixed-width {
width: 34px;
padding: 0 0 0 18px;
}
.notebookEditor .labelOnLeftContainer {