Skip to content

Knowledge and Tasks Follow ups PR Review

Ed Mozley edited this page Dec 1, 2026 · 3 revisions

Knowledge and Tasks follow-ups - PR review (#494, #498, #499, #500)

Four pull requests from @Dr4inder, all opened the day 5.15.0 shipped. Three were merged the same evening; the fourth was closed in favour of fixing its cause. All of it will be in the next release.

PR What it does Verdict
#498 Tasks sidebar toggles fit the sidebar in every language Merged as sent
#500 German: the 77 Tasks strings added since 5.13.0 Merged as sent
#494 Knowledge: focus after a dialog, one Esc handler, the Delete label Merged with one fix
#499 Forms settings: the approval questions are headings, not click targets Closed - the cause fixed one level up

#498 - the Tasks sidebar toggles

The symptom. In German the sidebar's card-order toggle read "Manuell | FΓ€lligkeitsdatu…" and the subtasks toggle lost "Keine" - cut off at the edge of the 220px panel. Twenty-two language and toggle pairs overflowed.

The cause. assets/css/tasks.css styled .view-toggle / .view-btn twice: once for the sidebar near the top, and again, unscoped and later, for the calendar's Month / Week / Day toggle in May 2026. The later rule won everywhere, so the sidebar's toggles took the calendar's 13px type and 8px 16px padding.

The fix. The calendar rule is scoped to .cal-toolbar with exactly its old declarations, so the calendar looks the same. In the sidebar a label that still does not fit moves to the next row:

.tasks-sidebar .view-toggle { flex-wrap: wrap; }
.tasks-sidebar .view-btn { flex: 1 1 auto; }

The one visible change is that the sidebar toggles are separate rounded buttons again, as their own rule always described. tests/tasks-sidebar-toggles-fit.php lays the four toggles out with each language's labels at 220px and 180px and fails if any overflows.

#500 - German Tasks strings

The archive, history, follow-ups and Hide done strings, and their help, translated through the repository's own pipeline (i18n_chunk.php, i18n_verify_chunk.php, i18n_merge.php). No existing value changed. "Analyst" was left alone on purpose: #496 proposes a German term for it, which is better changed in one go.

#494 - Knowledge dialogs

Three of the four follow-ups listed under "Left as it is" in Knowledge batch - PR review, one commit each.

  1. The focus goes back to what opened a dialog. A MutationObserver on every Knowledge .modal records the focused element when the dialog opens and focuses it again when it closes - only if the focus was inside the dialog or nowhere, and only if the opener is still on the page. A dialog opened from another returns into that one.

    const opener = kbDialogOpeners.get(modal);
    kbDialogOpeners.delete(modal);
    if (opener && opener.isConnected && (!focused || focused === document.body || modal.contains(focused))) opener.focus();
  2. One Esc handler. The name prompt's own Esc branch could never run - the page-wide capture handler from #485 takes Esc first and clicks Cancel - so it went.

  3. Delete, not Archive. The action sends the article to the Recycle Bin; the right-click menu and the confirmation already said Delete.

The fix on merge. 5.15.0 (GH #479) had moved that button into the β‹― menu, so the PR's change to the old button no longer applied. The label change moved onto the menu's last item (knowledge.confirm.delete_ok, already translated everywhere), and the help tip that named it says Delete too. knowledge.js went to v89.

Not taken, and the PR said why: counting deleted folders in analyst_lifecycle.php. A fixed is_deleted = 0 there would fail on an install that has not yet run Database Verification, and the hint would vanish - worse than the harmless overcount.

tests/knowledge-dialogs-focus.php checks the focus return, nested dialogs, a close that moved the focus on purpose, an opener that has gone, and Esc - 4 of its 6 checks fail on the old code.

#499 - Forms settings questions

The symptom, rightly spotted. In Forms β†’ Settings β†’ Approvals, "When may a cost centre's deputy decide?" and "Email approvers from" looked like fields: full-width bordered boxes with a coloured border on hover. Clicking one opened the dropdown below it.

Why the PR was not merged. It removed for= from the two labels so a click did nothing. That treats the click, not the look: the questions would still be boxes that look clickable, and the page would behave unlike every other settings page, where clicking a question focuses its field.

The cause. The section (GH #160 Part C2) reuses the .coll-effect wrapper from Collections, whose rule turns every label inside it into a bordered option card. It was written for the radio cards that sit directly in the wrapper. The same rule had also boxed "Approvals needed" in the default-chain section.

The fix (one rule): the card style is for the cards only.

.coll-effect > label { display: flex; gap: 10px; padding: 10px 12px; border: 1px solid var(--border); ... }

The questions fall back to .form-group label - a plain heading above the field, as on every other settings page - and keep their for=, so clicking a question still focuses its field and a screen reader still reads the question as the field's name. Checked in light and dark, with the Collections cards unchanged.

FreeITSM

Getting Started

Modules

Multi-tenancy (planned)

Responses to feedback

Blue sky thinking

Bugs resolved

Pull requests

Links

Clone this wiki locally