mirror of
https://github.com/HeyPuter/firefox.git
synced 2026-11-25 02:40:22 -10:00
Since we modified the Editor to be accessible, we got the green light to remove the old JsTerm code. This means we can remove the preference for the codeMirror input, and clean the WebConsole react app a bit. This also mean we can avoid running a lot of our tests twice. Finally, some test helpers had to take argument with specific shape to work against old jsterm (e.g. checkInputCompletionValue), that we can now remove to make tests easier to read. Differential Revision: https://phabricator.services.mozilla.com/D40172
310 lines
8.8 KiB
CSS
310 lines
8.8 KiB
CSS
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
|
|
|
html,
|
|
body {
|
|
height: 100vh;
|
|
margin: 0;
|
|
padding: 0;
|
|
overflow: hidden;
|
|
}
|
|
|
|
#app-wrapper {
|
|
height: 100vh;
|
|
max-height: 100vh;
|
|
}
|
|
|
|
.webconsole-output {
|
|
direction: ltr;
|
|
overflow: auto;
|
|
overflow-anchor: none;
|
|
-moz-user-select: text;
|
|
position: relative;
|
|
}
|
|
|
|
.webconsole-app {
|
|
--object-inspector-hover-background: transparent;
|
|
--attachment-margin-block-end: 3px;
|
|
--primary-toolbar-height: 29px;
|
|
display: grid;
|
|
/*
|
|
* Here's the design we want in in-line mode
|
|
* +----------------------------------------------+
|
|
* | Filter bar primary ↔ |
|
|
* +----------------------------↔ |
|
|
* | [Filter bar secondary] ↔ |
|
|
* +----------------------------↔ |
|
|
* | ↔ |
|
|
* + +----------------------+ ↔ |
|
|
* | | | ↔ |
|
|
* | | Output | ↔ [sidebar] |
|
|
* | | | ↔ |
|
|
* | +----------------------+ ↔ |
|
|
* | | [NotificationBox] | ↔ |
|
|
* | +----------------------+ ↔ |
|
|
* | | | ↔ |
|
|
* | | JSTerm | ↔ |
|
|
* | | | ↔ |
|
|
* | +----------------------+ ↔ |
|
|
* | ↔ |
|
|
* +----------------------------↔ |
|
|
* | [Reverse search input] ↔ |
|
|
* +----------------------------------------------+
|
|
*
|
|
* - ↔ are width resizers
|
|
* - Elements inside brackets may not be visible, so we set
|
|
* rows/columns to "auto" to make them collapse when the element
|
|
* they contain is hidden.
|
|
*/
|
|
grid-template-rows: var(--primary-toolbar-height) auto 1fr auto;
|
|
grid-template-columns: minmax(200px, 1fr) minmax(0, auto);
|
|
max-height: 100vh !important;
|
|
height: 100vh !important;
|
|
width: 100vw;
|
|
overflow: hidden;
|
|
color: var(--console-output-color);
|
|
-moz-user-focus: normal;
|
|
}
|
|
|
|
.webconsole-filteringbar-wrapper {
|
|
grid-column: 1 / 2;
|
|
grid-row: 1 / 3;
|
|
grid-template-rows: subgrid;
|
|
}
|
|
|
|
.webconsole-filterbar-primary {
|
|
grid-row: 1 / 2;
|
|
}
|
|
|
|
/* Only put the filter buttons toolbar on its own row in narrow filterbar layout */
|
|
.narrow .devtools-toolbar.webconsole-filterbar-secondary {
|
|
grid-row: 2 / 3;
|
|
}
|
|
|
|
.flexible-output-input {
|
|
display: flex;
|
|
flex-direction: column;
|
|
grid-column: 1 / 2;
|
|
grid-row: 3 / 4;
|
|
/* Don't take more height than the grid allows to */
|
|
max-height: 100%;
|
|
overflow: hidden;
|
|
}
|
|
|
|
.flexible-output-input .webconsole-output {
|
|
flex-shrink: 100000;
|
|
overflow-x: hidden;
|
|
}
|
|
|
|
.flexible-output-input > .webconsole-output:not(:empty) {
|
|
min-height: 19px;
|
|
}
|
|
|
|
.webconsole-app .jsterm-input-container {
|
|
min-height: 28px;
|
|
padding-block-start: 2px;
|
|
overflow-y: auto;
|
|
overflow-x: hidden;
|
|
flex-grow: 1;
|
|
/* We display the open editor button at the end of the input */
|
|
display: grid;
|
|
grid-template-columns: 1fr auto;
|
|
/* This allows us to not define a column for the CodeMirror container */
|
|
grid-auto-flow: column;
|
|
}
|
|
|
|
.webconsole-app .webconsole-output:empty ~ .jsterm-input-container {
|
|
border-top: none;
|
|
}
|
|
|
|
.webconsole-input-openEditorButton {
|
|
grid-column: -1 / -2;
|
|
height: 24px;
|
|
margin: 0;
|
|
}
|
|
|
|
.webconsole-input-openEditorButton::before {
|
|
background-image: url("chrome://devtools/skin/images/webconsole/editor.svg");
|
|
}
|
|
|
|
.reverse-search {
|
|
grid-column: 1 / 2;
|
|
grid-row: -1 / -2;
|
|
border-top: 1px solid var(--theme-splitter-color);
|
|
}
|
|
|
|
.sidebar {
|
|
display: grid;
|
|
grid-row: 1 / -1;
|
|
grid-column: -1 / -2;
|
|
grid-template-rows: subgrid;
|
|
background-color: var(--theme-sidebar-background);
|
|
width: 200px;
|
|
min-width: 150px;
|
|
max-width: 100%;
|
|
}
|
|
|
|
.sidebar-resizer {
|
|
/* We want the splitter to cover the whole column (minus self-xss message) */
|
|
grid-row: 1 / -1;
|
|
grid-column: -1 / -2;
|
|
}
|
|
|
|
.webconsole-sidebar-toolbar {
|
|
grid-row: 1 / 2;
|
|
min-height: 100%;
|
|
display: flex;
|
|
justify-content: end;
|
|
margin: 0;
|
|
padding: 0;
|
|
}
|
|
|
|
.sidebar-contents {
|
|
grid-row: 2 / -1;
|
|
overflow: auto;
|
|
}
|
|
|
|
.webconsole-sidebar-toolbar .sidebar-close-button {
|
|
margin: 0;
|
|
}
|
|
|
|
.sidebar-close-button::before {
|
|
background-image: url(chrome://devtools/skin/images/close.svg);
|
|
}
|
|
|
|
.sidebar-contents .object-inspector {
|
|
min-width: 100%;
|
|
}
|
|
|
|
/** EDITOR MODE */
|
|
.webconsole-app.jsterm-editor {
|
|
display: grid;
|
|
/*
|
|
* Here's the design we want in editor mode
|
|
* +-----------------------------------------------------------------------+
|
|
* | [Notification Box (self XSS warning)] |
|
|
* +--------------------------+--------------------------+-----------------+
|
|
* | Editor Toolbar ↔ Filter bar primary ↔ |
|
|
* +--------------------------↔--------------------------↔ |
|
|
* | ↔ [Filter bar secondary] ↔ |
|
|
* | ↔--------------------------↔ |
|
|
* | ↔ ↔ |
|
|
* | Editor ↔ output ↔ [sidebar] |
|
|
* | ↔ ↔ |
|
|
* | ↔ ↔ |
|
|
* | ↔ ↔ |
|
|
* | ↔ ↔ |
|
|
* +--------------------------↔ ↔ |
|
|
* | [Reverse search input] ↔ ↔ |
|
|
* +-----------------------------------------------------+-----------------+
|
|
*
|
|
* - ↔ are width resizers
|
|
* - Elements inside brackets may not be visible, so we set
|
|
* rows/columns to "auto" to make them collapse when the element
|
|
* they contain is hidden.
|
|
*/
|
|
grid-template-rows:
|
|
auto
|
|
var(--primary-toolbar-height)
|
|
auto
|
|
1fr
|
|
auto;
|
|
grid-template-columns: minmax(150px, auto) minmax(200px, 1fr) minmax(0, auto);
|
|
}
|
|
|
|
.jsterm-editor .flexible-output-input {
|
|
/* This allow us to place the div children (jsterm, output, notification) on the grid */
|
|
display: contents;
|
|
}
|
|
|
|
.jsterm-editor .webconsole-filteringbar-wrapper {
|
|
grid-row: 2 / 4;
|
|
grid-column: 2 / 3;
|
|
}
|
|
|
|
.jsterm-editor .webconsole-filterbar-primary {
|
|
grid-row: 1 / 2;
|
|
}
|
|
|
|
.jsterm-editor .webconsole-editor-toolbar {
|
|
grid-column: 1 / 2;
|
|
grid-row: 2 / 3;
|
|
display: grid;
|
|
/* We're going to have the run button, the history nav and the close button */
|
|
grid-template-columns: auto 1fr auto auto auto;
|
|
height: unset;
|
|
}
|
|
|
|
.jsterm-editor .webconsole-editor-toolbar .webconsole-editor-toolbar-history-prevExpressionButton {
|
|
grid-column: -3 / -4;
|
|
}
|
|
|
|
.jsterm-editor .webconsole-editor-toolbar .webconsole-editor-toolbar-history-nextExpressionButton {
|
|
grid-column: -2 / -3;
|
|
}
|
|
|
|
.jsterm-editor .webconsole-editor-toolbar .webconsole-editor-toolbar-closeButton {
|
|
grid-column: -1 / -2;
|
|
}
|
|
|
|
.jsterm-editor .webconsole-editor-toolbar .webconsole-editor-toolbar-history-prevExpressionButton::before {
|
|
background-image: url("chrome://devtools/skin/images/arrowhead-up.svg");
|
|
background-size: 16px;
|
|
fill: var(--comment-node-color);
|
|
}
|
|
|
|
.jsterm-editor .webconsole-editor-toolbar .webconsole-editor-toolbar-history-nextExpressionButton::before {
|
|
background-image: url("chrome://devtools/skin/images/arrowhead-down.svg");
|
|
background-size: 16px;
|
|
fill: var(--comment-node-color);
|
|
}
|
|
|
|
.jsterm-editor .webconsole-editor-toolbar .webconsole-editor-toolbar-closeButton::before {
|
|
background-image: url("chrome://devtools/skin/images/close.svg");
|
|
}
|
|
|
|
.jsterm-editor .webconsole-input-openEditorButton {
|
|
display: none;
|
|
}
|
|
|
|
.jsterm-editor .webconsole-output {
|
|
grid-column: 2 / 3;
|
|
grid-row: 4 / -1;
|
|
}
|
|
|
|
.jsterm-editor .jsterm-input-container {
|
|
grid-column: 1 / 2;
|
|
grid-row: 3 / 5;
|
|
width: 30vw;
|
|
min-width: 150px;
|
|
border-top: none;
|
|
display: block;
|
|
}
|
|
|
|
.jsterm-editor #webconsole-notificationbox {
|
|
grid-row: 1 / 2;
|
|
grid-column: -1 / 1;
|
|
}
|
|
|
|
.jsterm-editor .jsterm-input-container > .CodeMirror {
|
|
padding-inline-start: 0;
|
|
background-image: none;
|
|
}
|
|
|
|
.jsterm-editor .sidebar {
|
|
grid-row: 2 / -1;
|
|
}
|
|
|
|
.jsterm-editor .editor-resizer {
|
|
grid-column: 1 / 2;
|
|
/* We want the splitter to cover the whole column (minus self-xss message) */
|
|
grid-row: 2 / -1;
|
|
}
|
|
|
|
.jsterm-editor .sidebar-resizer {
|
|
grid-column: -1 / -2;
|
|
/* We want the splitter to cover the whole column (minus self-xss message) */
|
|
grid-row: 2 / -1;
|
|
}
|