Template talk:Unbulleted list citebundle

Latest comment: 5 months ago by Krisgabwoosh in topic Named bundles

Applicability of template edit

@Psiĥedelisto: This template came up in the Wikipedia Discord (WP:DISCORD), and @Anon423 and Tamzin: and I took a look. It seems like this template's functionality is currently Firefox-specific - in Chrome, Edge, and Safari, the extra line break is still there. Is there a "fix" for this? (Or, alternatively, a belief that this is a bug in the other three that will be fixed in the near future?) SnowFire (talk) 23:35, 8 May 2023 (UTC)Reply

@SnowFire: I think I've solved it. Psiĥedelisto (talkcontribs) please always ping! 19:15, 9 May 2023 (UTC)Reply
@Psiĥedelisto: The good news is that it works on Chrome now! Still doesn't seem to work on Safari, though... can't check with Edge at the moment. SnowFire (talk) 19:50, 9 May 2023 (UTC)Reply
@SnowFire: My latest bit of cleverness works for me on Edge: [1]. Psiĥedelisto (talkcontribs) please always ping! 20:03, 9 May 2023 (UTC)Reply
Okay, looks good in both Chrome & Safari now. Thanks! SnowFire (talk) 20:15, 9 May 2023 (UTC)Reply
@SnowFire: who are you on WP:DISCORD btw? I am ★コピペ#6969. Psiĥedelisto (talkcontribs) please always ping! 20:18, 9 May 2023 (UTC)Reply

Why a separate template from {{multiref}} edit

Psiĥedelisto, Tamzin, Anon423, and SnowFire: could this template and template:multiref be merged?

Multiref rendered weird in mobile, very weird on screen readers, and slightly weird on desktop Vector 2022. I fixed this by borrowing the styles from this template. Right now they render pretty much the same, and I think they have the same purpose. That raised the question for me of why are these separate. If this template is faster or has some other benefit, shouldn't it just be an update to multiref? (Template:multiref2 is different in that uses different spacing, possibly for full citations.) Rjjiii (talk) 03:25, 5 July 2023 (UTC)Reply

@Rjjiii: Why is {{multiref}} limited to fifteen items? Psiĥedelisto (talkcontribs) please always ping! 14:42, 5 July 2023 (UTC)Reply
@Psiĥedelisto: Not sure. It was increased from 10 to 15 a couple years ago: https://en.wikipedia.org/w/index.php?title=Template%3AMultiref&diff=1043070245&oldid=1039060911 Rjjiii (talk) 14:54, 5 July 2023 (UTC)Reply
@Rjjiii: I think if we're going to merge the templates we should based it off of this one and not its current code. This one is newer and uses newer MediaWiki Lua syntax to call the parent template. Psiĥedelisto (talkcontribs) please always ping! 14:57, 5 July 2023 (UTC)Reply
@Psiĥedelisto: After pointing multiref here, an editor asked about the indentation in {{Unbulleted list citebundle}}. Here is the test page he made to demonstrate: User:Grorp/sandbox3. I think this is the expected behavior, but since he framed it as a bug, I thought I would pass it along. Regards, Rjjiii (talk) 03:02, 12 July 2023 (UTC)Reply
Oh, also, the only difference, and what's causing a change in indentation is that the first parameter in multriref2 and previously in multiref(1) would be just be put before the list. That could easily be done here so that each use of the ULC has the same level of indentation, but it seems a little wonky. Rjjiii (talk) 03:28, 12 July 2023 (UTC)Reply
Multiref now points here. I've updated the documentation to add it as a shortcut, and to carry over the table of examples from the old documentation. Archive 1 of the talk page are the old discussions from that talk page. Template:multiref2 was terrible on screen readers and had some quirks with rendering, so I've made it into a wrapper for this template. Thanks Psiĥedelisto & SnowFire, Rjjiii (talk) 20:25, 9 July 2023 (UTC)Reply

Tooltips on short footnotes too narrow edit

The way the template shrinks the div works in most situations. For short footnotes, the tooltip is by default made more narrow to fit the citation's width. So for bundled short footnotes, the tooltip will shrink down even further and push the "p ##" onto the next line. I was tinkering in the sandbox, but didn't find a good solution yet. Rjjiii (talk) 06:00, 19 July 2023 (UTC)Reply

I'll test more first, but I think the sandbox version works. I'll also add comments and condense the CSS before pushing it live. Rjjiii (talk) 05:48, 21 July 2023 (UTC)Reply

Undesirable linewrapping edit

  Resolved

This example usage in the /doc subpage shows output that looks like:

