Companies' map on phones: the Table link as its icon, with a tooltip #1016

Merged
tiagoagueda merged 3 commits from 916-map-table-icon into main 2026-10-21 14:19:47 +00:00
Owner

Closes #916

Builds on the #915 PR (#1013) and must be merged after it. The branch is cut from 915-map-tooltips-beside, so until #1013 is merged this PR's diff also shows that commit; it needs the data-tooltip-place hook.

On a phone (below sm) the Table link on the companies' map is its icon alone, with a "Table view" tooltip below it.

  • company_map.html: the word is <span class="sr-only sm:not-sr-only">Table</span> (visually hidden, not removed, so the name stays "Table"); the link is a square icon button below sm; the tooltip is aria-describedby, asks for below, and is marked data-tooltip-narrow.
  • app.js: placeTip does not show a data-tooltip-narrow tooltip from sm (40rem) up, where the word is visible; the server writes it hidden, which the script lifts when it makes it a tooltip.
  • New string "Table view": empty catalogue slots only (Weblate).
  • Tests: tests/e2e/test_map.py (390px: icon-only, name "Table", tip below on hover and focus; 1280px: word shown, no tip), tests/test_company_map.py (markup). Full unit suite green.

Library check: none needed, a small UI change.

Model use: written with Claude Code, reviewed by the person who opens this PR.

🤖 Generated with Claude Code

Closes #916 **Builds on the #915 PR (#1013) and must be merged after it.** The branch is cut from `915-map-tooltips-beside`, so until #1013 is merged this PR's diff also shows that commit; it needs the `data-tooltip-place` hook. On a phone (below `sm`) the Table link on the companies' map is its icon alone, with a "Table view" tooltip below it. - `company_map.html`: the word is `<span class="sr-only sm:not-sr-only">Table</span>` (visually hidden, not removed, so the name stays "Table"); the link is a square icon button below `sm`; the tooltip is `aria-describedby`, asks for `below`, and is marked `data-tooltip-narrow`. - `app.js`: `placeTip` does not show a `data-tooltip-narrow` tooltip from `sm` (40rem) up, where the word is visible; the server writes it `hidden`, which the script lifts when it makes it a tooltip. - New string "Table view": empty catalogue slots only (Weblate). - Tests: `tests/e2e/test_map.py` (390px: icon-only, name "Table", tip below on hover and focus; 1280px: word shown, no tip), `tests/test_company_map.py` (markup). Full unit suite green. Library check: none needed, a small UI change. Model use: written with Claude Code, reviewed by the person who opens this PR. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Companies' map: tooltips beside their buttons, towards the map
All checks were successful
CI / Checks: lint, migrations, catalogues, settings, built files (push) Successful in 2m18s
CI / Database tests on PostgreSQL (push) Successful in 3m24s
CI / Unit tests and coverage (Python 3.14) (push) Successful in 12m31s
CI / Security audit (push) Successful in 45s
CI / Browser tests (Chromium) (push) Successful in 29m9s
Every Python / Unit tests (Python 3.12) (push) Successful in 12m3s
Every Python / Unit tests (Python 3.13) (push) Successful in 12m0s
CI / Unit tests and coverage (Python 3.14) (pull_request) Successful in 12m10s
CI / Checks: lint, migrations, catalogues, settings, built files (pull_request) Successful in 2m20s
CI / Database tests on PostgreSQL (pull_request) Successful in 3m28s
CI / Security audit (pull_request) Successful in 46s
CI / Browser tests (Chromium) (pull_request) Successful in 28m50s
5e2c112196
The Zoom in, Zoom out and Near me buttons are stacked, and the tooltip
script could only put a tooltip above or below its anchor, so each
tooltip landed over the neighbouring button.

placeTip learns two inline places, start and end: beside the anchor,
centred on it, mirrored in right-to-left pages, slid along the anchor's
side to stay inside the window. A sentence or its anchor asks for a side
with data-tooltip-place (start, end or below); that place is tried first
and the usual order follows when it has no room. The hover bridge gets an
inline variant (full height, 8px wide) so the tooltip stays hoverable
(SC 1.4.13). The three map sentences ask for start, the side facing into
the map as the buttons sit on the end side.

Tests: position, side and centring of each tip, right to left, the
bridge, and the markup.

Closes #915

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Companies' map on phones: the Table link as its icon, with a tooltip
Some checks failed
CI / Browser tests (Chromium) (push) Has been cancelled
CI / Unit tests and coverage (Python 3.14) (push) Has been cancelled
CI / Checks: lint, migrations, catalogues, settings, built files (push) Has been cancelled
CI / Database tests on PostgreSQL (push) Has been cancelled
CI / Security audit (push) Has been cancelled
CI / Browser tests (Chromium) (pull_request) Has been cancelled
CI / Unit tests and coverage (Python 3.14) (pull_request) Has been cancelled
CI / Checks: lint, migrations, catalogues, settings, built files (pull_request) Has been cancelled
Every Python / Unit tests (Python 3.12) (push) Has been cancelled
Every Python / Unit tests (Python 3.13) (push) Has been cancelled
CI / Database tests on PostgreSQL (pull_request) Has been cancelled
CI / Security audit (pull_request) Has been cancelled
a9629a652c
On a phone the Table link, the icon and the word, crowds the top of the
map. Below sm the word is now visually hidden (sr-only, not removed), so
the link keeps its name "Table" (SC 2.5.3) and becomes a square icon
button. "Table view" is its tooltip, described-by rather than the name,
placed below the link through the data-tooltip-place hook of #915.

