Put two icon buttons at the top right of the popup: capture this posting, and add a new listing from scratch #6

Closed
opened 2026-09-30 15:19:44 +00:00 by tiagoagueda · 0 comments
Owner

The popup's header holds only the logo and the title “Postulo”, in a flex row (src/popup.html lines 9–12). Capturing is the primary button “Capture this posting” in the body (#ready), with a hint under it. The one icon button is the settings gear in the footer: button.icon around an inline lucide-static v1.41.0 SVG, its aria-label and title filled from data-i18n-label. The suggestion is two icon buttons in line with the logo and title, at the top right: capture the current posting, and create a new job listing from scratch.

What the extension should do

  • The capture button, first. Today's flow, unchanged: readCurrentTab() under the activeTab grant that opening the popup gives, then the correction form or the tick list (or the review window of #8). Its name reuses the existing key capture.
  • The from-scratch button, second. Opens Postulo's own page /listings/new/ in the review window of #8, or a new tab until that lands. The extension makes no request; the browser must be signed in to Postulo, and is taken to its sign-in page otherwise. Named in the core's words, as the README promises: the core's listings page has “Capture a posting” and “Add a listing” side by side, and the core's catalogue for each of the extension's 39 other languages translates “Add a listing”.
  • Layout. At the header's end (the left in a right-to-left language). button.icon has margin-inline-start: auto, so two need a wrapper that takes it. 28 px targets and lucide-static icons, as the gear (the core's assets/icons.txt has plus); button:focus-visible already draws the outline. Keyboard order: capture, from scratch, then the body.
  • While the correction form or the tick list shows in the popup, both are hidden, as the link to the list is today (show() in src/popup.js).
  • Firefox for Android shows the popup full screen (unverified on a device): postulo/postulo-firefox#4.

Decisions for this repository

  • The body's button. (a) The header icon replaces it and #ready goes, freeing the body for #7 (recommended); (b) both stay. Under (a), the hint captureHint stays as a line in the body (recommended) or leaves all 40 catalogues, since the test fails on a key nothing asks for.
  • A page that is not a web page. readCurrentTab() refuses an address that is not http(s) with notWebPage (“Only web pages can be captured.”). Either the popup tests the tab when it opens, disables the button and shows that sentence as text, since a disabled button is not reached by the keyboard (recommended, if the address can be read then; unverified in a real browser); or the button refuses on the press, as today. Pages closed to extensions, such as the add-on stores, refuse on the press either way.
  • What “from scratch” opens.
    1. Postulo's /listings/new/ (recommended). Works today with the captures-only token because no API call is made; the listing goes straight into the listings, not the review queue.
    2. An empty form in the extension, sent as a capture. POST /api/v1/captures cannot take a posting typed by hand: it must read a page (the one sent, or the one at url) and answers 422 otherwise. Making up a page for it to read is not proposed.
    3. POST /api/v1/listings. Needs the write scope, which also reaches applications, notes, reminders and letters, where the core's own model says a browser extension's token holds captures and nothing else.
  • Pre-filling the address. /listings/new/ takes ?url=. “From scratch” reads as no pre-fill (recommended); the alternative passes the current tab's address, for a posting the reader could not read. That sends the address to Postulo on the press, which PRIVACY.md would have to say.
  • Not set up. Nothing to open: hidden until there is a Postulo (recommended; the “Set it up” note is already there), or shown and opening the settings.
  • The testing switch stops what the extension sends, not pages the browser opens: the footer's address and the list's “Review in Postulo” already open with it on. Recommended: so does this button.

Needs from the server

Not filed on postulo/postulo. Route 2 would need POST /api/v1/captures, or another call under the captures scope, to accept a posting typed by hand; route 3, a scope narrower than write that can add a listing. Route 1 works with the server as it is.

Translations and documents

One new key, “Add a listing”, and one more only if the not-set-up case gets words. test/i18n.test.mjs requires every new key in all 40 _locales at once, with identical placeholders, so each new sentence costs 40 translations in the same commit. README.md: step 3 of “Set it up”, if the body's button goes, and the src/popup.* row of the layout table. PRIVACY.md changes only if the address is pre-filled.

Done when

  • The header shows the logo, “Postulo” and two icon buttons at its end, each named in words (aria-label and tooltip), reached by keyboard in that order, with the focus outline.
  • The capture button captures as the body's button did, and on a page that is not a web page behaves as decided.
  • The from-scratch button opens Postulo's “Add a listing” page with no request from the extension, and behaves as decided when Postulo is not set up.
  • npm test passes; README.md describes the popup as it now is.

From the list of extension improvements of 2026-09-30.

