Documents: no page links to Letters, Files or Sent documents, and the Files list has no filter by kind #667

Closed
opened 2026-10-03 01:58:45 +00:00 by tiagoagueda · 0 comments
Owner

From the list of 2026-10-02, under Documents: "Other documents other than CV are not listed, when they should, like cover letter, motivation letters, etc." They are listed, on three pages of their own, but the Documents item in the main navigation goes to the CV list and nothing on that page, or in the header, points to the other three. A person who never writes a letter before looking for one has no way to find them except the search box or the wiki.

What exists today

  • The item lands on CVs. NavItem("documents", …, "documents:cv_list", (…)) (src/postulo/core/navigation.py:84-96). Its second list, match, only decides when the item is lit: cv_detail, letter_list, letter_detail, upload_list and resume:overview (:88-95). nav_active compares the current view name with that list and draws nothing else (core/templatetags/postulo.py:456-463).
  • Nothing links to the other lists. Searching every template and every reverse for documents:letter_list, documents:upload_list and documents:rendered_list finds: the list pages' own Cancel buttons (templates/documents/letter_form.html:29, upload_form.html:37), a filter link on the letters page itself (letter_list.html:22), the Sent documents button on the comparison page (rendered_compare.html:153), the redirects after a save or a delete (documents/views.py:511, :609, :620, :626, :699), and the search page: a hit in text you sent links to the Sent list (core/search.py:444) and each group's "more" link goes to its list (:538-541, templates/core/search.html:61). The + menu's Documents group links to the three create pages only (templates/base.html:164-175). templates/documents/cv_list.html has a button for your career and one for a new CV (:21-23) and nothing else. The application's documents page is reached from the application (templates/applications/application_detail.html:186) and links nowhere in the section.
  • The wiki says otherwise. Cover letters opens "Documents → Letters" (Cover-letters.md:18), Files and what you sent "Documents → Files" and "Documents → Sent documents" (Files-and-what-you-sent.md:7, :28), and Getting started lists letters and uploaded files under "Documents" (Getting-started.md:167). The routes exist (documents/urls.py:28, :37, :48) and the wiki describes a menu the interface does not have.
  • The item is not lit on every page of its section. documents:rendered_list and rendered_compare, and the create and update pages for CVs, letters and files, are not in match, so on them no navigation item is lit.
  • The Files page promises a filter it does not have. The upload form says the kind is "so the lists can be narrowed by it" (documents/forms.py:473). The letters page has a kind filter (documents/views.py:440-457, letter_list.html:20-31); UploadListView reads no kind (documents/views.py:596-602) and upload_list.html has none.

Checked against main at f09b6010b.

Proposal

  1. A section menu on the four lists. One component, <c-documents-nav current="…" /> in templates/cotton/, a <nav aria-label="Documents"> of four links in the order the wiki gives them: CVs and portfolios, Letters, Files, Sent documents, the current one marked aria-current="page". It uses the same pill buttons as the letters page's kind filter (btn, data-variant, data-size="sm") and works with scripts off. It sits at the top of cv_list.html, letter_list.html, upload_list.html and rendered_list.html, above the page title's actions, and wraps on a phone.
  2. Light the item on the whole section. Add to match every view of the section that is a page: rendered_list, rendered_compare, cv_create, cv_update, cv_text, letter_create, letter_update, upload_create, upload_update. The item still goes to the CV list. Keep resume:overview until #676 moves "Your career" out of this item, and make that issue's change to the same lines.
  3. The filter the form promises. ?kind= on the Files list, built from kinds.choices() (the registry, so a kind a plugin brings is offered), shown as the letters page shows its own, with "All" first and a kind with no files hidden or marked empty. An unknown kind is ignored, as the letters list does.
  4. Wiki. The three paragraphs above now describe the interface; add the section menu to Getting started.