For the sun's size, see Miller, Edward (2005). The Sun. Academic Press. p. 1.

For the moon's size, see Brown, Rebecca (2007). "Size of the Moon". Scientific American. 51 (78): 46.

For the sun's heat, see Yamada, Hanako [山田花子] (2005). Taiyō no netsu 太陽の熱 [The Sun's Heat]. Gakujutsu shuppansha (学術出版社) [Academic Press]. p. 2.

Used at Wikipedia:Citing sources (see this version of the page in case the attempt to use this template there has been reverted), it looks like the following (with simplified example data), which is definitely not the desired output, and wouldn't be the desired output in an article unless the refs were put into columns:

For the sun's size, see Miller, Edward. The Sun.
Academic Press, 2005, p. 1.

For the moon's size, see Brown, Rebecca. "Size of the
Moon", Scientific American, 51 (78): 46.

For the sun's heat, see Smith, John. The Sun's Heat.
Academic Press, 2005, p. 2.

 — SMcCandlish ¢ 😼  10:13, 28 July 2023 (UTC)Reply

@SMcCandlish: I've caused this here: Template:Unbulleted list citebundle/styles.css Previously the template would make bundled short citations too narrow. I didn't see a way to target the popup via CSS, so I set the default width as the popup width and targeted the reference list. Rjjiii (talk) 18:14, 28 July 2023 (UTC)Reply
Well, one of your tweaks clearly needs to be undone. Previously the template would make bundled short citations too narrow – which it is still doing, just now in more circumstances. So, which circumstance (testcase) were you targeting, and shouldn't this be solveable with a min-width instead of a max-width (at a guess)? PS: Width should generally not be set in px anyway, only in em or some other relative unit, since content size varies radically between users, especially those with vision problems. But maybe you were targeting a container case that was itself inappropriately set in px.  — SMcCandlish ¢ 😼  22:31, 28 July 2023 (UTC)Reply
I've tried a different solution. I had time to respond earlier, but not time to test or troubleshoot. You said which it is still doing which makes me realize that I must not have been clear enough. I was talking specifically about the reference popup on desktop themes. Rjjiii (talk) 01:48, 29 July 2023 (UTC)Reply
Thanks. Whatever you did it worked like magic. The diplay over at WP:CITE is fixed. I just got up from a nap and was wondering why when I tried sandboxing I couldn't get the linewrapping happen again, and I reloaded the CITE page and the linewrapping went away because you fixed it. :-)  — SMcCandlish ¢ 😼  01:55, 29 July 2023 (UTC)Reply

Copy-pasteabilty problem edit

  Resolved

For the above post, when I tried to copy-paste the formatted examples from the /doc page, this is the paste I got:

For the sun's size, see

For the moon's size, see

For the sun's heat, see

The only way to copy the "Miller, Edward (2005). The Sun. Academic Press. p. 1." material was to indivdually select and copy-paste just that part of the line. This is clearly undesirable behavior.

PS: This was using Chrome under Windows 10.

PPS: It did not happen when I copy-pasted the entire example block from the other page mentioned above. I have no explanation for this.

 — SMcCandlish ¢ 😼  10:17, 28 July 2023 (UTC)Reply

For whatever reason, the fix to the problem reported in the thread above also fixed this issue.  — SMcCandlish ¢ 😼  02:03, 29 July 2023 (UTC)Reply
@SMcCandlish: Thanks for all the feedback. Your issues with copy and paste prompted me to clean up the documentation, but I was never able to duplicate that bug. The template itself should now work in nearly all cases. The edge case it doesn't (yet) cover is when an editor has manually narrowed the references list down to something like {{reflist|10em}} for very tiny citations. Rjjiii (talk) 02:47, 29 July 2023 (UTC)Reply

Named bundles edit

Is there any way to name a bundle so that an inline reference can be anchored to it? In the same vein as Template:SfnRef and other similar templates. Krisgabwoosh (talk) 18:33, 10 November 2023 (UTC)Reply

@Krisgabwoosh: you just use a named reference. For example this[1] and this[1] are both cited to the example from the documentation. Edit the source to see how.

  1. ^ a b
    • For the sun's size, see Miller, Edward (2005). The Sun. Academic Press. p. 1.
    • For the moon's size, see Brown, Rebecca (2007). "Size of the Moon". Scientific American. 51 (78): 46.
    • For the sun's heat, see Yamada, Hanako [山田花子] (2005). Taiyō no netsu 太陽の熱 [The Sun's Heat]. Gakujutsu shuppansha (学術出版社) [Academic Press]. p. 2.