Link a company on Settings › Sources to its company view by key, not a name search that also lists other companies whose names hold it and shows no gate note
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
1 parent
1127d06f03
commit
8be59a7ee4
4 files changed
+27
-12
No files matched your search
@@ -420,9 +420,13 @@
|
|||||||
const row = document.createElement("div");
|
const row = document.createElement("div");
|
||||||
row.className = "crow";
|
row.className = "crow";
|
||||||
if (company.affinity === -1) row.dataset.hidden = "true";
|
if (company.affinity === -1) row.dataset.hidden = "true";
|
||||||
|
// By key, as the feed's own company links are, so the Roles page opens
|
||||||
|
// the company view with its strip and gate note. A name would be a
|
||||||
|
// substring there, which also lists other companies whose names hold it
|
||||||
|
// and misses roles spelt otherwise.
|
||||||
const link = document.createElement("a");
|
const link = document.createElement("a");
|
||||||
link.className = "name";
|
link.className = "name";
|
||||||
link.href = `/?company=${encodeURIComponent(company.name)}`;
|
link.href = `/?company_keys=${encodeURIComponent(company.key)}`;
|
||||||
link.title = "This company's open roles";
|
link.title = "This company's open roles";
|
||||||
link.textContent = company.name;
|
link.textContent = company.name;
|
||||||
row.appendChild(link);
|
row.appendChild(link);
|
||||||
|
|||||||
+10
-9
@@ -76,14 +76,14 @@
|
|||||||
* screen with that company as its one company chip (`?company_keys=`); a
|
* screen with that company as its one company chip (`?company_keys=`); a
|
||||||
* plain click filters in place and pushes. With one company filtered a strip
|
* plain click filters in place and pushes. With one company filtered a strip
|
||||||
* over the feed names it, counts its roles, links its careers page and
|
* over the feed names it, counts its roles, links its careers page and
|
||||||
* carries its ⊘ ▲ ★ for the viewing agent. `?company=`, `?company_keys=` and
|
* carries its ⊘ ▲ ★ for the viewing agent. `?company_keys=` and `?agent=`
|
||||||
* `?agent=` are how the Companies and Search agents pages link in.
|
* are how Settings › Sources and Search agents link in.
|
||||||
*
|
*
|
||||||
* Company and Place in the rail are chip inputs (chips.js) on the suggest
|
* Company and Place in the rail are chip inputs (chips.js) on the suggest
|
||||||
* routes: a chip is a company key or a place token (`country:DK`,
|
* routes: a chip is a company key or a place token (`country:DK`,
|
||||||
* `region:skane`), several joined by OR. `?company=` and `?place=`, the
|
* `region:skane`), several joined by OR. `?company=` and `?place=`, the
|
||||||
* substrings of the links from other pages, still filter and show as a chip
|
* substrings of older links and saved filters, still filter and show as a
|
||||||
* of their own to take off; nothing in the rail types a new one. Seniority
|
* chip of their own to take off; nothing in the rail types a new one. Seniority
|
||||||
* (a From and a To rung and a Track, `level_from`, `level_to` and `track`)
|
* (a From and a To rung and a Track, `level_from`, `level_to` and `track`)
|
||||||
* and Pay carry the counts of `/api/roles/facets`, asked after each reload
|
* and Pay carry the counts of `/api/roles/facets`, asked after each reload
|
||||||
* with the feed's own parameters, so each says what a click would add. The
|
* with the feed's own parameters, so each says what a click would add. The
|
||||||
@@ -156,10 +156,11 @@
|
|||||||
|
|
||||||
// Everything `clearFilters` has to put back, in one place, so a new filter
|
// Everything `clearFilters` has to put back, in one place, so a new filter
|
||||||
// added here cannot be forgotten there. `company` and `place` are the
|
// added here cannot be forgotten there. `company` and `place` are the
|
||||||
// substrings of links from other pages; `companyKeys` and `places` are the
|
// substrings of older links and saved filters; `companyKeys` and `places`
|
||||||
// rail's chips. `levelFrom`, `levelTo` and `track` are the seniority range;
|
// are the rail's chips. `levelFrom`, `levelTo` and `track` are the seniority
|
||||||
// `seniorityUnknown` and `payUnknown` are the "and roles with no level / no
|
// range; `seniorityUnknown` and `payUnknown` are the "and roles with no
|
||||||
// pay" boxes, asked only while a range, a track or a pay option is picked.
|
// level / no pay" boxes, asked only while a range, a track or a pay option
|
||||||
|
// is picked.
|
||||||
function blankFilter() {
|
function blankFilter() {
|
||||||
return {
|
return {
|
||||||
sort: "score", agent: null, period: "all", tags: new Set(), showRead: true,
|
sort: "score", agent: null, period: "all", tags: new Set(), showRead: true,
|
||||||
@@ -739,7 +740,7 @@
|
|||||||
input.set(want);
|
input.set(want);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* `?company=` or `?place=`, the substring a link from another page
|
/* `?company=` or `?place=`, the substring an older link or saved filter
|
||||||
brought: a plain chip saying what it matches, which takes it off and
|
brought: a plain chip saying what it matches, which takes it off and
|
||||||
pushes, as a filter does. */
|
pushes, as a filter does. */
|
||||||
function renderText(id, text, noun, key) {
|
function renderText(id, text, noun, key) {
|
||||||
|
|||||||
@@ -92,8 +92,9 @@
|
|||||||
<div class="rail-fields">
|
<div class="rail-fields">
|
||||||
{# Company and Place are chip inputs (static/chips.js), each pick a
|
{# Company and Place are chip inputs (static/chips.js), each pick a
|
||||||
company key or a place token from the suggest routes. The chips
|
company key or a place token from the suggest routes. The chips
|
||||||
of `?company=` and `?place=`, the substrings other pages link
|
of `?company=` and `?place=`, the substrings of older links and
|
||||||
with, sit under them to be taken off; nothing types a new one. #}
|
saved filters, sit under them to be taken off; nothing types a
|
||||||
|
new one. #}
|
||||||
<div id="f-company"></div>
|
<div id="f-company"></div>
|
||||||
<div id="f-company-text" class="rail-legacy" hidden></div>
|
<div id="f-company-text" class="rail-legacy" hidden></div>
|
||||||
<div id="f-place"></div>
|
<div id="f-place"></div>
|
||||||
|
|||||||
@@ -110,3 +110,12 @@ def test_every_page_says_all_locations() -> None:
|
|||||||
assert "All countries" not in path.read_text(), path.name
|
assert "All countries" not in path.read_text(), path.name
|
||||||
for path in (STATIC.parent / "templates").rglob("*.html"):
|
for path in (STATIC.parent / "templates").rglob("*.html"):
|
||||||
assert "All countries" not in path.read_text(), path.name
|
assert "All countries" not in path.read_text(), path.name
|
||||||
|
|
||||||
|
|
||||||
|
def test_a_company_on_settings_sources_links_to_its_company_view_by_key() -> None:
|
||||||
|
"""By key, as the feed's own company links are: a name is a substring on
|
||||||
|
the Roles page, which lists other companies whose names hold it and
|
||||||
|
shows no company strip with its gate note."""
|
||||||
|
script = (STATIC / "companies.js").read_text()
|
||||||
|
assert "`/?company_keys=${encodeURIComponent(company.key)}`" in script
|
||||||
|
assert "/?company=" not in script
|
||||||
Reference in new issue
Block a user