diff --git a/AGENTS.md b/AGENTS.md index ca9374e58..4a07e6b20 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -4745,18 +4745,18 @@ contributions without contacting every contributor individually. - Bare HTML-entity glyphs (`✎` ✎ / `✓` βœ“ / `↺` β†Ί / `📋` πŸ“‹ / `✕` βœ• / etc.) as row-action button labels β†’ use Lucide icons (``) - with an optional visible text label. The bare-entity shape was - what the v2.0 banlist row-actions cell shipped while the sibling + with `data-tooltip` + `aria-label` on icon-only buttons + (`class="btn btn--ghost|secondary btn--icon btn--sm"` inside + `.row-actions.row-actions--icons`). The bare-entity shape was what + the v2.0 banlist row-actions cell shipped while the sibling commslist row used Lucide icons + text labels β€” the inconsistency - read as broken icons / a different app, the icon-only buttons - gave no visual affordance, and screen readers announced the - glyph code rather than the action. The shared button class chain - (`.btn--ghost btn--sm` for Edit/Copy/Remove, `.btn--secondary btn--sm` - for Unban/Re-apply with a danger color override on Remove) is what - page_comms.tpl established as the canonical reference and what - page_bans.tpl now mirrors. Icons should be 13Γ—13 inline-sized - (`style="width:13px;height:13px"`) for visual parity with the - rest of the panel chrome. Pinned by + read as broken icons / a different app, and screen readers + announced the glyph code rather than the action. Density chrome + for banlist / commslist / admin-admins is icon-only + the themed + `data-tooltip` contract from `sb.js` (admins list is the + reference). Icons are 14Γ—14 inline-sized + (`style="width:14px;height:14px"`); Remove puts + `color:var(--danger)` on the icon, not the button. Pinned by `web/tests/integration/PublicBanListRegressionTest::testBanlistRowActionsUseLucideIconsNotEntityGlyphs`. - `onclick="event.stopPropagation()"` on a `[data-copy]` button β†’ the document-level COPY BUTTONS delegate in `theme.js` listens on @@ -4899,9 +4899,9 @@ contributions without contacting every contributor individually. | Add a popup file-upload page (demo / icon / mapimage / new asset type) | `Sbpp\Upload\UploadHandler::handle()` (`web/includes/Upload/UploadHandler.php`). The page handler at `web/pages/admin.upload.php` is a thin wrapper passing the per-page knobs (`permission` mask, `field` `$_FILES` key, `allowed` extensions, `destDir`, `callback` JS function name on `window.opener`, `auditOk` / `auditFmt` / `errorMsg` / `title` / `formName` / `formats` strings, optional `renameToHash` for demo-style randomised filenames). The handler runs CSRF + permission check, sanitises `$_FILES[…]['name']` via `sanitiseName()` (basename + strip backslashes + trim leading dots β€” defends LFI on the icon / mapimage paths where the filename hits disk), `move_uploaded_file()`s to the destination, calls `Log::add(LogType::Message, …)`, and on success emits the `` blob the parent page picks up. The three reference call sites (`admin.uploaddemo.php`, `admin.uploadicon.php`, `admin.uploadmapimg.php`) are 30-line wrappers; new asset types should match that line budget. Anti-pattern: hand-rolling the move / log / popup-emission sequence per page (the pre-v2.0 shape). | | Edit a template | `web/themes/default/*.tpl` | | Reuse the moderation-queue card layout (admin submissions / protests, mobile-stacked summary rows) | `web/themes/default/css/theme.css` (`.queue-row`, `.queue-row__body`, `.queue-row__date` β€” #1207 PUB-2). Apply by adding `class="queue-row …"` to the outer `
` and dropping the inline `flex` / `flex-shrink:0` styles from the summary children. | -| Add visible row actions to a table-rendered admin list (Edit / Unmute / Remove buttons + responsive mobile-card mirror) | `web/themes/default/page_comms.tpl` (#1207 ADM-5) is the canonical reference: `