mirror of
https://github.com/Microsoft/vscode
synced 2024-10-12 14:30:13 +00:00
re #103454. comments/notebook
This commit is contained in:
parent
87dbca4eb2
commit
56cedb2ba7
|
@ -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);
|
||||
|
|
|
@ -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() {
|
||||
|
|
|
@ -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'));
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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');
|
||||
}
|
||||
|
|
|
@ -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';
|
||||
}
|
||||
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in a new issue