Skip to content

Commit

Permalink
Allow clicking anywhere in titles to expand/collap nb diff view cells (
Browse files Browse the repository at this point in the history
  • Loading branch information
DonJayamanne authored Aug 28, 2024
1 parent f4e914e commit 9647599
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 17 deletions.
21 changes: 4 additions & 17 deletions src/vs/workbench/contrib/notebook/browser/diff/diffComponents.ts
Original file line number Diff line number Diff line change
Expand Up @@ -186,23 +186,10 @@ class PropertyHeader extends Disposable {

const target = e.event.target as HTMLElement;

if (target.classList.contains('codicon-notebook-collapsed') || target.classList.contains('codicon-notebook-expanded')) {
const parent = target.parentElement as HTMLElement;

if (!parent) {
return;
}

if (!parent.classList.contains(this.accessor.prefix)) {
return;
}

if (!parent.classList.contains('property-folding-indicator')) {
return;
}

// folding icon

if (target === this.propertyHeaderContainer ||
target === this._foldingIndicator || this._foldingIndicator.contains(target) ||
target === metadataStatus || metadataStatus.contains(target)
) {
const cellViewModel = e.target;

if (cellViewModel === this.cell) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,12 @@
align-items: center;
}

.notebook-text-diff-editor .cell-diff-editor-container .input-header-container,
.notebook-text-diff-editor .cell-diff-editor-container .output-header-container,
.notebook-text-diff-editor .cell-diff-editor-container .metadata-header-container {
cursor: pointer;
}

.notebook-text-diff-editor .cell-diff-editor-container .input-header-container .property-toolbar,
.notebook-text-diff-editor .cell-diff-editor-container .output-header-container .property-toolbar,
.notebook-text-diff-editor .cell-diff-editor-container .metadata-header-container .property-toolbar {
Expand Down

0 comments on commit 9647599

Please sign in to comment.