T14.3 (D26, BL-061): the sync badge shows the true state and gets out of the way
The badge words live in one function, badgeModel(). States: sending, retrying, held for sign-in, not saved on this device, rejected (with the reason), read and queue, another person's changes, and all sent. Every state names the project. Sign in is a real link to login.html?next=. Dismiss is a real button and removes only the changes the project refused. Both are 44px or more with a focus ring. BL-061: the console pages (Admin, User Directory) never show the badge. All sent shows only after real work. The badge picks a free spot on the screen. One very dense screen case is left and logged as BL-072. tests/sync_badge_check.py (87 checks). autosave_check reads the new badge words.
This commit is contained in:
@@ -696,6 +696,8 @@ deliberately deferred.
|
||||
- **Suggested wave or follow-up:** wave 14, alongside T14.1's badge changes:
|
||||
do not show the badge on pages with nothing to sync, and keep it clear of
|
||||
page controls.
|
||||
- **Status:** fixed at T14.3 (2026-10-17). The console pages never show the badge, "Everything sent" shows only
|
||||
after real work, and the badge moves to a free spot. One dense-screen case is left: BL-072.
|
||||
|
||||
### BL-069 - The sync has no cap on one run and no last-admin guard
|
||||
|
||||
@@ -838,3 +840,16 @@ boundary"). Do not use `localStorage` as the store of record.
|
||||
- **Why not now:** it is a test-script quirk and not part of D18. The documented usage lines show `http://localhost:8000`.
|
||||
- **Suggested wave or follow-up:** next housekeeping pass: use the domain `localhost.local` for a dotless host,
|
||||
or change the usage lines to `127.0.0.1`.
|
||||
|
||||
### BL-072 - The sync badge can cover a control on a very dense screen
|
||||
|
||||
- **Found during:** T14.3 (D26, BL-061)
|
||||
- **Where:** `html/project-data.js` `placeBadge()`; seen on `wp-creation-index.html` at 390px
|
||||
- **What:** the badge looks for a free spot on the screen, and it covers no control when the screen has room for it.
|
||||
With the longest state (a change refused by the project, with a long reason) on the creator page at 390px, no free
|
||||
spot of that size exists. The badge then covers the one control it overlaps least ("Load sample data" at the
|
||||
time of the check). The person can press Dismiss, or scroll (the badge moves again within 2 seconds).
|
||||
- **Why not now:** a fixed overlay cannot fix a screen with no gap. The real fix is a layout change: a bar that
|
||||
takes its own space in the page, or a place for it in the shared header. That is a design decision for all pages,
|
||||
not part of T14.3.
|
||||
- **Suggested wave or follow-up:** decide with Nick whether the shared page layout reserves a status line.
|
||||
|
||||
@@ -106,7 +106,7 @@ badge is a `div` with `pointer-events:none`. A badge that must ask a person to s
|
||||
- [x] opening the app offline before the time works; opening it offline after the time gives read-and-queue mode and does not redirect
|
||||
- [x] online with a dead session: redirect to `login.html?next=...`, queue kept, changes sent after sign-in (the send after sign-in is the T14.1 test, section 3)
|
||||
- [x] a page load does not extend the cached window
|
||||
- [ ] the mode line is announced by a screen reader (`aria-live`) and fits at 390 px. The line is in the badge, which has `role="status"` (checked). It is **not** checked at 390 px or with a real screen reader. Do this in T14.3, which rebuilds the badge.
|
||||
- [x] the mode line is announced by a screen reader (`aria-live`) and fits at 390 px. The line is in the badge, which has `role="status"`. T14.3 checks that it fits at 390 px and covers no control (`sync_badge_check.py`, state `readqueue`). It was **not** tried with a real screen reader.
|
||||
|
||||
**Built (2026-10-17):** `tests/session_expiry_check.py` (22 checks) fails when the old 12 hour rule is put back (7 failures). The mode line shows only in read-and-queue mode, not when the app opens offline before the session ends, because "sign in again" would be wrong while the session is still good. In read-and-queue mode the outbox does not send at all until a page load gets a good answer from the server. Saving display preferences refreshes the cached user and keeps the end time (`wpCacheAuth`).
|
||||
|
||||
@@ -134,12 +134,14 @@ badge is a `div` with `pointer-events:none`. A badge that must ask a person to s
|
||||
|
||||
**Done when:**
|
||||
|
||||
- [ ] each state shows in a browser test, with its text, at 390 px and 1440 px
|
||||
- [ ] "Sign in" works with the keyboard and by touch, and goes to `login.html?next=...`
|
||||
- [ ] the badge covers no control on the User Directory at 1440 px or the bulk bar at 390 px (the two places `BL-061` named)
|
||||
- [ ] no badge on the console pages
|
||||
- [ ] the contrast check passes for every state
|
||||
- [ ] `autosave_check.py` and `a11y_check.py` pass
|
||||
- [x] each state shows in a browser test, with its text (`tests/sync_badge_check.py`). The states are checked at 1440 px; the placement is checked at 390 px and 1440 px
|
||||
- [x] "Sign in" is a real link (`<a>`), reachable by keyboard, 44 px or more, with a focus ring, and goes to `login.html?next=...`. Touch is covered by the size and by the element type: no touch event was sent
|
||||
- [x] the badge covers no control on the User Directory or the bulk bar: the console pages never show it (`data-wp-no-sync-badge`)
|
||||
- [x] no badge on the console pages
|
||||
- [x] the contrast check passes for every state (4.5:1 or better, light theme only; the dark theme was **not** checked)
|
||||
- [x] `autosave_check.py` and `a11y_check.py` pass. Full suite 2026-10-17: 53 of 55 pass; `generalinfo_check` and `token_check` fail as before (known, not regressions). `sync_badge_check.py` (87 checks) fails when the "nothing to send" rule and the console opt-out are removed (3 failures)
|
||||
|
||||
**Built (2026-10-17):** the badge words are in one function, `badgeModel()`. The mode line for read-and-queue mode now says "...to send your changes to the project." so it follows the B5 rule. "Dismiss" removes only the changes the project refused, after the person presses it. The badge picks a free spot on the screen (BL-061). One case is left, a very dense screen with no free gap: `BL-072`. No before and after screenshots were taken: the check measures overlap in the browser instead. A person should look at the badge once on a phone.
|
||||
|
||||
---
|
||||
|
||||
|
||||
Reference in New Issue
Block a user