Merge pull request #129091 from microsoft/dev/joyceerhl/collapsed-cells

Remove 'collapsed' css class for collapsed notebook cells
This commit is contained in:
Rob Lourens 2021-07-21 17:27:53 -07:00 committed by GitHub
commit 78a48b505b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 10 deletions

View file

@ -263,7 +263,7 @@ export class CodeCell extends Disposable {
});
}
private updateInputCollaseElement(): void {
private updateInputCollapseElement(): void {
this.removeInputCollapsePreview();
const richEditorText = this.getRichText(this.viewCell.textBuffer, this.viewCell.language);
const element = DOM.$('div');
@ -277,9 +277,8 @@ export class CodeCell extends Disposable {
DOM.hide(this.templateData.runButtonContainer);
DOM.show(this.templateData.collapsedPart);
DOM.show(this.templateData.outputContainer);
this.templateData.container.classList.toggle('collapsed', true);
this._outputContainerRenderer.viewUpdateShowOutputs();
this.updateInputCollaseElement();
this.updateInputCollapseElement();
this.relayoutCell();
}
@ -291,7 +290,6 @@ export class CodeCell extends Disposable {
DOM.hide(this.templateData.outputContainer);
this.removeInputCollapsePreview();
this._outputContainerRenderer.viewUpdateHideOuputs();
this.templateData.container.classList.toggle('collapsed', false);
this.templateData.container.classList.toggle('output-collapsed', true);
this.relayoutCell();
@ -302,10 +300,9 @@ export class CodeCell extends Disposable {
DOM.hide(this.templateData.runButtonContainer);
DOM.show(this.templateData.collapsedPart);
DOM.hide(this.templateData.outputContainer);
this.templateData.container.classList.toggle('collapsed', true);
this.templateData.container.classList.toggle('output-collapsed', true);
this._outputContainerRenderer.viewUpdateHideOuputs();
this.updateInputCollaseElement();
this.updateInputCollapseElement();
this.relayoutCell();
}
@ -315,7 +312,6 @@ export class CodeCell extends Disposable {
DOM.hide(this.templateData.collapsedPart);
this.removeInputCollapsePreview();
DOM.show(this.templateData.outputContainer);
this.templateData.container.classList.toggle('collapsed', false);
this.templateData.container.classList.toggle('output-collapsed', false);
this._outputContainerRenderer.viewUpdateShowOutputs();
this.relayoutCell();

View file

@ -180,7 +180,6 @@ export class StatefulMarkdownCell extends Disposable {
DOM.hide(this.editorPart);
this.markdownAccessibilityContainer.ariaHidden = 'true';
this.templateData.container.classList.toggle('collapsed', true);
this.viewCell.renderedMarkdownHeight = 0;
this.viewCell.layoutChange({});
}
@ -195,7 +194,6 @@ export class StatefulMarkdownCell extends Disposable {
this.notebookEditor.hideMarkupPreviews([this.viewCell]);
this.templateData.container.classList.toggle('collapsed', false);
this.templateData.container.classList.toggle('markdown-cell-edit-mode', true);
if (this.editor && this.editor.hasModel()) {
@ -282,7 +280,6 @@ export class StatefulMarkdownCell extends Disposable {
DOM.hide(this.editorPart);
DOM.hide(this.templateData.collapsedPart);
this.markdownAccessibilityContainer.ariaHidden = 'false';
this.templateData.container.classList.toggle('collapsed', false);
this.templateData.container.classList.toggle('markdown-cell-edit-mode', false);
this.renderedEditors.delete(this.viewCell);