Company page: names in other languages in a popover from a languages icon, edited under Edit #1015

Merged
tiagoagueda merged 1 commit from 917-company-names-popover into main 2026-10-20 06:18:59 +00:00
Owner

Closes #917

What changed

  • The company page no longer has the data-company-names section. When the company has names in other languages, a Lucide languages icon button follows the H1 and opens a read-only Basecoat popover (popovertarget, so it works with scripts off). Each row has the language in the interface's words and the name in <bdi lang>. No names, no icon.
  • The list, Remove, Fetch from Wikidata and the add form moved to a card on the company's Edit page, as forms outside the main form (the logo dialog's pattern), each posting with a hidden next set to the edit URL.
  • CompanyNamesView and CompanyWikidataView return through safe_next. The Wikidata review keeps the next in the session, so Keep and Cancel return to Edit too. An unsafe next falls back to the company page.
  • The "Give the company its Wikidata identifier, under Edit, ..." sentence now reads "above under Identifiers" since it sits on Edit.
  • languages added to assets/icons.txt, and the SVG synced.
  • app.js: a button that opens a [data-popover] puts its own tooltip away as the panel opens. Without this, the first Escape dismissed the focused button's tooltip (WCAG 1.4.13) and a second was needed to close the panel.
  • Side effect: a read-only viewer sees the names but no longer sees the write forms.
  • The button is named by its tooltip (aria-labelledby, as the footer and map buttons are) rather than aria-label; the accessible name is "Names in other languages".

Tests

  • tests/test_company_names.py: icon only when names exist, edit page carries the forms, next honoured and an unsafe next ignored, fetch and review return to Edit, read-only viewer has no write forms.
  • tests/e2e/test_company_names_popover.py: opens from the keyboard, Escape closes and refocuses, opens with scripts off, no icon without names.
  • Unit suite green (19411 passed); e2e for the popover, logo dialog, help, people menu, keyboard and focus, and described-by green.

Library check

None needed.

Model use

Written with Claude Code, reviewed by the person who opens the PR.

🤖 Generated with Claude Code

Closes #917 ## What changed - The company page no longer has the `data-company-names` section. When the company has names in other languages, a Lucide `languages` icon button follows the H1 and opens a read-only Basecoat popover (`popovertarget`, so it works with scripts off). Each row has the language in the interface's words and the name in `<bdi lang>`. No names, no icon. - The list, Remove, Fetch from Wikidata and the add form moved to a card on the company's Edit page, as forms outside the main form (the logo dialog's pattern), each posting with a hidden `next` set to the edit URL. - `CompanyNamesView` and `CompanyWikidataView` return through `safe_next`. The Wikidata review keeps the `next` in the session, so Keep and Cancel return to Edit too. An unsafe `next` falls back to the company page. - The "Give the company its Wikidata identifier, under Edit, ..." sentence now reads "above under Identifiers" since it sits on Edit. - `languages` added to `assets/icons.txt`, and the SVG synced. - `app.js`: a button that opens a `[data-popover]` puts its own tooltip away as the panel opens. Without this, the first Escape dismissed the focused button's tooltip (WCAG 1.4.13) and a second was needed to close the panel. - Side effect: a read-only viewer sees the names but no longer sees the write forms. - The button is named by its tooltip (`aria-labelledby`, as the footer and map buttons are) rather than `aria-label`; the accessible name is "Names in other languages". ## Tests - `tests/test_company_names.py`: icon only when names exist, edit page carries the forms, `next` honoured and an unsafe `next` ignored, fetch and review return to Edit, read-only viewer has no write forms. - `tests/e2e/test_company_names_popover.py`: opens from the keyboard, Escape closes and refocuses, opens with scripts off, no icon without names. - Unit suite green (19411 passed); e2e for the popover, logo dialog, help, people menu, keyboard and focus, and described-by green. ## Library check None needed. ## Model use Written with Claude Code, reviewed by the person who opens the PR. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Read a company's other-language names from a popover, edit them under Edit
All checks were successful
CI / Unit tests and coverage (Python 3.14) (push) Successful in 12m2s
CI / Checks: lint, migrations, catalogues, settings, built files (push) Successful in 2m31s
CI / Database tests on PostgreSQL (push) Successful in 3m15s
CI / Security audit (push) Successful in 38s
Every Python / Unit tests (Python 3.12) (push) Successful in 12m19s
Every Python / Unit tests (Python 3.13) (push) Successful in 12m29s
CI / Browser tests (Chromium) (push) Successful in 29m4s
CI / Unit tests and coverage (Python 3.14) (pull_request) Successful in 14m49s
CI / Checks: lint, migrations, catalogues, settings, built files (pull_request) Successful in 2m37s
CI / Database tests on PostgreSQL (pull_request) Successful in 3m26s
CI / Security audit (pull_request) Successful in 49s
CI / Browser tests (Chromium) (pull_request) Successful in 32m17s
fecc39d60e
The names in other languages took a whole section of the company's page for
something read now and then, and the page's write forms were drawn for
people who could not use them. They are now read from a languages icon beside
the company's name, which opens a read-only popover (drawn only when the
company has some names; a popovertarget button, so it works with scripts off
and the browser closes it on Escape and returns the focus). Listing,
removing, fetching from Wikidata and adding moved to a card on the edit
page, as forms of their own outside the main form like the logo dialog's,
each returning to Edit through a safe next. The Wikidata review keeps that
next in the session so Keep and Cancel return to Edit too.