Decisions

  • Where the menu lives. Options: a section menu on the four pages (above); a menu on the Documents item itself; four items in the main navigation. Recommended: the section menu. The main navigation is arranged and hidden per person (hidden_nav_items, nav_order, #299), and every item added there is another switch and another place on a phone's bar; a dropdown on one item needs a script or a second click on a touch screen.
  • Sent documents and applications. Sent documents is a history, not a place to put things. Recommended: keep it in the menu: it is the only list of what left, and the wiki already names it there.
  • A Documents landing page. An overview of the four with counts would be nicer and is more work. Recommended: not in this issue.

Builds on

#28 (letters), #133 (kinds), both closed. Overlaps the lines #676 changes in core/navigation.py.

Needed by

#666, #669 and #670 all add things to the Files list and are found through this menu.

Done when

  • A new test in tests/test_documents.py: each of the four list pages contains a link to each of the other three and marks its own with aria-current="page", and the page of a letter or a file still has the Documents item lit. It fails today on the links.
  • tests/test_navigation.py: the Documents item is lit on every view named in part 2.
  • tests/test_documents.py: ?kind=certificate on the Files list shows only certificates and an unknown kind shows all.
  • tests/test_width.py (the four lists are already at :43-46) and the browser suite's axe visit of /documents/cvs/, /documents/letters/, /documents/files/ and /documents/sent/ (tests/e2e/test_accessibility.py:480-485) pass in both themes, with the menu wrapping at 320 px.
  • tests/test_template_lint.py passes (logical utilities only); strings in the working catalogues (en-GB, fr-FR, pt-PT as drafts) and Weblate (#349). No new route, so tests/test_page_coverage.py and the isolation sweep need no entry. No record type changes.

From the list of improvements of 2026-10-02.

From the list of 2026-10-02, under Documents: "Other documents other than CV are not listed, when they should, like cover letter, motivation letters, etc." They are listed, on three pages of their own, but the *Documents* item in the main navigation goes to the CV list and nothing on that page, or in the header, points to the other three. A person who never writes a letter before looking for one has no way to find them except the search box or the wiki. ## What exists today - **The item lands on CVs.** `NavItem("documents", …, "documents:cv_list", (…))` (`src/postulo/core/navigation.py:84-96`). Its second list, `match`, only decides when the item is *lit*: `cv_detail`, `letter_list`, `letter_detail`, `upload_list` and `resume:overview` (`:88-95`). `nav_active` compares the current view name with that list and draws nothing else (`core/templatetags/postulo.py:456-463`). - **Nothing links to the other lists.** Searching every template and every `reverse` for `documents:letter_list`, `documents:upload_list` and `documents:rendered_list` finds: the list pages' own *Cancel* buttons (`templates/documents/letter_form.html:29`, `upload_form.html:37`), a filter link on the letters page itself (`letter_list.html:22`), the *Sent documents* button on the comparison page (`rendered_compare.html:153`), the redirects after a save or a delete (`documents/views.py:511`, `:609`, `:620`, `:626`, `:699`), and the search page: a hit in text you sent links to the Sent list (`core/search.py:444`) and each group's "more" link goes to its list (`:538-541`, `templates/core/search.html:61`). The *+* menu's *Documents* group links to the three *create* pages only (`templates/base.html:164-175`). `templates/documents/cv_list.html` has a button for your career and one for a new CV (`:21-23`) and nothing else. The application's documents page is reached from the application (`templates/applications/application_detail.html:186`) and links nowhere in the section. - **The wiki says otherwise.** *Cover letters* opens "**Documents → Letters**" (`Cover-letters.md:18`), *Files and what you sent* "**Documents → Files**" and "**Documents → Sent documents**" (`Files-and-what-you-sent.md:7`, `:28`), and *Getting started* lists letters and uploaded files under "Documents" (`Getting-started.md:167`). The routes exist (`documents/urls.py:28`, `:37`, `:48`) and the wiki describes a menu the interface does not have. - **The item is not lit on every page of its section.** `documents:rendered_list` and `rendered_compare`, and the create and update pages for CVs, letters and files, are not in `match`, so on them no navigation item is lit. - **The Files page promises a filter it does not have.** The upload form says the kind is "so the lists can be narrowed by it" (`documents/forms.py:473`). The letters page has a kind filter (`documents/views.py:440-457`, `letter_list.html:20-31`); `UploadListView` reads no `kind` (`documents/views.py:596-602`) and `upload_list.html` has none. Checked against `main` at `f09b6010b`. ## Proposal 1. **A section menu on the four lists.** One component, `<c-documents-nav current="…" />` in `templates/cotton/`, a `<nav aria-label="Documents">` of four links in the order the wiki gives them: *CVs and portfolios*, *Letters*, *Files*, *Sent documents*, the current one marked `aria-current="page"`. It uses the same pill buttons as the letters page's kind filter (`btn`, `data-variant`, `data-size="sm"`) and works with scripts off. It sits at the top of `cv_list.html`, `letter_list.html`, `upload_list.html` and `rendered_list.html`, above the page title's actions, and wraps on a phone. 2. **Light the item on the whole section.** Add to `match` every view of the section that is a page: `rendered_list`, `rendered_compare`, `cv_create`, `cv_update`, `cv_text`, `letter_create`, `letter_update`, `upload_create`, `upload_update`. The item still goes to the CV list. Keep `resume:overview` until #676 moves "Your career" out of this item, and make that issue's change to the same lines. 3. **The filter the form promises.** `?kind=` on the Files list, built from `kinds.choices()` (the registry, so a kind a plugin brings is offered), shown as the letters page shows its own, with "All" first and a kind with no files hidden or marked empty. An unknown `kind` is ignored, as the letters list does. 4. **Wiki.** The three paragraphs above now describe the interface; add the section menu to *Getting started*. ## Decisions - **Where the menu lives.** Options: a section menu on the four pages (above); a menu on the *Documents* item itself; four items in the main navigation. **Recommended:** the section menu. The main navigation is arranged and hidden per person (`hidden_nav_items`, `nav_order`, #299), and every item added there is another switch and another place on a phone's bar; a dropdown on one item needs a script or a second click on a touch screen. - **Sent documents and applications.** *Sent documents* is a history, not a place to put things. **Recommended:** keep it in the menu: it is the only list of what left, and the wiki already names it there. - **A Documents landing page.** An overview of the four with counts would be nicer and is more work. **Recommended:** not in this issue. ## Builds on #28 (letters), #133 (kinds), both closed. Overlaps the lines #676 changes in `core/navigation.py`. ## Needed by #666, #669 and #670 all add things to the Files list and are found through this menu. ## Done when - A new test in `tests/test_documents.py`: each of the four list pages contains a link to each of the other three and marks its own with `aria-current="page"`, and the page of a letter or a file still has the *Documents* item lit. It fails today on the links. - `tests/test_navigation.py`: the *Documents* item is lit on every view named in part 2. - `tests/test_documents.py`: `?kind=certificate` on the Files list shows only certificates and an unknown kind shows all. - `tests/test_width.py` (the four lists are already at `:43-46`) and the browser suite's axe visit of `/documents/cvs/`, `/documents/letters/`, `/documents/files/` and `/documents/sent/` (`tests/e2e/test_accessibility.py:480-485`) pass in both themes, with the menu wrapping at 320 px. - `tests/test_template_lint.py` passes (logical utilities only); strings in the working catalogues (en-GB, fr-FR, pt-PT as drafts) and Weblate (#349). No new route, so `tests/test_page_coverage.py` and the isolation sweep need no entry. No record type changes. From the list of improvements of 2026-10-02.
tiagoagueda added this to the 0.5.0 milestone 2026-10-03 01:58:45 +00:00
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#667
No description provided.