Skip to content

Commit

Permalink
Fix editor background color (#714)
Browse files Browse the repository at this point in the history
* Fix background color for the nbdime's webapps.

* Remove .cm-merge that seems unused in CM6 version.

* Update common.css.

* Update ui-tests snapshots.

* Update Playwright Snapshots

* Update Playwright Snapshots

* Update Playwright Snapshots

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
  • Loading branch information
HaudinFlorence and github-actions[bot] committed Oct 25, 2023
1 parent d39f45a commit 5efc481
Show file tree
Hide file tree
Showing 27 changed files with 8 additions and 12 deletions.
7 changes: 6 additions & 1 deletion packages/nbdime/src/common/mergeview.ts
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ const baseTheme = EditorView.baseTheme({
border: 'var(--jp-border-width) solid var(--jp-border-color1)',
fontSize: '90%',
padding: '0 3px',
borderRadius: '4px',
borderRadius: '4px'
},
});

Expand Down Expand Up @@ -1487,10 +1487,12 @@ export class MergeView extends Panel {
leftWidget = left.remoteEditorWidget;
}
this.addWidget(leftWidget);
leftWidget.addClass('cm-merge-pane');
leftWidget.addClass('cm-merge-left-editor');

if (showBase) {
this.addWidget(this._base);
this._base.addClass('cm-merge-pane');
this._base.addClass('cm-central-editor');
}

Expand Down Expand Up @@ -1576,6 +1578,7 @@ export class MergeView extends Panel {
);
}
}
mergeWidget.addClass('cm-merge-pane');
mergeWidget.addClass('cm-merge-editor');
//END MERGE CASE
panes = 3 + (showBase ? 1 : 0);
Expand All @@ -1594,6 +1597,7 @@ export class MergeView extends Panel {
} else {
panes = 2;
this.addWidget(this._base);
this._base.addClass('cm-merge-pane');
this._base.addClass('cm-diff-left-editor');
right = this._right = new DiffView({
model: remote,
Expand All @@ -1606,6 +1610,7 @@ export class MergeView extends Panel {
},
});
let rightWidget = right.remoteEditorWidget;
rightWidget.addClass('cm-merge-pane');
rightWidget.addClass('cm-diff-right-editor');
this.addWidget(new Widget({ node: right.buildGap() }));
this.addWidget(rightWidget);
Expand Down
13 changes: 2 additions & 11 deletions packages/nbdime/src/styles/common.css
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,6 @@
grid-column: 3;
}

.nbdime-root .cm-merge {
position: relative;
white-space: pre;
/* style as jp-InputArea-editor: */
border: var(--codemirror-border);
border-radius: 0px;
background: var(--jp-cell-editor-background);
}

.nbdime-root .cm-merge-3pane,
.nbdime-root .cm-merge-4pane {
display: grid;
Expand Down Expand Up @@ -73,7 +64,6 @@
flex-direction: column;
align-items: center;
justify-content: end;

z-index: 2;
height: 100%;
box-sizing: border-box;
Expand All @@ -90,11 +80,12 @@
line-height: 1;
}

.nbdime-root .cm-merge-pane {
.nbdime-root .cm-merge-pane > .cm-editor {
display: inline-block;
white-space: normal;
vertical-align: top;
width: 100%;
background-color: var(--jp-cell-editor-background);
}

.nbdime-root .cm-merge-pane-rightmost {
Expand Down
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 5efc481

Please sign in to comment.