From sm up the word is drawn and the tooltip would only repeat it, so a
tooltip marked data-tooltip-narrow is not shown at that width; the server
writes it hidden, so with scripts off it is not stray words in the page.

"Table view" is a new string, empty in the catalogues for Weblate.

This builds on #915 and must be merged after it.

Closes #916

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
tiagoagueda force-pushed 916-map-table-icon from a9629a652c
Some checks failed
CI / Browser tests (Chromium) (push) Has been cancelled
CI / Unit tests and coverage (Python 3.14) (push) Has been cancelled
CI / Checks: lint, migrations, catalogues, settings, built files (push) Has been cancelled
CI / Database tests on PostgreSQL (push) Has been cancelled
CI / Security audit (push) Has been cancelled
CI / Browser tests (Chromium) (pull_request) Has been cancelled
CI / Unit tests and coverage (Python 3.14) (pull_request) Has been cancelled
CI / Checks: lint, migrations, catalogues, settings, built files (pull_request) Has been cancelled
Every Python / Unit tests (Python 3.12) (push) Has been cancelled
Every Python / Unit tests (Python 3.13) (push) Has been cancelled
CI / Database tests on PostgreSQL (pull_request) Has been cancelled
CI / Security audit (pull_request) Has been cancelled
to a5f3301ee8
Some checks failed
Every Python / Unit tests (Python 3.12) (push) Successful in 12m0s
Every Python / Unit tests (Python 3.13) (push) Successful in 11m52s
CI / Unit tests and coverage (Python 3.14) (pull_request) Successful in 12m49s
CI / Checks: lint, migrations, catalogues, settings, built files (pull_request) Successful in 2m40s
CI / Database tests on PostgreSQL (pull_request) Successful in 3m35s
CI / Security audit (pull_request) Successful in 41s
CI / Browser tests (Chromium) (pull_request) Successful in 29m30s
CI / Browser tests (Chromium) (push) Has been cancelled
CI / Unit tests and coverage (Python 3.14) (push) Has been cancelled
CI / Checks: lint, migrations, catalogues, settings, built files (push) Has been cancelled
CI / Database tests on PostgreSQL (push) Has been cancelled
CI / Security audit (push) Has been cancelled
2026-10-19 19:23:07 +00:00
Compare
Merge main into 916-map-table-icon
Some checks failed
CI / Unit tests and coverage (Python 3.14) (push) Successful in 13m42s
Every Python / Unit tests (Python 3.13) (push) Successful in 12m0s
CI / Checks: lint, migrations, catalogues, settings, built files (push) Successful in 2m43s
CI / Database tests on PostgreSQL (push) Successful in 3m30s
CI / Security audit (push) Failing after 46s
CI / Unit tests and coverage (Python 3.14) (pull_request) Successful in 13m19s
CI / Browser tests (Chromium) (push) Failing after 30m15s
Every Python / Unit tests (Python 3.12) (push) Successful in 12m11s
CI / Checks: lint, migrations, catalogues, settings, built files (pull_request) Successful in 2m36s
CI / Database tests on PostgreSQL (pull_request) Successful in 3m42s
CI / Browser tests (Chromium) (pull_request) Successful in 28m51s
CI / Security audit (pull_request) Failing after 42s
7ba5b0cd35
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Merge remote-tracking branch 'origin/main' into HEAD
All checks were successful
CI / Unit tests and coverage (Python 3.14) (push) Successful in 15m35s
CI / Checks: lint, migrations, catalogues, settings, built files (push) Successful in 3m12s
CI / Security audit (push) Successful in 1m16s
CI / Database tests on PostgreSQL (push) Successful in 4m25s
CI / Browser tests (Chromium) (push) Successful in 32m26s
Every Python / Unit tests (Python 3.12) (push) Successful in 15m0s
Every Python / Unit tests (Python 3.13) (push) Successful in 15m3s
CI / Unit tests and coverage (Python 3.14) (pull_request) Successful in 13m52s
CI / Checks: lint, migrations, catalogues, settings, built files (pull_request) Successful in 3m11s
CI / Database tests on PostgreSQL (pull_request) Successful in 4m23s
CI / Browser tests (Chromium) (pull_request) Successful in 30m21s
CI / Security audit (pull_request) Successful in 1m15s
580efc7c17
tiagoagueda deleted branch 916-map-table-icon 2026-10-21 14:19:50 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
Postulo/postulo!1016
No description provided.