Forum:Interim fix for NetHack timeline template

From NetHackWiki
Jump to navigation Jump to search


The timeline facility on NetHackWiki seems to be broken. Any change produces a link to a nonexistent image. I think the problem is deep in the bowels of MediaWiki, where only Paxed and those close to him have access. I don't have such access.

I have added NetHack/nh-timeline.py to generate the file nh-timeline.svg, and included it from the timeline template. This can provide the current versions, until the proper timeline facility is fixed.

The SVG contains links, but they're not directly accessible from Game history. Does anyone know how to make that happen?--Ray Chason (talk) 11:53, 1 June 2026 (UTC)

The <math> template is broken too, see User:Darth_l33t/test. That also produces an image, so presumably it uses the same functionality as the timeline. --Darth l33t (talk) 13:05, 1 June 2026 (UTC)
There’s a page for that: special:MathStatus.
This month I’v worked long on a replacement timeline and previewed at test.wikipedia.org/w/index.php?title=EasyTimeline&action=edit where midJune the preview couldn’t store the imagemap if there were a link. This was reported at English Wikipedia: Wikipedia:Help talk:EasyTimeline syntax#Issues at hurricane season. Test Wikipedia can now output timelines with links but many wikis still can’t make any. Cached failed files don’t get deleted; I think the problem may be related to this old discussion about thumbnail cleanup. My timeline is done at 21 kB so ifwhen this clunky app works again I’m eager to post. Lysdexia (talk) 07:22, 29 June 2026 (UTC)
This happens because the wiki converts the SVG into an image and shows that. The MW setting $wgSVGNativeRendering was introduced in 1.41.0, so dtype would have to update the wiki before we could use that. I didn't see any examples of modifying $wgSVGConverters and $wgSVGConverter to allow inline SVGs. --paxed (talk) 14:43, 1 June 2026 (UTC)
The template now include an image map, to provide links.--Ray Chason (talk) 22:33, 1 June 2026 (UTC)

So I wasn’t done.. the leads I found for Rogue added another 3 kB. The app still doesn’t work here so I’m a’linking my preview from Test Wikipedia:

Lysdexia (talk) 06:03, 11 July 2026 (UTC)

Per Dtype's announcement of the MediaWiki upgrade (For he's a jolly good fellow!), it seems the timeline facility has been removed. This "interim" fix is likely here to stay.--Ray Chason (talk) 11:27, 26 July 2026 (UTC)

