A UX pass over the workspace, and two defects it turned up
Walking the site as a student (desktop, a phone-width screen, dark) found these. Each is small; together they are what got in the way. Defects: - Opening a problem in the Bridge saved the generated Mojo over the exercise's own program. The workspace fills every pane's editor as it opens, the editor reported that as typing, and the Bridge's read-only Mojo pane holds the generated text. Developer then showed generated Mojo labeled "your edits", and the problem counted as edited. The value setter now marks its change as a load, the change listener leaves loads out, and a Bridge session refuses a Mojo edit. - A page opened at #/#problems or #/#reference stopped about 45px past the heading: the fonts arrived after the place was computed. A page built this moment goes straight to its section and finds it again when the fonts are in; a page already on screen still scrolls there. The workspace: - With no run to step, the Run view said "Nothing to run yet." It and the stepper now give one reason (src/core/norun.ts): how many problems the stepped pane has and the first with its line, with a button to the line and the Problems list; or that the pane is empty. - In the Bridge the dock starts at about a quarter of the height (it holds a call, a line of output, a short list), so the code and the run get the room. Developer keeps a third for the compiler's answer. A double-click on a divider returns to the area's default, not to the student's last position. - The reason a pane is not in step wraps instead of ending in an ellipsis, and a button in the pane's head keeps its words on one line. - A problem that does not exist keeps the site's navigation and links the problem list. - Help, the theme switch and the stepper's first, back, step and last buttons have names a screen reader can say. A phone-width screen: - The toolbar is three rows in every area and on every tab (it was four or five): the mark, the area, help and the theme; the problem, Versions and Reset; the actions. About 30px more of the code shows. An embedded workspace keeps its own toolbar. - The Share dialog puts each row's name above what it holds (a note had been squeezed to a word per line), and the Versions menu opens across the screen instead of running off its right edge. - The stepper's speed label stays with its slider. Checked by hand, in headless Chromium at 1440x900, 1366x768, 390x844 and 320x640, light and dark: each state above before and after; the editor has line numbers and highlighting; the stepper steps; embeds (playground, trace, Developer) are unchanged; 31 smoke scenarios clean but the ones that err on purpose.
This commit is contained in:
14 files changed
+302
-39
No files matched your search
+64
-2
@@ -792,7 +792,8 @@ kbd {
|
||||
}
|
||||
|
||||
.workspace {
|
||||
--dock: 68%;
|
||||
/* the first paint; DEFAULT_DOCK in src/ui/shell.ts sets each area's own */
|
||||
--dock: 76%;
|
||||
flex: 1;
|
||||
min-height: 0;
|
||||
display: grid;
|
||||
@@ -899,6 +900,14 @@ kbd {
|
||||
color: var(--warn);
|
||||
}
|
||||
|
||||
/* why a pane is not in step is the one thing to read before choosing Edit anyway: it wraps, it is never cut short */
|
||||
.pane-note.pane-stale {
|
||||
white-space: normal;
|
||||
overflow: visible;
|
||||
line-height: 1.35;
|
||||
padding: 2px 0;
|
||||
}
|
||||
|
||||
.badge-generated {
|
||||
background: var(--warn-bg);
|
||||
color: var(--warn);
|
||||
@@ -1024,6 +1033,12 @@ kbd {
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
/* a button in the pane's head keeps its words on one line; the note beside it is what gives way */
|
||||
.pane-head .btn {
|
||||
white-space: nowrap;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.pane-note {
|
||||
color: var(--ink-2);
|
||||
min-width: 0;
|
||||
@@ -1984,6 +1999,14 @@ body.resizing textarea {
|
||||
accent-color: var(--accent);
|
||||
}
|
||||
|
||||
/* the word and its slider wrap as one, never the word at the end of a row and the slider on the next */
|
||||
.speed-wrap {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 6px;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.trace-status {
|
||||
font-size: 12.5px;
|
||||
color: var(--ink-2);
|
||||
@@ -2489,6 +2512,13 @@ button.asm-src:hover {
|
||||
color: var(--ink-2);
|
||||
}
|
||||
|
||||
/* a narrow dialog: each row's name above what it holds, so no column is squeezed to a word per line */
|
||||
@media (max-width: 560px) {
|
||||
.share-row { grid-template-columns: minmax(0, 1fr) auto; gap: 4px 8px; margin: 10px 0; }
|
||||
.share-row > label:first-child, .share-row > .small { grid-column: 1 / -1; }
|
||||
.share-row > .btn { justify-self: start; }
|
||||
}
|
||||
|
||||
.share-actions {
|
||||
text-align: right;
|
||||
margin-top: 10px;
|
||||
@@ -3998,6 +4028,9 @@ button.asm-src:hover {
|
||||
.run-life-destroyed { color: #c0392b; }
|
||||
.run-more td { text-align: center; padding: 6px; }
|
||||
.run-empty, .run-error { padding: 10px 12px; }
|
||||
/* no run to show: what is in the way, the first problem, and the way to the rest */
|
||||
.run-empty-head { margin: 0 0 6px; color: var(--ink); }
|
||||
.run-empty-detail { margin: 0 0 10px; padding: 6px 10px; border-left: 3px solid var(--err); background: var(--paper-2); font-size: 12.5px; white-space: pre-wrap; overflow-wrap: anywhere; }
|
||||
.run-now { align-items: flex-start; }
|
||||
.run-chip { display: inline-flex; align-items: center; gap: 2px; }
|
||||
.run-chip-fn { color: var(--ink-3); }
|
||||
@@ -4189,6 +4222,8 @@ button.asm-src:hover {
|
||||
.qg-index a.qg-kind-rendered { color: var(--ok); }
|
||||
.qg-index a.qg-kind-live { color: var(--accent); }
|
||||
.qg-gallery { display: flex; flex-direction: column; gap: 22px; margin-top: 14px; }
|
||||
/* a section the address names stops a little under the top of the window, not flush against it */
|
||||
#problems, #reference, #quarto-teaser { scroll-margin-top: 16px; }
|
||||
.qg-card { scroll-margin-top: 16px; padding: 18px 18px 14px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--paper); }
|
||||
.qg-card-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
|
||||
.qg-card-head h3 { margin: 0; font-size: 17px; order: -1; flex-basis: 100%; }
|
||||
@@ -4325,10 +4360,32 @@ button.asm-src:hover {
|
||||
bar at the foot of the toolbar (shell.ts, setNarrow): the code with the stepper under it; the side column (or the
|
||||
board) with the stepper above it; or the dock. Each part scrolls inside itself. A wider screen never sees the bar. */
|
||||
.narrow-bar { display: none; }
|
||||
/* a label with a short form for a small phone (the Best practices switch) */
|
||||
.tool-tight { display: none; }
|
||||
@media (max-width: 700px) {
|
||||
.toolbar { gap: 6px 8px; padding: 6px 10px; }
|
||||
.narrow-bar { display: flex; flex-basis: 100%; }
|
||||
.narrow-bar .seg-opt { flex: 1; }
|
||||
.narrow-bar .seg-opt { flex: 1; padding-left: 6px; padding-right: 6px; white-space: nowrap; }
|
||||
/* three rows above the bar: the mark, the area, help and the theme; the problem, its versions and Reset; the
|
||||
actions. The spacer that pushes the actions right on a wide screen has nothing to push here, and the ::after is
|
||||
the line break between the second row and the third (a flex line of no height; its margin takes the gap back). */
|
||||
.shell:not(.shell-embed) > .toolbar { gap: 0 6px; padding-top: 3px; padding-bottom: 3px; }
|
||||
.shell:not(.shell-embed) > .toolbar > * { margin-top: 3px; margin-bottom: 3px; }
|
||||
.shell:not(.shell-embed) > .toolbar > .spacer, .shell:not(.shell-embed) > .toolbar > .brand .brand-name { display: none; }
|
||||
.shell:not(.shell-embed) > .toolbar > .seg .seg-opt { padding-left: 10px; padding-right: 10px; }
|
||||
.shell:not(.shell-embed) > .toolbar > .icon-btn { order: 1; }
|
||||
.shell:not(.shell-embed) > .toolbar > .tool-help { margin-left: auto; }
|
||||
.shell:not(.shell-embed) > .toolbar::before, .shell:not(.shell-embed) > .toolbar::after { content: ""; flex-basis: 100%; height: 0; }
|
||||
.shell:not(.shell-embed) > .toolbar::before { order: 2; }
|
||||
.shell:not(.shell-embed) > .toolbar > .select { order: 3; flex: 1 1 0; min-width: 120px; }
|
||||
.shell:not(.shell-embed) > .toolbar > .versions, .shell:not(.shell-embed) > .toolbar > .tool-reset { order: 3; }
|
||||
.shell:not(.shell-embed) > .toolbar::after { order: 4; }
|
||||
.shell:not(.shell-embed) > .toolbar > .btn:not(.icon-btn):not(.tool-reset) { order: 5; padding-left: 8px; padding-right: 8px; }
|
||||
.shell:not(.shell-embed) > .toolbar > .narrow-bar { order: 6; }
|
||||
/* the Versions menu opens across the screen, under its button, instead of running off the right edge */
|
||||
.toolbar { position: relative; }
|
||||
.toolbar > .versions { position: static; }
|
||||
.toolbar > .versions .versions-menu { left: 10px; right: 10px; top: auto; width: auto; margin-top: 4px; }
|
||||
.shell { height: 100vh; height: 100dvh; min-height: 0; }
|
||||
.workspace, .workspace.workspace-board { flex: 1; min-height: 0; }
|
||||
.main { flex: 1; min-height: 0; }
|
||||
@@ -4346,3 +4403,8 @@ button.asm-src:hover {
|
||||
.workspace[data-narrow="dock"] .dock { flex: 1; min-height: 0; }
|
||||
.workspace[data-narrow="dock"] .dock-body { display: block; max-height: none; }
|
||||
}
|
||||
@media (max-width: 380px) {
|
||||
.tool-wide { display: none; }
|
||||
.tool-tight { display: inline; }
|
||||
.shell:not(.shell-embed) > .toolbar > .btn:not(.icon-btn):not(.tool-reset) { padding-left: 6px; padding-right: 6px; }
|
||||
}
|
||||
Reference in new issue
Block a user