A button that opens a popover now puts its own tooltip away as the panel
opens; otherwise the first Escape dismissed the tooltip and a second was
needed to close the panel. Side effect: a read-only viewer no longer sees
write forms they could not use.

Closes #917

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
tiagoagueda force-pushed 917-company-names-popover from fecc39d60e
All checks were successful
CI / Unit tests and coverage (Python 3.14) (push) Successful in 12m2s
CI / Checks: lint, migrations, catalogues, settings, built files (push) Successful in 2m31s
CI / Database tests on PostgreSQL (push) Successful in 3m15s
CI / Security audit (push) Successful in 38s
Every Python / Unit tests (Python 3.12) (push) Successful in 12m19s
Every Python / Unit tests (Python 3.13) (push) Successful in 12m29s
CI / Browser tests (Chromium) (push) Successful in 29m4s
CI / Unit tests and coverage (Python 3.14) (pull_request) Successful in 14m49s
CI / Checks: lint, migrations, catalogues, settings, built files (pull_request) Successful in 2m37s
CI / Database tests on PostgreSQL (pull_request) Successful in 3m26s
CI / Security audit (pull_request) Successful in 49s
CI / Browser tests (Chromium) (pull_request) Successful in 32m17s
to 44a0ef30e0
All checks were successful
CI / Unit tests and coverage (Python 3.14) (push) Successful in 12m38s
CI / Checks: lint, migrations, catalogues, settings, built files (push) Successful in 2m41s
CI / Database tests on PostgreSQL (push) Successful in 3m42s
CI / Security audit (push) Successful in 52s
CI / Browser tests (Chromium) (push) Successful in 30m0s
Every Python / Unit tests (Python 3.12) (push) Successful in 12m44s
Every Python / Unit tests (Python 3.13) (push) Successful in 13m47s
CI / Unit tests and coverage (Python 3.14) (pull_request) Successful in 12m24s
CI / Checks: lint, migrations, catalogues, settings, built files (pull_request) Successful in 2m34s
CI / Database tests on PostgreSQL (pull_request) Successful in 3m26s
CI / Security audit (pull_request) Successful in 50s
CI / Browser tests (Chromium) (pull_request) Successful in 29m19s
2026-10-19 20:49:24 +00:00
Compare
tiagoagueda deleted branch 917-company-names-popover 2026-10-20 06:19:02 +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!1015
No description provided.