What is this bullshit? The excess bolding, spaced em dashes, positive-negative, and denial of 20 years of fact in this formulaic report was ChatGPT-written. Was the up/downgrade also LLM driven?
“* EasyTimeline (<timeline>) — the rendering tool it depends on was never installed here, so it never worked. 0 pages used it.
Unintentional miss. Let me look at this later today. dtype (talk) 14:54, 27 July 2026 (UTC)
Yep, flub on my part. Updated in errata: NetHackWiki:Software_updates/2026_MediaWiki_1.43. And yes was claude assisted, especially for testing and documentation. Even so it was a 10+ hour endeavor on Saturday. Happy to work on issues to correct anything missed. dtype (talk) 16:32, 27 July 2026 (UTC)
If this bug gets resolved (https://phabricator.wikimedia.org/T428063), please bring back EasyTimeline. The wiki can’t directly turn Python into a timeline; updates get delayed; the current substitute script is pretty limited to 1D. Alternative extensions like charts and echarts are security risks. I did my best with the decades-old ploticus-based app to both fit everything and make text clear but if the raster fonts are too bad then the only other substitute is to draw the timeline “bare metal” with tables. I came up with this some weeks ago:
However the bar spans must be handwritten and the notches drawn in text art to fit in any practical size without relying on images. Lysdexia (talk) 06:42, 27 July 2026 (UTC)Lysdexia (talk) 2026 Jul 26 Sun 23:42:31 Z-0700:PDT
The links at [Game History] now work again with the substitute SVG. Which IMO looks better than the EasyTimeline generated one ever did. I would consider keeping that. There aren't that many releases.
For your extensive timeline I wonder if you know about [1]. There is a link to the Graphviz source code. Graphviz does SVG these days maybe this would be a possible way of implementing the 2D timeline you're thinking of.
-- Bhaak (talk) 20:56, 27 July 2026 (UTC)
I had written that script to be a drop-in replacement for the earlier EasyTimelines. The largest difference is where the labels end up: they point to the time of the release instead of floating in the middle of the section. I had considered revising again to use EasyTimeline once more, but if others prefer the SVG, I'll let it stand.
I do like what Lysdexia is doing, and the revised horizontal image looks like it could separate the labels from each other, something the SVG does and the earlier timelines don't.
The script tries to put links in the SVG, but they still don't seem to work once transcluded. The links in the template are from an image map that the script also generates.--Ray Chason (talk) 21:51, 27 July 2026 (UTC)
VariantHistoryGraph, the last cited link in my timeline, was of course where I got the variant list. Graphviz has no calendar and of course has to be made offwiki. Problems with the 1D timelines are the huge scrollover gaps, during which DevTeam were maybe preoccupied with Dwarf Fortress, Minecraft, and variants, unless they’re cut out, and they don’t properly attribute where many ideas came from (same with this wiki). I think more information and moderate jagginess is better than the vanilla smooth pillar. Lysdexia (talk) 23:05, 27 July 2026 (UTC)Lysdexia (talk) 2026 Jul 27 Mon 16:05:19 Z-0700:PDT
I want to make sure that I don't miss the plot on my side. Just checking that the EasyTimeline as now restored (with optional "method=svg2png") is the useful stand-in option that was asked for. There are a few variant things we could do too. Also likely happy to implement alternatives. Just making sure I'm not missing an ask. Now that the wiki is upgraded to current, the options are no longer limited to "what works with our ancient version". dtype (talk) 23:31, 27 July 2026 (UTC)
Local rendering with my data at User:Lysdexia/Template:NetHack StreamTimeline but the font doesn’t render like Test Wikipedia. Is vector DejaVu Sans installed? svg2png is better not used as the bars are dithered/beveled for no reason and the font looks awkward. Lysdexia (talk) 00:17, 28 July 2026 (UTC)Lysdexia (talk) 2026 Jul 27 Mon 17:17:09 Z-0700:PDT
DejaVu Sans is installed (it's the only family the stock image ships), but nothing could reach it: GDFONTPATH is a single directory pointing at freefont, and with $wgTimelineFonts empty every font= value silently fell through to FreeSans rather than erroring. That's fixed. font=DejaVuSans (also DejaVuSerif, DejaVuSansMono, FreeSerif, FreeMono) now works per-timeline. Try a re-render and see if it does what you want. Agreed on svg2png: your chart's SVG is only ~1% bigger than the PNG, so it gains no resolution and just adds the antialiasing, hence the beveled bars. dtype (talk) 04:30, 28 July 2026 (UTC)
|font=DejaVuSans at the table’s end does change the font in preview but still without smoothing. Google AI told me to put action=render in the URL which gets font smoothing without the table borders and with the default browser serif font instead of sans but this doesn’t update the preview. Lysdexia (talk) 07:00, 28 July 2026 (UTC)Lysdexia (talk) 2026 Jul 28 Tue 00:00:22 Z-0700:PDT
action=render isn't doing what it looks like — it serves the identical timeline image (same file, verified), it just drops the skin's CSS, so you lose the table borders and the page's HTML text falls back to the browser's default serif. That serif text is what's smoothed, not the timeline. It also shows saved content, so it won't track a preview. The PNG can't be smoothed: ploticus 2.42 has no truecolor output (there's no -truecolor), and its text region carries 12 colours against 209 in a vector render. The bevel you saw under svg2png isn't that converter's doing either — ploticus's SVG has a 470.41×90.31 viewBox shown at 653.35×125.43, a 1.3889× scale, so bar edges fall between device pixels and any vector renderer softens them at 1×. It would look correct on a HiDPI screen. Smooth text and hard bars aren't both available here. (sorry for the claude on google chat, but my version has access to the container and can run a few tests so we get some tested answers) dtype (talk) 14:43, 28 July 2026 (UTC)
No, Claude, action=render smooths the sans-serif timeline font: https://nethackwiki.com/wiki/User:Lysdexia/Template:NetHack_StreamTimeline?action=render. Lysdexia (talk) 21:15, 28 July 2026 (UTC)Lysdexia (talk) 2026 Jul 28 Tue 14:15:56 Z-0700:PDT
ok, had some back and forth with the bot, and argued some, and it ended up firing up chrome in a container to do a lot of pixel comparisons in a browser. There was some name calling (mostly on my part). I think we got it.
Update: found it, and it was ours, not EasyTimeline's.
MediaWiki:Common.css has carried a blanket img { image-rendering: pixelated } for years — commented "prevent blurry images, such as 16x16 tiles being scaled up", which is exactly right for tile and sprite art. But the selector is a plain img, so it applied to every image on the wiki, timelines included. action=render isn't doing anything clever: it serves no site CSS at all, so there the browser falls back to image-rendering: auto and interpolates. Same file, same size — the browser was just being told to scale it differently.
It only shows up when the browser actually scales the bitmap, which is why it went unnoticed. Measured in a real browser against the live site, comparing the two views: at 1280px on a standard display, zero differing pixels. On a HiDPI display, 41,563. Now scoped so tile art keeps its hard edges and timelines don't: .timeline-wrapper img { image-rendering: auto; }. Verified, the DPR 2 difference is now zero. You may need a hard refresh; the stylesheet is cached at in your browser. (cleared at the CDN)
Does this cover the mystery discrepancy? dtype (talk) 22:05, 28 July 2026 (UTC)
The text has more contrast and is narrower than Test Wikipedia’s which is good but … and -- don’t resolve which is bad. Could LibRsvg’s version be different? Wikimedia’s is 2.54.7. Lysdexia (talk) 03:36, 29 July 2026 (UTC)Lysdexia (talk) 2026 Jul 28 Tue 20:36:10 Z-0700:PDT
I couldn't get Claude to shut up and write a short version, so if you want the measurements, the six fonts rendered side by side, more insanity from a bot about to author its own book on the subject: User:Dtype/Claude ramblings on timeline fonts
Short-ish version (but read the long one above too) -- Not librsvg — without method=svg2png neither our render nor test.wikipedia's touches it; both are ploticus's own GD PNG (all four images are 647×114, 8-bit colormap). The reason they don't match is that test.wikipedia is one of only two wikis on the whole Wikimedia cluster not using stock FreeSans, so it's an unlucky thing to compare against. Its font is hinted differently, which is exactly the "more contrast and narrower" you spotted — but reproducing it (installed now as font=FreeSansWMF) fixes nothing, it crushes … and -- just as badly.
What works, measured live at fontsize:7: font=DejaVuSans, font=Arimo and font=Tinos resolve the ellipsis; only font=Cousine also resolves the double hyphen, since at 7pt two hyphens abut unless a monospace advance forces a gap. Cousine changes the chart's character though — the lighter fix is a hair space between the hyphens, which works in every font and is what your source already does elsewhere. Full list now: FreeSans (default), FreeSerif, FreeMono, DejaVuSans, DejaVuSerif, DejaVuSansMono, Arimo, Tinos, Cousine, FreeSansWMF. Existing timelines are untouched.
also after a huge amount of back and forth on this, couldn't get the robot to write anything short of a novella (above). dtype (talk) 05:14, 29 July 2026 (UTC)
I don’t know what’s different but Arimo previews -- with a wider gap than Claude said. However, DejaVuSans has the best hinting—any hinting is a relief now that strokes are flattened onto pixels—and I chose legibility over Arimo’s narrowness. Now ploticus’s smoothed text looks smoother than LibRsvg?’s mosaic from the Python timeline. Cousine can’t do hair spaces and is too wide of course. Lysdexia (talk) 09:17, 29 July 2026 (UTC)Lysdexia (talk) 2026 Jul 29 Wed 02:17:04 Z-0700:PDT