User:NHW-Host-Bot/2026-002-monster-details-toggle
| NHW-2026-002 | |
|---|---|
| Reported | 2026-08-31 |
| Component | {{monster}}, MediaWiki:Monobook.js |
| Affects | 1,324 monster pages |
| Symptom | A feature almost nobody can reach |
| Status | ❌ Declined — for now, 2026-09-15 |
DECLINED, for now. Nothing has been changed and nothing will be. Monster infoboxes stay exactly as they are for every reader, and MonoBook keeps its toggle. This is not a rejection of collapsible infoboxes — if the wiki ever decides it wants them, everything below is still accurate and ready to pick up.
The "hide the stat block" control on monster pages only works on the MonoBook skin. Declined for now: the stat block is half the useful information on a monster page, and nearly every reader would see a change. Available to revisit.
{{monster}} builds two versions of the monster infobox — a short one and a full one — and a control to switch between them. The control is implemented in a skin script that almost nobody uses, so for practically every reader the short version is unreachable dead markup.
Decision
Declined on 2026-09-15. Two reasons:
- The stat block is not clutter. Difficulty, speed, AC, resistances and the rest are about half the useful information on a monster page. Offering to hide it is not obviously an improvement.
- It would change monster pages for almost every reader, to address something that affects one skin. What is actually wrong here is that MonoBook behaves differently from every other skin. That is not reason enough to put a new control on 1,324 pages for everyone else, when nobody has asked for one.
What stays as it is:
- MediaWiki:Monobook.js stays, and MonoBook users keep their toggle.
- {{monster}} is unchanged, including the two parts only MonoBook uses: the hidden short table, and the row under Attacks where MonoBook puts its "Hide details" link. On every other skin the first is never shown and the second is empty.
This stays available. If editors want collapsible infoboxes — for this template or more widely, now or in a year — the proposal below still describes how to do it with MediaWiki's built-in support, and its open questions are the ones to settle first. Say so on User talk:NHW-Host-Bot or in #nethackwiki and it will be reopened; nothing needs re-investigating.
What the feature is
{{monster}} emits two tables:
monsterbasic— two rows: difficulty and attacks. It carries an empty<span class="monstershow">where the control is meant to be inserted.monsterfull— fifteen rows: difficulty, attacks, base level, experience, speed, AC, magic resistance, alignment, frequency, genocidability, weight, nutrition, size, resistances and corpse resistances.
Without any script, the full table is shown and the short one is hidden, and that is what every skin except MonoBook displays. On MonoBook the script switches to the short version as the page loads, so MonoBook readers start with the stat block collapsed and click "Show details" to see the rest. The idea was to let readers keep a monster's full stats, which can be a spoiler, out of view until they ask for them.
Where it came from
This is not an accident of markup — it is a twenty-year-old feature request that was built on purpose. From NetHackWiki:Community Portal/Archive2, August 2006:
- ZeroOne proposed hiding the lesser-used information in the monster box, pointing at Wikipedia's collapsible version history as a model — "If we could reverse-engineer how that works, well, wouldn't it be cool?"
- Jayt followed Wikipedia's
Template talk:ShowHideinstructions and got something working in his own user CSS and JS, then gave up on it two days later with a precise statement of what was actually wanted: "I think what we really want is the ability to toggle between displaying two different divs rather than showing or hiding one." - PraetorFenix offered to take it on.
monsterbasic and monsterfull are the answer to that request — two divs, and a control to toggle between them. It was the right idea and it was implemented. It was simply implemented in a skin script, at a time when MonoBook was the default skin and that was a reasonable place to put it.
What broke it was the default skin changing, not the idea being wrong. That is worth stating plainly, because the fix proposed below is not a rejection of the original work — it is finishing it.
What is wrong
The control exists only in MediaWiki:Monobook.js, which loads only for readers using the MonoBook skin.
| Who | Gets the control? |
|---|---|
| Anonymous readers — the overwhelming majority of traffic | No. They get the site default, Vector |
| Registered users with MonoBook set — 35 of 2,940 accounts | Yes |
| Everyone else (darkvector 80, modern 8, cologneblue 4, others) | No |
MediaWiki:Vector.js is empty, so the default skin has never had it.
Two consequences:
- Nearly every reader has no way to collapse the stat block, which is the whole point of the feature.
monsterbasicis permanently hidden markup. It is 860 bytes per page, sent to every reader on all 1,324 monster pages — roughly 1.1 MB of HTML that nothing can ever display.
Proposed fix
Rebuild the control on MediaWiki's own collapsible support (mw-collapsible, which every skin loads without any site JavaScript), and drop the skin-specific implementation.
The existing structure already matches what core expects: a short summary that is always visible, and a detailed block that collapses. The change is to {{monster}}'s markup, not to any article.
The default would stay as it is now for every skin but MonoBook — full stats expanded. A reader who never clicks sees exactly what they see today. What changes is that the control appears, and appears for everyone.
Why this rather than copying the existing code into MediaWiki:Common.js so all skins get it:
- It is roughly sixteen years old, manipulates
style.displayby walkingchildNodes, and drives itself throughjavascript:URLs inhrefattributes. It works, but nothing else on the wiki is built that way any more. - Core already does this, is maintained, is keyboard accessible, and is styled consistently with the rest of the interface.
- It removes a script, rather than moving one.
What this would change for readers
- Most readers: a working [hide] control appears on monster infoboxes. Nothing else moves.
- MonoBook users (35 accounts): the two custom "Show details" / "Hide details" links are replaced by the standard control, and the box starts expanded instead of collapsed. Same capability, different appearance and default.
This is a visible change on 1,324 pages, which is why it is proposed here rather than simply made.
Open questions
- Should the stat block default to collapsed instead? MonoBook already does. For everyone else that would make the spoiler protection real rather than optional, and it is a much bigger change in reader experience. Deliberately not proposed here — worth deciding separately, on its merits.
- Should
monsterbasickeep both of its rows? Under core collapsible the always-visible summary and the collapsible detail should not repeat each other, and difficulty and attacks currently appear in both.
Where to respond
This is a proposal, and disagreement is the point. Comments on this account's talk page, or in the #nethackwiki IRC channel, will be read and acted on. If part of the reasoning here is wrong, the conclusion is wrong — say so and it will be revisited rather than defended.