feat: one-time CC0 acknowledgment modal for user-store metadata
Summary
- New modal shown on first paint after login, asking the user to acknowledge that the workbench's drafts and preferences are saved to two public Commons user-subpages (
User:<self>/UploadWorkbench/Preferences.jsonandMetadata.json) and that this content is dedicated CC0 by intent of the maintainer. - Two action buttons: "I agree — remind me next session" records the ack but reprompts on next session; "I agree — don't remind me again" records it permanently. Esc / backdrop-click dismisses without recording — modal will reappear on the next session.
- Persisted as a single new key on
Preferences.json:cc0Acknowledgment: { acknowledgedAt: <ISO>, suppressFurther: <bool>, version: 1 }. Theversionfield allows a future copy/scope change to re-prompt previously-suppressed users by bumpingCC0_ACK_VERSION. DEMO_MODE skips the modal.
Phabricator
- T426455 — Show one-time CC0 acknowledgment modal for user-store metadata
Test plan
-
Fresh login (or any user with no
cc0Acknowledgmentin theirPreferences.json) → modal appears on first paint after the workbench loads. - Click "I agree — remind me next session" → modal closes; reload the page → modal reappears.
- Click "I agree — don't remind me again" → modal closes; reload the page → modal does not reappear.
- Press Esc or click the backdrop → modal closes without recording; reload the page → modal reappears.
-
Click the "View your workbench pages on Commons" link → opens
https://commons.wikimedia.org/wiki/User:<you>/UploadWorkbenchin a new tab. -
After choosing either button, inspect
User:<you>/UploadWorkbench/Preferences.json(or wait ~3s + check the page-history once the debounced save fires) — it now contains acc0Acknowledgmentfield with the appropriatesuppressFurthervalue. -
DEMO_MODE local build (no
VITE_OAUTH_CLIENT_ID) → modal does not appear. - Modal does not block any other modal — InfoModal still opens, publish flow still works, etc.