Template talk:Article length bar

Horizontal version
Param mode is being added to be able to flip from default vertical mode, to horizontal, but is only half-coded, therefore undocumented as not a usable feature yet. Mathglot (talk) 10:31, 19 February 2024 (UTC)

Logarithmic progress bar?
In theory, there is no top end for article size, and there are fifty pages over 500kb, 245 over 400kb, and 1,247 over 300kb. I've set the default max len to 240kb, but to prevent the progress bar from blowing up line-height in vertical mode when this occurs, maybe we want to represent progress logarithmically, so it approaches a limit, topping out at around 700kb, the size of our #1 article. Mathglot (talk) 10:43, 19 February 2024 (UTC)
 * Came up with a better way, imho; see "Arbitrariness..." section below. Mathglot (talk) 00:42, 9 March 2024 (UTC)

Vertical mode goes top down
The vertical mode bar currently goes downward from the current baseline, instead of upward from it, as one might want if generating a bar chart with several of these all lined up, and rising from a y=0 baseline. I think it's because of the top-down gradient, not sure how easy/hard it might be to flip that. Stating it another way: under the current implementation, it would be very easy under the current design to create an upside down bar chart, with all the bars heading downwards from the top edge, with y=0 at the top, and y=100 at the bottom. But clearly, that's not what we want. Mathglot (talk) 23:17, 8 March 2024 (UTC)

Arbitrariness of what length should fill the bar 100% (TMAX)
The design seeks to adequately represent the relative size of different articles by how much of the length bar it fills up, i.e, how far to the right gets shaded. (This is enhanced by different shades, but we can leave that out for the sake of this topic.) That leaves an interesting question about what does "completely filled" (i.e., 100% shaded) mean, and how do we determine that? The "100% filled" point is determined by the config variable TMAX, i.e., bytes. Why was this chosen? There are articles much larger than this: see ‎2023 deaths in the United States at 672kb, and Special:LongPages. But if we chose TMAX = size of the largest article, that would show even articles way over "definitely split" guideline size reaching only 50% or less of the length bar, which would tell the wrong story about the data. On the other hand, anything less than about 700kb for TMAX, would mean that some articles would be more than 100% of the allotted size of the bar, and there has to be a fixed size for it to fit the space available.

TMAX was set to 325kb as a compromise: articles less than that size would fill less than 100% of the bar, and articles greater than 325kb up to the longest page size of around 700kb would all show 100% as well. This seems like a fair compromise, as there is no doubt that all of those articles should be split, so whether they are 325kb, 500kb, or 3 million kb doesn't really matter too much; we *know* they should be split. At the same time, that level of TMAX at 325kb is not *so* unusual that articles of that size don't persist for quite some time, and so to demonstrate the relative length of articles exceeding the guideline, it's helpful to have some indication that some even longer articles exist. As to the exact level chosen, I think I meant to pick roughly the size of the 1000th longest article, but now that's down to 316kb, so maybe it's changed. Anyway, the idea is that it's a compromise, it doesn't cut off too many articles sizes (less than 1,000) and all the rest show some difference in percent full by how much they fill the rectangle.

That said, there is actually a way to get a very rough feel for articles longer than TMAX: an article that is just under TMAX bytes will be red up to the right border (like Jerusalem: ), but for an article that is longer than TMAX, the red turns darker towards the right border, showing that it is longer than TMAX, for example, for 2022 in science: That's not much of an indicator, but it's something; and finally, the characters inside the rectangle give a digital value as well.) Mathglot (talk) 00:05, 9 March 2024 (UTC)