Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified docs/screenshots/application.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/screenshots/applications.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 4 additions & 4 deletions shell/ui/Popup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -281,31 +281,31 @@ export function Popup(): VNode {
<input
type="text"
value={linkValue}
disabled={facts !== undefined}
readOnly={facts !== undefined}
onInput={(e) => setPasteLink(e.currentTarget.value)}
/>
</Field>
<Field label="Title">
<input
type="text"
value={pasteTitle}
disabled={facts !== undefined}
readOnly={facts !== undefined}
onInput={(e) => setPasteTitle(e.currentTarget.value)}
/>
</Field>
<Field label="Company">
<input
type="text"
value={pasteCompany}
disabled={facts !== undefined}
readOnly={facts !== undefined}
onInput={(e) => setPasteCompany(e.currentTarget.value)}
/>
</Field>
<Field label="Posting text">
<textarea
rows={6}
value={pasteText}
disabled={facts !== undefined}
readOnly={facts !== undefined}
onInput={(e) => setPasteText(e.currentTarget.value)}
/>
</Field>
Expand Down
9 changes: 9 additions & 0 deletions shell/ui/components/Field.css
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,15 @@
outline-offset: 2px;
}

/* A read-only field holds a saved record: full-strength text and no
underline, so it reads as filed, not as a faded hint or an empty line. */
.cs-field
input[readonly]:not([type='checkbox']):not([type='radio']):not([type='file']),
.cs-field textarea[readonly] {
border-bottom-color: transparent;
resize: none;
}

.cs-field input:disabled,
.cs-field textarea:disabled,
.cs-field select:disabled {
Expand Down
28 changes: 26 additions & 2 deletions shell/ui/theme/layout.css
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@
margin-bottom: 1rem;
}

.filters input[type='search'] {
/* The flex item is the Field label around the input, not the input itself. */
.filters > .cs-field:has(> input[type='search']) {
flex: 1 1 14rem;
}

Expand Down Expand Up @@ -58,12 +59,35 @@
min-height: 5rem;
}

/* Row 1: kind and the recorded file. Row 2: the picker, then Remove when
there is a file. An error gets its own row. */
.document-field {
display: grid;
grid-template-columns: max-content minmax(0, 1fr) max-content;
align-items: center;
gap: 0.25rem 0.75rem;
margin-bottom: 0.75rem;
}

.document-field > :nth-child(2) {
grid-column: 2 / -1;
}

.document-field > .cs-field {
grid-column: 1 / 3;
display: flex;
flex-wrap: wrap;
align-items: center;
gap: 0.5rem;
margin-bottom: 0.5rem;
}

.document-field > .cs-button {
grid-column: 3;
}

.document-field > .field-error {
grid-column: 2 / -1;
margin-left: 0;
}

.document-meta {
Expand Down
10 changes: 10 additions & 0 deletions tools/shots/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,16 @@ async function takeDashboardShot(
await driver.executeScript('location.hash = arguments[0];', hash);
await setViewport(driver, shot.width, shot.height);
await driver.sleep(800);
// The paper grain is a fixed layer the size of the viewport. A full-page
// capture of a page taller than the viewport would show it stopping at the
// fold, which never happens while scrolling, so make the viewport as tall as
// the page first.
const pageHeight = await driver.executeScript<number>(
'return document.documentElement.scrollHeight;',
);
if (pageHeight > shot.height) {
await setViewport(driver, shot.width, pageHeight);
}
return savePng(dir, shot.name, await driver.takeFullPageScreenshot());
}

Expand Down