The popup's header holds only the logo and the title “Postulo”, in a flex row (`src/popup.html` lines 9–12). Capturing is the primary button “Capture this posting” in the body (`#ready`), with a hint under it. The one icon button is the settings gear in the footer: `button.icon` around an inline lucide-static v1.41.0 SVG, its `aria-label` and `title` filled from `data-i18n-label`. The suggestion is two icon buttons in line with the logo and title, at the top right: capture the current posting, and create a new job listing from scratch. ## What the extension should do - **The capture button**, first. Today's flow, unchanged: `readCurrentTab()` under the `activeTab` grant that opening the popup gives, then the correction form or the tick list (or the review window of #8). Its name reuses the existing key `capture`. - **The from-scratch button**, second. Opens Postulo's own page `/listings/new/` in the review window of #8, or a new tab until that lands. The extension makes no request; the browser must be signed in to Postulo, and is taken to its sign-in page otherwise. Named in the core's words, as the README promises: the core's listings page has “Capture a posting” and “Add a listing” side by side, and the core's catalogue for each of the extension's 39 other languages translates “Add a listing”. - **Layout.** At the header's end (the left in a right-to-left language). `button.icon` has `margin-inline-start: auto`, so two need a wrapper that takes it. 28 px targets and lucide-static icons, as the gear (the core's `assets/icons.txt` has `plus`); `button:focus-visible` already draws the outline. Keyboard order: capture, from scratch, then the body. - While the correction form or the tick list shows in the popup, both are hidden, as the link to the list is today (`show()` in `src/popup.js`). - Firefox for Android shows the popup full screen (unverified on a device): postulo/postulo-firefox#4. ## Decisions for this repository - **The body's button.** (a) The header icon replaces it and `#ready` goes, freeing the body for #7 (recommended); (b) both stay. Under (a), the hint `captureHint` stays as a line in the body (recommended) or leaves all 40 catalogues, since the test fails on a key nothing asks for. - **A page that is not a web page.** `readCurrentTab()` refuses an address that is not http(s) with `notWebPage` (“Only web pages can be captured.”). Either the popup tests the tab when it opens, disables the button and shows that sentence as text, since a disabled button is not reached by the keyboard (recommended, if the address can be read then; unverified in a real browser); or the button refuses on the press, as today. Pages closed to extensions, such as the add-on stores, refuse on the press either way. - **What “from scratch” opens.** 1. Postulo's `/listings/new/` (recommended). Works today with the `captures`-only token because no API call is made; the listing goes straight into the listings, not the review queue. 2. An empty form in the extension, sent as a capture. `POST /api/v1/captures` cannot take a posting typed by hand: it must read a page (the one sent, or the one at `url`) and answers 422 otherwise. Making up a page for it to read is not proposed. 3. `POST /api/v1/listings`. Needs the `write` scope, which also reaches applications, notes, reminders and letters, where the core's own model says a browser extension's token holds `captures` and nothing else. - **Pre-filling the address.** `/listings/new/` takes `?url=`. “From scratch” reads as no pre-fill (recommended); the alternative passes the current tab's address, for a posting the reader could not read. That sends the address to Postulo on the press, which PRIVACY.md would have to say. - **Not set up.** Nothing to open: hidden until there is a Postulo (recommended; the “Set it up” note is already there), or shown and opening the settings. - **The testing switch** stops what the extension sends, not pages the browser opens: the footer's address and the list's “Review in Postulo” already open with it on. Recommended: so does this button. ## Needs from the server Not filed on postulo/postulo. Route 2 would need `POST /api/v1/captures`, or another call under the `captures` scope, to accept a posting typed by hand; route 3, a scope narrower than `write` that can add a listing. Route 1 works with the server as it is. ## Translations and documents One new key, “Add a listing”, and one more only if the not-set-up case gets words. test/i18n.test.mjs requires every new key in all 40 `_locales` at once, with identical placeholders, so each new sentence costs 40 translations in the same commit. README.md: step 3 of “Set it up”, if the body's button goes, and the `src/popup.*` row of the layout table. PRIVACY.md changes only if the address is pre-filled. ## Done when - The header shows the logo, “Postulo” and two icon buttons at its end, each named in words (`aria-label` and tooltip), reached by keyboard in that order, with the focus outline. - The capture button captures as the body's button did, and on a page that is not a web page behaves as decided. - The from-scratch button opens Postulo's “Add a listing” page with no request from the extension, and behaves as decided when Postulo is not set up. - `npm test` passes; README.md describes the popup as it now is. From the list of extension improvements of 2026-09-30.
Sign in to join this conversation.
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-chromium#6
No description provided.