Search roles by company too, link the careers page in the reader, widen the list and reader
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
a584b88ead
commit
51d2537d73
5 files changed
+20
-12
No files matched your search
+6
-5
@@ -477,11 +477,11 @@ body[data-rail="shut"] #rail { display: none; }
|
||||
/* Reading opens a third column and the shell goes full width: the list keeps
|
||||
a narrow lane on the left, the role takes the rest. */
|
||||
body[data-reader="open"] .shell {
|
||||
grid-template-columns: 15rem 21rem minmax(0, 1fr);
|
||||
grid-template-columns: 15rem 29rem minmax(0, 1fr);
|
||||
max-width: none; gap: 1.2rem;
|
||||
}
|
||||
body[data-reader="open"][data-rail="shut"] .shell {
|
||||
grid-template-columns: 21rem minmax(0, 1fr);
|
||||
grid-template-columns: 29rem minmax(0, 1fr);
|
||||
}
|
||||
|
||||
/* -- the rail -- */
|
||||
@@ -842,12 +842,13 @@ tr.muted { opacity: .55; }
|
||||
padding: 1.6rem 2rem 4rem;
|
||||
overflow-wrap: anywhere;
|
||||
}
|
||||
/* ~68 characters a line at the reading size -- past that the eye loses the
|
||||
start of the next line and has to hunt for it. */
|
||||
.reader-body > * { max-width: 36rem; margin-inline: auto; }
|
||||
/* ~90 characters a line at the reading size: newsdesk's 36rem wrapped a
|
||||
posting's short lines and lists too early. */
|
||||
.reader-body > * { max-width: 48rem; margin-inline: auto; }
|
||||
|
||||
.reader-meta { margin-top: 0; }
|
||||
.reader-meta b { font-weight: 600; color: var(--dim); }
|
||||
.reader-meta .reader-careers { color: var(--dim); }
|
||||
.reader-meta .affinity { font-size: .85rem; }
|
||||
.reader-meta .affinity:empty { display: none; }
|
||||
|
||||
|
||||
@@ -798,6 +798,7 @@
|
||||
: text ? paragraphs(text)
|
||||
: `<p class="reader-note">The board gave no description for this one.</p>`;
|
||||
const pay = payDisplay(r);
|
||||
const careers = safeUrl(companies.get(r.company_key)?.careers_url);
|
||||
const waiting = state.summarising === state.readingUid;
|
||||
const teaser = loaded && !r.article_text && out && (r.description || "").length < TEASER;
|
||||
|
||||
@@ -813,6 +814,8 @@
|
||||
<div class="reader-body">
|
||||
<div class="reader-meta">
|
||||
${r.company ? `<b>${esc(r.company)}</b>` : ""}
|
||||
${careers ? `<a class="reader-careers" href="${esc(careers)}" target="_blank" rel="noopener"
|
||||
title="The company's careers page">Careers ↗</a>` : ""}
|
||||
<span class="affinity-slot"></span>
|
||||
${r.place ? `<span>${esc(r.place)}</span>` : ""}
|
||||
${r.first_seen ? `<span title="First seen">${ago(r.first_seen)}</span>` : ""}
|
||||
|
||||
@@ -496,10 +496,11 @@ class Store:
|
||||
"""Newest first by `posted_at`. `company` and `place` are
|
||||
case-insensitive substrings of the columns a board wrote — not the
|
||||
key, so a search does not have to know the exact slug a company folds
|
||||
to. `q` is matched word by word against `title`; a role must match
|
||||
every word. `function` and `remote` match a gate column exactly.
|
||||
`days` keeps only roles posted within that many days of now. `pay`
|
||||
(a key of `PAY`) filters on `salary_state`.
|
||||
to. `q` is matched word by word against `title` and `company`; a
|
||||
role must match every word in one or the other. `function` and
|
||||
`remote` match a gate column exactly. `days` keeps only roles posted
|
||||
within that many days of now. `pay` (a key of `PAY`) filters on
|
||||
`salary_state`.
|
||||
|
||||
`agent` says whose votes, hidden companies and scores are meant. Each
|
||||
row carries that agent's `vote` and `voted_at`; `judged` (a key of
|
||||
@@ -653,8 +654,8 @@ class Store:
|
||||
where.append("posted_at >= ?")
|
||||
params.append(_iso(self.clock() - timedelta(days=days)))
|
||||
for word in (q or "").split():
|
||||
where.append("title LIKE ? ESCAPE '\\'")
|
||||
params.append(_like(word))
|
||||
where.append("(title LIKE ? ESCAPE '\\' OR company LIKE ? ESCAPE '\\')")
|
||||
params += [_like(word)] * 2
|
||||
if judged:
|
||||
if judged not in JUDGED:
|
||||
raise ValueError(f"judged is {', '.join(JUDGED)}, not {judged!r}")
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
<button type="button" id="rail-toggle" title="Menu (f)" aria-label="Menu"
|
||||
aria-controls="rail"><span class="burger" aria-hidden="true"></span><span
|
||||
class="rail-toggle-label">Menu</span></button>
|
||||
<input type="search" id="search" placeholder="Search" aria-label="Search titles"
|
||||
<input type="search" id="search" placeholder="Search" aria-label="Search titles and companies"
|
||||
autocomplete="off">
|
||||
{% endblock %}
|
||||
|
||||
|
||||
@@ -668,6 +668,9 @@ def test_roles_filters_q_function_remote_and_days(store: Store, clock: Clock) ->
|
||||
function="sales"))
|
||||
assert [r.source_id for r in store.roles(q="senior engineer")] == ["2", "1"]
|
||||
assert [r.source_id for r in store.roles(q="backend nonsense")] == []
|
||||
# A word may match the company instead of the title, each on its own.
|
||||
assert [r.source_id for r in store.roles(q="acme engineer")] == ["2", "1"]
|
||||
assert [r.source_id for r in store.roles(q="acme nonsense")] == []
|
||||
assert [r.source_id for r in store.roles(function="engineering")] == ["1"]
|
||||
assert [r.source_id for r in store.roles(remote="remote")] == ["1"]
|
||||
assert [r.source_id for r in store.roles(company="ac")] == ["2", "1"]
|
||||
|
||||
Reference in new issue
Block a user