Document the MediaWiki:Maps config page and preload an example - #928
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds documentation affordances to the
MediaWiki:Mapson-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 theLocalSettings.phpsetting 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:Mapstitle and only when$egMapsEnableInWikiConfigis true; with the kill-switch off the page is a plain wikitext page, consistent with the existing config hooks.Considered, omitted:
wikitableclass.