re #103454. comments/notebook

This commit is contained in:
rebornix 2020-09-24 14:26:46 -07:00
parent 87dbca4eb2
commit 56cedb2ba7
8 changed files with 14 additions and 17 deletions

View file

@ -519,7 +519,7 @@ export class CommentNode extends Disposable {
focus() {
this.domNode.focus();
if (!this._clearTimeout) {
dom.addClass(this.domNode, 'focus');
this.domNode.classList.add('focus');
this._clearTimeout = setTimeout(() => {
this.domNode.classList.remove('focus');
}, 3000);

View file

@ -553,7 +553,7 @@ export class ReviewZoneWidget extends ZoneWidget implements ICommentThreadWidget
this._commentForm.classList.remove('expand');
this._commentEditor.getDomNode()!.style.outline = '';
this._error.textContent = '';
dom.addClass(this._error, 'hidden');
this._error.classList.add('hidden');
}
}
}));
@ -708,7 +708,7 @@ export class ReviewZoneWidget extends ZoneWidget implements ICommentThreadWidget
this._commentForm.classList.remove('expand');
this._commentEditor.getDomNode()!.style.outline = '';
this._error.textContent = '';
dom.addClass(this._error, 'hidden');
this._error.classList.add('hidden');
}
private createReplyButton() {

View file

@ -60,7 +60,7 @@ export class CommentsPanel extends ViewPane {
public renderBody(container: HTMLElement): void {
super.renderBody(container);
dom.addClass(container, 'comments-panel');
container.classList.add('comments-panel');
let domContainer = dom.append(container, dom.$('.comments-panel-container'));
this.treeContainer = dom.append(domContainer, dom.$('.tree-container'));

View file

@ -81,8 +81,7 @@ export class NotebookTextDiffEditor extends EditorPane implements INotebookTextD
protected createEditor(parent: HTMLElement): void {
this._rootElement = DOM.append(parent, DOM.$('.notebook-text-diff-editor'));
this._overflowContainer = document.createElement('div');
DOM.addClass(this._overflowContainer, 'notebook-overflow-widget-container');
DOM.addClass(this._overflowContainer, 'monaco-editor');
this._overflowContainer.classList.add('notebook-overflow-widget-container', 'monaco-editor');
DOM.append(parent, this._overflowContainer);
const renderer = this.instantiationService.createInstance(CellDiffRenderer, this);

View file

@ -428,18 +428,17 @@ export class NotebookEditorWidget extends Disposable implements INotebookEditor
private _createBody(parent: HTMLElement): void {
this._body = document.createElement('div');
DOM.addClass(this._body, 'cell-list-container');
this._body.classList.add('cell-list-container');
this._createCellList();
DOM.append(parent, this._body);
this._overflowContainer = document.createElement('div');
DOM.addClass(this._overflowContainer, 'notebook-overflow-widget-container');
DOM.addClass(this._overflowContainer, 'monaco-editor');
this._overflowContainer.classList.add('notebook-overflow-widget-container', 'monaco-editor');
DOM.append(parent, this._overflowContainer);
}
private _createCellList(): void {
DOM.addClass(this._body, 'cell-list-container');
this._body.classList.add('cell-list-container');
this._dndController = this._register(new CellDragAndDropController(this, this._body));
const getScopedContextKeyService = (container?: HTMLElement) => this._list!.contextKeyService.createScoped(container);

View file

@ -23,7 +23,7 @@ export class VerticalSeparator extends Action {
export class VerticalSeparatorViewItem extends BaseActionViewItem {
render(container: HTMLElement) {
DOM.addClass(container, 'verticalSeparator');
container.classList.add('verticalSeparator');
// const iconContainer = DOM.append(container, $('.verticalSeparator'));
// DOM.addClasses(iconContainer, 'codicon', 'codicon-chrome-minimize');
}

View file

@ -223,7 +223,7 @@ export class CodeCell extends Disposable {
this._register(viewCell.onCellDecorationsChanged((e) => {
e.added.forEach(options => {
if (options.className) {
DOM.addClass(templateData.rootContainer, options.className);
templateData.rootContainer.classList.add(options.className);
}
if (options.outputClassName) {
@ -245,7 +245,7 @@ export class CodeCell extends Disposable {
viewCell.getCellDecorations().forEach(options => {
if (options.className) {
DOM.addClass(templateData.rootContainer, options.className);
templateData.rootContainer.classList.add(options.className);
}
if (options.outputClassName) {
@ -520,8 +520,7 @@ export class CodeCell extends Disposable {
this.viewCell.selfSizeMonitoring = true;
this.notebookEditor.createInset(this.viewCell, result as any, this.viewCell.getOutputOffset(index));
} else {
DOM.addClass(outputItemDiv, 'foreground');
DOM.addClass(outputItemDiv, 'output-element');
outputItemDiv.classList.add('foreground', 'output-element');
outputItemDiv.style.position = 'absolute';
}

View file

@ -109,7 +109,7 @@ export class StatefulMarkdownCell extends Disposable {
this._register(viewCell.onCellDecorationsChanged((e) => {
e.added.forEach(options => {
if (options.className) {
DOM.addClass(templateData.rootContainer, options.className);
templateData.rootContainer.classList.add(options.className);
}
});
@ -124,7 +124,7 @@ export class StatefulMarkdownCell extends Disposable {
viewCell.getCellDecorations().forEach(options => {
if (options.className) {
DOM.addClass(templateData.rootContainer, options.className);
templateData.rootContainer.classList.add(options.className);
}
});