Page MenuHomePhabricator

Add symmetric sysop activate/deactivate CTAs in the provenance banner, routed through CommunityConfiguration
Open, MediumPublic

Description

Add symmetric sysop activate/deactivate CTAs in the provenance banner, routed through CommunityConfiguration.

The banner M1 ships with an extension slot is, in M2, populated with a call-to-action visible only to users who hold the wikilambda-abstract-optin right. The CTA comes in two symmetric flavours:

  • On the M1 cross-wiki special page, when the QID the sysop is previewing is not already opted in, the CTA is an "opt this topic in" shortcut.
  • On an opted-in mainspace render — the surface this milestone ships — the CTA is a "remove this opt-in" shortcut.

Both CTAs do the same thing at a mechanical level: they take the sysop to the CommunityConfiguration edit surface for the WikiLambda opt-in schema with the relevant change pre-staged for approval, and the sysop reviews the staged diff and commits through CommunityConfiguration's own save flow. The CTA is a shortcut into the CommunityConfiguration workflow, not a parallel workflow that runs alongside it: WikiLambda emits no direct writes to the opt-in set, no bespoke validation, no independent audit log. All of those live in CommunityConfiguration and M2 inherits them for free, which is what lets this sub-bullet be as short as it is.

Acceptance criteria:

  • On the M1 special page, when the QID being previewed is not currently in the opt-in set, users with the wikilambda-abstract-optin right see an "opt this topic in" CTA in the banner slot; users without the right do not see the CTA and the CTA markup is not emitted to their responses.
  • On an opted-in mainspace render, users with the wikilambda-abstract-optin right see a "remove this opt-in" CTA in the banner slot; users without the right do not see the CTA and the CTA markup is not emitted to their responses.
  • Clicking either CTA takes the user to the CommunityConfiguration edit surface for the opt-in schema with the relevant change (addition with a default local title, or removal of the matching entry) pre-staged for their review.
  • The sysop reviews and commits the staged change through CommunityConfiguration's normal save flow; there is no WikiLambda code path that writes to the opt-in set directly, verified by code review.
  • The URL-driven staged-edit dependency on CommunityConfiguration is resolved: either CommunityConfiguration already supports it in the version deployed to Test Wikipedia, or an upstream contribution or workaround has been landed and referenced from this task.
  • Permission checks for the CTA are enforced server-side, not via CSS hiding; verified by inspecting the HTML served to an unprivileged reader.