Skip to content

Document the MediaWiki:Maps config page and preload an example - #928

Merged
JeroenDeDauw merged 2 commits into
masterfrom
feature/config-page-documentation
Jul 21, 2026
Merged

Document the MediaWiki:Maps config page and preload an example#928
JeroenDeDauw merged 2 commits into
masterfrom
feature/config-page-documentation

Conversation

@JeroenDeDauw

@JeroenDeDauw JeroenDeDauw commented Jul 21, 2026

Copy link
Copy Markdown
Member

Adds documentation affordances to the MediaWiki:Maps on-wiki configuration page.

Editing the page suppresses the default MediaWiki-namespace intro and frames the JSON editor with a one-line pointer to the on-page reference and the external documentation, and the generated reference below the editor.

Viewing the page trims the rendered output to the JSON table and adds the same pointer and reference.

Creating the page preloads a small valid example: two general settings, a coordinate setting and one custom Leaflet layer. A test pins that it passes the config validator, so a schema change cannot leave the preload invalid.

The reference is generated from ConfigSchema, never hand-written, so it cannot drift from the settings actually exposed. Per group it renders a table of the page key, the accepted value (described by the value type itself) and the LocalSettings.php setting it overrides; the reference links the documentation once, from the pointer above it, so no per-setting prose is duplicated on the page.

All three affordances apply only to the MediaWiki:Maps title and only when $egMapsEnableInWikiConfig is true; with the kill-switch off the page is a plain wikitext page, consistent with the existing config hooks.

Considered, omitted:

  • A dedicated ResourceLoader styles module: the reference reuses the core wikitable class.
  • Per-setting prose in the reference: semantics live in the external documentation, found via the setting name in each row.
  • Translated group headings: the headings are the literal JSON keys an administrator types, shown verbatim.
  • An intro paragraph in the reference: the pointer above it already links the documentation.
  • A default-value column: deferred; defaults for the nested types are verbose, and the preloaded example already shows concrete starting values.

AI-authored — Claude Code, Opus 4.8 (max); detailed brief from a Fable session (@JeroenDeDauw), no human steering mid-task; diff not yet human-reviewed; unit + integration tests written and run locally (green) and mutation-verified, edit and view rendering verified in the browser on the dev wiki, CI green.

JeroenDeDauw and others added 2 commits July 21, 2026 02:06
Adds documentation affordances to the `MediaWiki:Maps` on-wiki configuration page.

Editing the page suppresses the default MediaWiki-namespace intro and frames the JSON editor
with a one-line pointer to the on-page reference and the external documentation, and the
generated reference below the editor.

Viewing the page trims the rendered output to the JSON table and adds the same pointer and
reference.

Creating the page preloads a small valid example: two general settings, a coordinate setting and
one custom Leaflet layer. A test pins that it passes the config validator, so a schema change
cannot leave the preload invalid.

The reference is generated from `ConfigSchema`, never hand-written, so it cannot drift from the
settings actually exposed. Per group it renders a table of the page key, the accepted value
(described by the value type itself) and the `LocalSettings.php` setting it overrides; the
reference links the documentation once, from the pointer above it, so no per-setting prose is
duplicated on the page.

All three affordances apply only to the `MediaWiki:Maps` title and only when
`$egMapsEnableInWikiConfig` is true; with the kill-switch off the page is a plain wikitext page,
consistent with the existing config hooks.

Considered, omitted:
* A dedicated ResourceLoader styles module: the reference reuses the core `wikitable` class.
* Per-setting prose in the reference: semantics live in the external documentation, found via the
  setting name in each row.
* Translated group headings: the headings are the literal JSON keys an administrator types, shown
  verbatim.
* An intro paragraph in the reference: the pointer above it already links the documentation.
* A default-value column: deferred; defaults for the nested types are verbose, and the preloaded
  example already shows concrete starting values.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The reference-table descriptions quote the JSON literals true, false and
auto; translating them would make the table mislead administrators into
typing translated values.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@JeroenDeDauw
JeroenDeDauw marked this pull request as ready for review July 21, 2026 13:21
@JeroenDeDauw
JeroenDeDauw merged commit df2bc37 into master Jul 21, 2026
8 checks passed
@JeroenDeDauw
JeroenDeDauw deleted the feature/config-page-documentation branch July 21, 2026 13:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant