Template talk:Multiref2

(Redirected from Template talk:Multiref2/sandbox)
Latest comment: 10 months ago by Grorp in topic Multiref2 indentation gone wrong

Visual glitch in Saturn in fiction edit

I'm noticing a visual bug, likely caused by this template, in the reference section for Saturn in fiction. There is an unusual amount of whitespace below the David Darling source, which is particularly ugly at some pagewidths. Any idea what causes this? ~Maplestrip/Mable (chat) 11:08, 10 February 2023 (UTC)Reply

@Maplestrip: The template always printed ten lines, no matter whether they had any content. I've tried to fix this by copying over the sandbox version, let me know if you see any problems. —Kusma (talk) 17:07, 10 February 2023 (UTC)Reply
Nice work, thank you :) ~Maplestrip/Mable (chat) 19:07, 10 February 2023 (UTC)Reply

Multiref2 indentation gone wrong edit

@Rjjiii: I think you might have broken Multiref2 and Multiref, or someone did behind the scenes. You're the last one to make a change to this template and I have no clue how to dig deeper on this, nor decipher the diff of your recent change.

I use multiref2 quite frequently to pair up closely related sources that shouldn't be split from each other, or to 'list a series' of sources with separate URLs, so I'm used to seeing the results in the References section. However, as of today, I've noticed quite a difference. I added a multiref to the Reed Slatkin article (see citation #4) and I noticed a lot of indentation.

Here is a screenshot showing how it looks right now. You'll notice citation #4 is heavily indented, whereas cite#5 is not, even though both are used multiple times. The two styles used to indent similarly. Prior to this large indentation, multiref and multiref2 showed similar indentation to any "cite web" citation, with multiref2 giving just a little more vertical whitespace between entries (over multiref style).

Do you know what happened? Can you fix it, please? Grorp (talk) 01:42, 12 July 2023 (UTC)Reply

That seems to fix it. Grorp (talk) 01:48, 12 July 2023 (UTC)Reply
Ugh. That fixed multiref2, but not multiref. For multiref2 example, see Reed Slatkin citation #4. For multiref example, see Raw Story citations #8, 9, & 10 (and another 11 more uses of multiref). Grorp (talk) 01:54, 12 July 2023 (UTC)Reply
@Grorp: That's how the CSS on ULC is meant to render. It'll indent out until it goes past a certain point and drops to the next row. Rjjiii (talk) 02:16, 12 July 2023 (UTC)Reply
@Grorp: I've undone that last change. It feeds Multiref2 to {{unbulleted list citebundle}}. Template:multiref and template:unbulleted list citebundle were both written to indent the bundled citations to the same degree. The documentation for multiref2 previously noted this as {{multiref}} – also allows a list of references but additionally indents the later references in line with the first one."
Do you mind if I ping you later to test an update to multiref2? In the reverted state it can produce nonsense for a screenreader, and is actually less accessible than just inserting HTML line breaks (<br>) between the references, Rjjiii (talk) 01:55, 12 July 2023 (UTC)Reply
@Rjjiii: Sure ping me whenever. I don't really understand the nuances; I would surely expect multiref and multiref2 to be similar except for the extra vertical whitespace. I put samples of all 4 styles here → User:Grorp/sandbox3. Grorp (talk) 02:22, 12 July 2023 (UTC)Reply
The documentation here Template:Multiref2 is a little more helpful about differences. Grorp (talk) 02:24, 12 July 2023 (UTC)Reply
Thanks. Multiref 1 and 2 were written by different editors and work entirely different. Multiref 1 made (and still makes) an un-bulleted list. Multiref 2 adds line breaks between citations. Rjjiii (talk) 02:26, 12 July 2023 (UTC)Reply
@Grorp: I pulled up some archived versions of the pages, to see how multiref one was handling it. It is different, but it appears broken to me. Right now, multiref is indenting the whole list. In these archived versions, multiref just places the first citation and then indents the list. This hack doesn't show up for short references because they're on one line, but it does show up for full citations like in Raw Story. I've linked the mobile version also. On mobile, the jagged indent is even more noticeable, especially on a narrow phone screen. Using a single semantic list also has the benefit of being spoken as a list for blind readers. Depending on your browser, you should see two or three different depths of indendation for the old multiref setup:
Going back to that setup would feel like breaking the template. If you are personally a fan of that formatting, you can manually achieve this with {{unbulleted list}}.
I've done a sandbox version of multiref2. The whole thing is now semantically in a list, with no indentation, and the white space is (experimentally) adjustable. This should give the same formatting exactly as before and it should render more consistently, especially on screen readers.
I've added some examples to the sandbox that you created above. I hope you don't mind me editing in your user space; I thought this would be the most clear way to demonstrate the similarities and differences. Regards, Rjjiii (talk) 06:36, 15 July 2023 (UTC)Reply
@Rjjiii: I don't mind you editing my sandbox3; I made it just for our testing. Of the various versions, I prefer the multiref2 style with its left justifications and its little extra vertical white space. I don't like the 'unbulleted list' coding, nor do I like messing with 'styles'. Your writeup is a little ambiguous to me; I can't tell if you consider it fixed/stable, or if you're still waffling on which version of coding (which I can't decipher anyway). The last few months I have been using multiref2 exclusively; I'm sure the Raw Story multirefs were made before I discovered multiref2. Grorp (talk) 07:45, 15 July 2023 (UTC)Reply
And thanks for making that demo.
For multiref(one): I think this one is working correctly. The old version would render differently everywhere.
For multiref2: The sandbox version is what I plan to push live. It should visually render exactly the same as it has been, with several minor benefits over using line breaks.
I hope that is more clear, Rjjiii (talk) 15:03, 15 July 2023 (UTC)Reply
Update is now live:
  • No issues on NVDA or Apple's VoiceOver.
  • Citation annotating scripts like User:Novem Linguae/Scripts/CiteHighlighter and User:Trappist the monk/HarvErrors now work on the listed citations.
  • A small amount of trailing white space separates it from the next citation.
  • It renders quicker, and I can't imagine a need for more than ten citations but that is technically possible now.
  • It can sort of take {{unbulleted list}} parameters, like text colors, but I can't imagine where a reference would need that.
Thanks for working things out with me. I think this is better than either than the old template or the indented version, Rjjiii (talk) 06:42, 16 July 2023 (UTC)Reply
You're welcome. I'm glad you didn't leave it indented; that was my original complaint. Whatever else you did... dunno... because the result looks exactly the same to me as when I first started using multiref2. I'll probably change my older occurrences of multiref to multiref2 now. Grorp (talk) 07:10, 16 July 2023 (UTC)Reply