Skip to content

Commit

Permalink
Use CodeMirror for sample filter input
Browse files Browse the repository at this point in the history
  • Loading branch information
andrei-apollo committed Jan 3, 2025
1 parent ba63da8 commit 86736cc
Show file tree
Hide file tree
Showing 8 changed files with 21,310 additions and 944 deletions.
23 changes: 23 additions & 0 deletions src/inspect_ai/_view/www/App.css
Original file line number Diff line number Diff line change
Expand Up @@ -650,6 +650,29 @@ table.table.table-sm td {
height: auto !important;
}

[data-tooltip] {
position: relative;
}
[data-tooltip]:hover::after {
content: attr(data-tooltip);
position: absolute;
line-height: 1.25;
background: var(--bs-gray-300);
color: var(--bs-body-color);
padding: 4px 8px;
border-radius: 4px;
border: 1px solid var(--bs-gray-400);
box-shadow: 0 2px 10px 0 rgba(0, 0, 0, 0.25);
white-space: pre-wrap;
width: max-content;
max-width: 400px;
z-index: 1000;
}
[data-tooltip][data-tooltip-position="bottom-left"]:hover::after {
right: 0%;
top: 100%;
}

/* ANSI Coloring */
.ansi-display {
font-family: monospace;
Expand Down
23 changes: 23 additions & 0 deletions src/inspect_ai/_view/www/dist/assets/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -14923,6 +14923,29 @@ table.table.table-sm td {
height: auto !important;
}

[data-tooltip] {
position: relative;
}
[data-tooltip]:hover::after {
content: attr(data-tooltip);
position: absolute;
line-height: 1.25;
background: var(--bs-gray-300);
color: var(--bs-body-color);
padding: 4px 8px;
border-radius: 4px;
border: 1px solid var(--bs-gray-400);
box-shadow: 0 2px 10px 0 rgba(0, 0, 0, 0.25);
white-space: pre-wrap;
width: max-content;
max-width: 400px;
z-index: 1000;
}
[data-tooltip][data-tooltip-position="bottom-left"]:hover::after {
right: 0%;
top: 100%;
}

/* ANSI Coloring */
.ansi-display {
font-family: monospace;
Expand Down
21,725 changes: 20,847 additions & 878 deletions src/inspect_ai/_view/www/dist/assets/index.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions src/inspect_ai/_view/www/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
"bootstrap": "^5.3.3",
"bootstrap-icons": "^1.11.3",
"clipboard": "^2.0.11",
"codemirror": "^6.0.1",
"fast-json-patch": "^3.1.1",
"fflate": "^0.8.2",
"filtrex": "^3.1.0",
Expand Down
1 change: 1 addition & 0 deletions src/inspect_ai/_view/www/src/samples/SamplesTools.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ export const SampleTools = (props) => {

tools.push(
html`<${SampleFilter}
evalDescriptor=${sampleDescriptor.evalDescriptor}
filter=${filter}
filterError=${filterError}
filterChanged=${filterChanged}
Expand Down
Loading

0 comments on commit 86736cc

Please sign in to comment.