Companies and Searches: follow, hide not mute, prune moved, one row style
Companies gets a Follow-a-company form, a combined affinity/on-off filter, and one .srow-style row per company (name, board or "from searches", open roles, on/off switch, affinity). The prune-by-region tool moves here from Searches, folded under the list in a <details>. The lede states the difference between switching a board off (stops reading it, closes its roles) and hiding a company (keeps reading it, keeps its roles out of the list and unscored). affinityControl becomes three icon toggles (favourite, like, hidden) instead of four letter buttons with a neutral one; pressing the pressed icon clears back to neutral. "Hidden" is the word everywhere the UI names affinity -1; the code keeps mute/hide_muted. CompanyOut carries each company's board subscription id and on-state, so the Companies page needs only /api/companies, not a second fetch of /api/sources. Setting a company's affinity now enqueues a score job, deduped by the queue to one run. Searches keeps only the search form and list, in the same row style; company boards and the prune tool left with it, and "Pull now" left for Pulls (package B3). Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
1 parent
7d31cca394
commit
55248555e9
8 files changed
+419
-318
No files matched your search
+64
-11
@@ -348,13 +348,21 @@ textarea:focus-visible {
|
||||
.role-main .affinity { margin-left: auto; }
|
||||
.affinity button {
|
||||
background: none; border: 1px solid var(--line); border-radius: .3rem;
|
||||
padding: .1rem .4rem; color: var(--dim); font-size: .85rem; line-height: 1.4;
|
||||
padding: .1rem .4rem; color: var(--dim); font-size: 1rem; line-height: 1.4;
|
||||
}
|
||||
.affinity button[aria-pressed="true"] {
|
||||
/* One colour per stance, filled rather than tinted so "pressed" reads at a
|
||||
glance (news's own reasoning for its vote buttons, app.css 1906-1930):
|
||||
gold for favourite, the app's own accent for like, the error red for
|
||||
hidden, since hiding a company is the one stance that keeps its roles out
|
||||
of the list entirely. */
|
||||
.affinity button[data-value="2"][aria-pressed="true"] {
|
||||
color: var(--accent-fg); background: var(--warn); border-color: var(--warn);
|
||||
}
|
||||
.affinity button[data-value="1"][aria-pressed="true"] {
|
||||
color: var(--accent-fg); background: var(--accent); border-color: var(--accent);
|
||||
}
|
||||
.affinity button[data-value="-1"][aria-pressed="true"] {
|
||||
background: var(--error); border-color: var(--error);
|
||||
color: var(--accent-fg); background: var(--error); border-color: var(--error);
|
||||
}
|
||||
|
||||
.save { align-self: flex-start; padding: .3rem .8rem; font-weight: 600; }
|
||||
@@ -394,14 +402,21 @@ textarea:focus-visible {
|
||||
.agent-form details summary { cursor: pointer; color: var(--dim); font-size: .9rem; }
|
||||
.agent-form details[open] summary { margin-bottom: .5rem; }
|
||||
|
||||
/* sources */
|
||||
/* ================================================================ */
|
||||
/* companies and sources — Settings' Companies and Searches pages, */
|
||||
/* static/companies.js and static/sources.js. Package B2's own */
|
||||
/* section; the rest of the file is not reflowed for it. */
|
||||
/* ================================================================ */
|
||||
|
||||
.section { margin: 1.5rem 0 2rem; }
|
||||
.section > h2 { margin-bottom: .25rem; }
|
||||
.source-form { margin-top: 1rem; }
|
||||
.form-row { display: flex; gap: .75rem; flex-wrap: wrap; }
|
||||
.form-row label { flex: 0 1 auto; }
|
||||
.form-row label.grow { flex: 1 1 14rem; }
|
||||
.source-form { margin-top: 1rem; max-width: none; }
|
||||
/* `auto-fit` rather than a fixed count of columns: a row with fewer fields
|
||||
(Jobindex's Area, say, where Adzuna also needs Country and Place) simply
|
||||
leaves the boxes it does have at the same width instead of stretching one
|
||||
to fill the gap, which is what made the boxes disagree with each other's
|
||||
width before. */
|
||||
.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr)); gap: .75rem; align-items: start; }
|
||||
.source-form select {
|
||||
background: var(--bg); border: 1px solid var(--line);
|
||||
border-radius: .3rem; padding: .35rem .5rem;
|
||||
@@ -410,8 +425,46 @@ textarea:focus-visible {
|
||||
.sample { margin: 0; padding-left: 1.25rem; font-size: .9rem; }
|
||||
.sample li { margin: .15rem 0; }
|
||||
.mono { font-family: var(--mono); overflow-wrap: anywhere; }
|
||||
.row-actions { display: inline-flex; gap: .35rem; }
|
||||
.row-actions button { padding: .25rem .6rem; }
|
||||
|
||||
/* A row of a list that is not a table: Companies and Searches, after news's
|
||||
`.srow` (app.css 659-665 and 783-787 there). Line one is the name and
|
||||
whatever switch or controls belong beside it; `.sub`, muted and full width,
|
||||
wraps onto its own line rather than sharing a column with them, which is
|
||||
what keeps a long query or board name from crowding the switch at any
|
||||
width — a table's fixed columns needed a breakpoint to do the same, a grid
|
||||
with one column spanning the row does not. */
|
||||
.srows, .crows { display: flex; flex-direction: column; margin: .5rem 0 1.5rem; }
|
||||
.srow, .crow {
|
||||
display: grid; grid-template-columns: 1fr auto auto;
|
||||
align-items: center; column-gap: .6rem; row-gap: .15rem;
|
||||
padding: .5rem 0; border-bottom: 1px solid var(--line);
|
||||
}
|
||||
.srow .name, .crow .name {
|
||||
grid-column: 1; display: flex; align-items: center; gap: .4rem;
|
||||
font-size: .96rem; text-decoration: none; color: inherit;
|
||||
}
|
||||
.crow .name { font-weight: 600; }
|
||||
@media (hover: hover) {
|
||||
.crow .name:hover { text-decoration: underline; }
|
||||
}
|
||||
.srow .sub, .crow .sub {
|
||||
grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center;
|
||||
gap: .4rem; font-size: .8rem; color: var(--dim);
|
||||
}
|
||||
.srow[data-muted="true"], .crow[data-hidden="true"] { opacity: .6; }
|
||||
|
||||
.linky {
|
||||
padding: 0; border: 0; background: none; font-size: .8rem;
|
||||
color: var(--dim); text-decoration: underline; text-underline-offset: 2px;
|
||||
}
|
||||
@media (hover: hover) {
|
||||
.linky:hover { color: var(--fg); background: none; }
|
||||
}
|
||||
|
||||
/* The prune tool: folded under the list, since switching a board off by
|
||||
region is an occasional errand and not what the page is for. */
|
||||
.prune > summary { cursor: pointer; color: var(--dim); font-weight: 600; }
|
||||
.prune[open] > summary { margin-bottom: .75rem; }
|
||||
|
||||
/* applications and companies */
|
||||
|
||||
@@ -501,6 +554,6 @@ table.list select { padding: .25rem .4rem; }
|
||||
.top nav a, .subtabs a { display: inline-flex; align-items: center; justify-content: center; }
|
||||
.filters input[type="search"], .filters input[type="text"], .filters select,
|
||||
.agent-form input, .source-form select { min-height: 2.75rem; }
|
||||
.affinity button { min-width: 2.25rem; }
|
||||
.affinity button { min-width: 2.75rem; }
|
||||
.check input { width: 1.25rem; height: 1.25rem; }
|
||||
}
|
||||
Reference in new issue
Block a user