Content deleted Content added
m Archiving 1 discussion(s) from Module talk:Sidebar) (bot |
m Archiving 1 discussion(s) from Module talk:Sidebar) (bot |
||
(14 intermediate revisions by the same user not shown) | |||
Line 39:
:This cannot be overridden and that will not change. <code>nomobile</code> is used because the old class <code>vertical-navbox</code> is already hard-coded to be removed on mobile, but I wanted to change that class name to reflect the name of this module and because it was shorter for the purposes of TemplateStyles, so I added <code>nomobile</code> as a result. [[User:Izno|Izno]] ([[User talk:Izno|talk]]) 17:24, 12 April 2022 (UTC)
== List in the below parameter can break the next list ==
See [[Template:Sidebar with collapsible lists/testcases#List in the below parameter can break the next list]]. In example 2, why should omitting the blank line cause breakage of the list bullets? In HTML terms, they're bare {{tag|li}} elements without enclosing {{tag|ul}} tags. --[[User:Redrose64|<span style="color:#a80000; background:#ffeeee; text-decoration:inherit">Red</span>rose64]] 🌹 ([[User talk:Redrose64|talk]]) 19:15, 17 May 2022 (UTC)
:I've seen similar behavior (I was fighting with another module the other day over it), and I think it's when an element doesn't get closed the way it's supposed to, so then the parser tries its best to make sense of the remaining soup. I wouldn't be surprised in this case if it's caused by the fact we're using a table, but I don't actually know. [[User:Izno|Izno]] ([[User talk:Izno|talk]]) 19:25, 17 May 2022 (UTC)
== Should the sidebar image ever be overridden at article level? ==
Child sidebar templates allow editors to override the "image=" field at the article level, which is sometimes used in place of a lead image (such as https://en.wikipedia.org/w/index.php?title=Ouija&oldid=1067766212). The consequence is that such an article displays with no lead image on mobile, since the mobile view doesn't attempt to display sidebar templates.
Are there cases where it's useful for individual articles to override the sidebar image, or is this an outdated pre-mobile approach which should now be deprecated and removed? --[[User:Lord Belbury|Lord Belbury]] ([[User talk:Lord Belbury|talk]]) 12:18, 26 January 2022 (UTC)
:I think it doesn't make sense to rely on sidebars to generate page images, regardless of whether Module:Sidebar should allow children to change images.
:That said, there's not a lot we can do here to prevent children from changing their images. So long as the direct use of sidebar can change images as on the template's definition page, so too can someone change the direct use to allow passing an image from the indirect use. [[User:Izno|Izno]] ([[User talk:Izno|talk]]) 17:54, 26 January 2022 (UTC)
::True. Would it be worth updating [[WP:SIDEBAR]] documentation to explicitly say that sidebars should ''never'' have article-level images, and that these should always be split out into regular thumbnails above the sidebar, when encountered? (Another problem I encountered today was that [https://en.wikipedia.org/w/index.php?title=Pancasila_(politics)&oldid=1071924443 not all sidebars support captions below the image], making it impossible to explain what an image is illustrating, while it remains in the sidebar.) --[[User:Lord Belbury|Lord Belbury]] ([[User talk:Lord Belbury|talk]]) 13:59, 17 February 2022 (UTC)
:::Never is probably strong, but I have no particular qualms with a similar change. [[User:Izno|Izno]] ([[User talk:Izno|talk]]) 18:26, 17 February 2022 (UTC)
I've [https://en.wikipedia.org/w/index.php?title=Wikipedia:Categories,_lists,_and_navigation_templates&diff=1088395761&oldid=1082381339 added] a milder {{tq|1=do not ... override the "image=" field to illustrate something from the article}} to the paragraph about mobile display. --[[User:Lord Belbury|Lord Belbury]] ([[User talk:Lord Belbury|talk]]) 19:32, 17 May 2022 (UTC)
== Paramter "state=expanded" ==
{{Peerage|expanded=yes}}<!-- just a try -->
Hi again, in the template {{tl|Sidebar with collapsible lists}} which uses Template {{tl|Sidebar}} there is (or was?) a parameter named <code>state</code> – for example see [[Module talk:Sidebar/Archive 1#Code revamp, and discussion|Archive 1]] or the use <code><nowiki>{{Peerage|state=expanded}}</nowiki></code> in the article [[Peerages in the United Kingdom]]. I cannot find information about this on the help page, also not on [[Template:Sidebar with collapsible lists/doc]]. There it is writen <code><nowiki>| expanded = {{{expanded|}}}</nowiki></code>. But if there is Parameter "state", shouldn't it be <code><nowiki>| expanded = {{{state|}}}</nowiki></code>? OR: in the first use <code><nowiki>{{Peerage|expanded=yes(?)}}</nowiki></code> or sthg. similar? Sorry for my poor English, it's not my mother tongue. Thx, --[[User:W like wiki|W like wiki]] <sup>[[Nonviolent Communication|good to know]]</sup> 14:27, 12 April 2022 (UTC)
:{{para|state}} has never been an argument supported by {{tl|sidebar with collapsible lists}}. You may be confusing it for {{tl|navbox}}, which does accept that parameter. Here {{para|expanded}} is the correct argument as you have identified. [[User:Izno|Izno]] ([[User talk:Izno|talk]]) 17:25, 12 April 2022 (UTC)
:Fixed. [[User:Altanner1991|Altanner1991]] ([[User talk:Altanner1991|talk]]) 16:24, 28 May 2022 (UTC)
== Missing navbar in {{tl|Neolithic}}? ==
For some reason the v/t/e links are not appearing in {{tl|Neolithic}}. My cursory skim of the source doesn't seem to indicate an obvious reason. Can someone help please? --[[User:Joy|Joy [shallot]]] ([[User talk:Joy|talk]]) 08:13, 6 June 2022 (UTC)
: Never mind, I found the reason in another talk page archive - the "name" parameter was missing. Can we document this better? --[[User:Joy|Joy [shallot]]] ([[User talk:Joy|talk]]) 08:15, 6 June 2022 (UTC)
: The convoluted "if ... and (args.name or ...) ~= cfg.i18n.title_not_to_add_navbar) then" block should have an "else" sibling that prints some sort of a warning message, whether in the live output or that new box above the edit preview. --[[User:Joy|Joy [shallot]]] ([[User talk:Joy|talk]]) 08:19, 6 June 2022 (UTC)
::Why should we warn people about this? Sidebars are not like navboxes which are basically guaranteed to have the relevant parameter. [[User:Izno|Izno]] ([[User talk:Izno|talk]]) 15:13, 6 June 2022 (UTC)
:::It all comes down to the same thing - no {{para|name}}, no navbar. In that respect, sidebars are no different from navboxes. --[[User:Redrose64|<span style="color:#a80000; background:#ffeeee; text-decoration:inherit">Red</span>rose64]] 🌹 ([[User talk:Redrose64|talk]]) 19:52, 6 June 2022 (UTC)
::: We should warn them because it's obfuscated otherwise, it's not intuitive at all, you have to delve into the documentation to understand this quirk. It's bad design. --[[User:Joy|Joy [shallot]]] ([[User talk:Joy|talk]]) 08:23, 11 June 2022 (UTC)
== Left justified text? ==
Is there a simple way to use normal left-justified text for the content section? [[User:Maury Markowitz|Maury Markowitz]] ([[User talk:Maury Markowitz|talk]]) 14:14, 18 July 2022 (UTC)
:@[[User:Maury Markowitz|Maury Markowitz]], the only way today is to use {{para|contentstyle|text-align: left}} (or the same for {{para|liststyle}} in sidebar with collapsible lists). These parameters are documented in [[Template:Sidebar#Deprecated parameters]]. I have considered adding a parameter to support this in the module directly like how the centered text is supported for sidebar with collapsible list titles now. [[User:Izno|Izno]] ([[User talk:Izno|talk]]) 06:54, 17 December 2022 (UTC)
== Style parameters used in Template:Sidebar person ==
It appears that about half of the pages in {{cl|Sidebars with styles needing conversion}} are there because they use {{tl|Sidebar person}}, which uses a couple of {{para|style}} parameters. If someone who understands the minimal documentation about templatestyles wants to update that template, it will tidy up a bunch of pages at once. – [[User:Jonesey95|Jonesey95]] ([[User talk:Jonesey95|talk]]) 04:15, 14 March 2023 (UTC)
:@[[User:Jonesey95|Jonesey95]], I have done what I can. There is obviously still a parameter there to change the border color of the entire sidebar. That will need to be evaluated -- if a lot of templates are setting that then there should likely be a parameter to permit downstream use of their own TemplateStyles, or removal of the parameter, or perhaps a few choice colors added in this template for use downstream and then the general selection of a color removed. (I have no strong preference.)
:On a general note, I have been thinking about whether this category is the best use of anyone's time, since I'm increasingly of the belief that this template should be deprecated for use in the mainspace entirely. I don't want to waste people's time converting to use TemplateStyles.... [[User:Izno|Izno]] ([[User talk:Izno|talk]]) 20:20, 31 May 2023 (UTC)
== Headings misaligned with list titles ==
{{Moved discussion to|Template talk:Politics of Serbia and Montenegro|—[[User:Andrybak|andrybak]] ([[User talk:Andrybak|talk]]) 20:46, 31 May 2023 (UTC)}}
== Support for plainlist TemplateStyles and mobile disappearing styles ==
I've made some changes to the module sandbox here that reflect changes made to [[Module:Navbox/sandbox]] and which I've started a discussion at [[Template talk:Navbox#TemplateStyles for plainlist]]. These changes are describe in parts 1 and 2 there. If you have questions, please feel free to discuss there. [[User:Izno|Izno]] ([[User talk:Izno|talk]]) 23:40, 16 December 2022 (UTC)
:Hi, [[User:Izno|Izno]]. Thank you for your work on the CSS/TemplateStyles refactoring. Are edits such as [[Special:Diff/1157915259]] useful with regards of this effort?
:I see that [[Module:Sidebar]] has [[Special:Diff/1128569472|support for adding the TemplateStyles based on parameters]] ({{para|contentclass}} in the case of {{tl|Atomic radius}}). Will function <code>add_list_styles</code> be eventually removed from [[Module:Sidebar]] (assuming all relevant places are replaced with explicit calls to {{tl|plainlist}} et al.)? Or is <code>add_list_styles</code> and related code for adding TemplateStyles expected to be left in the module "forever"? —[[User:Andrybak|andrybak]] ([[User talk:Andrybak|talk]]) 19:57, 31 May 2023 (UTC)
::@[[User:Andrybak|Andrybak]], it's probably not much of a win, if a win at all, today, to make swaps like that. I did do that for a few sidebars several years ago, but having to deal with the hundreds of thousands of navigation templates (Module:Sidebar and [[Module:Navbox]], and [[Module:Infobox]] too) made it not a winning strategy to me when there are other [[MediaWiki talk:Common.css/to do|much larger gains to be had]]. Right now, if there is a loss, it's that the addition of plainlist/hlist styles to a page would become slightly less deterministic. [[User:Izno|Izno]] ([[User talk:Izno|talk]]) 19:59, 31 May 2023 (UTC)
:::I'm confused. I think I don't understand the layout/formatting of the page [[MediaWiki talk:Common.css/to do]]. For example, {{tl|Infobox Cyrillic letter}} [[Special:Diff/1157920522|was still listed]] for plainlist. However, [[Special:Diff/1157920338]] seems very similar to the aforementioned [[Special:Diff/1157915259]]. What am I missing? —[[User:Andrybak|andrybak]] ([[User talk:Andrybak|talk]]) 20:22, 31 May 2023 (UTC)
::::My link to the to do page was to indicate there is higher-value work to be done on other things than the pretty-mechanical/low-value change that adds plainlist/hlist templates and eventually removes the checking code from the module.
::::Your infobox cyrillic letter change looks fine (though now-reverted and a full page protection on top of that unrelated to your efforts). There are more painful conversions for infoboxes which is why I added the checking code in Module:Infobox as well (think: it is trivial to make an infobox where the row disappears with a basic parameter and a class in the row class rather than putting an if block in with a template).
::::The parts of the to do list that should be worked are the ones not under the "done" section. :) [[User:Izno|Izno]] ([[User talk:Izno|talk]]) 07:40, 1 June 2023 (UTC)
== Sidebar missing in mobile view ==
<nowiki>{{LGBTQ sidebar}}</nowiki>: Refer [[GaLTaS]], where the sidebar displays only in Desktop view on iPad and iPhone. [[User:Chrisdevelop|Chrisdevelop]] ([[User talk:Chrisdevelop|talk]]) 23:48, 29 November 2023 (UTC)
:[[Template:Sidebar]] says: "This template does not display in the mobile view of Wikipedia; it is desktop only. Read the documentation for an explanation."
:and <nowiki>"Templates using the classes class=navbox ({{navbox}}) or class=nomobile ({{sidebar}}) are not displayed on the mobile web site of English Wikipedia. Mobile page views account for approximately 65% of all page views (90-day average as of May 2023)."</nowiki> [[User:Johnjbarton|Johnjbarton]] ([[User talk:Johnjbarton|talk]]) 01:40, 30 November 2023 (UTC)
::Thanks for your speedy reply and explanation. I copied the Sidebar from another similar site and didn’t see any documentation there. Where can I read this documentation? Given that most viewers are using mobile view, and therefore won’t see the Template unless they switch to Desktop view, is there either a way to edit this to display in all situations, or is there another Sidebar template that already will? [[User:Chrisdevelop|Chrisdevelop]] ([[User talk:Chrisdevelop|talk]]) 01:55, 30 November 2023 (UTC)
:::IDK, I came here to try to figure out what the deal is. AFAICT, the sidebar is not implemented correctly on mobile plus some think that dropping the sidebar content altogether is good because it reduces page weight and thus load time. I suppose these folks grew up in the 2000s. I could not find any more info. I tried asking on [[Wikipedia:Village_pump_(technical)#Template_sidebar_design_alternative?]] but got crickets. [[User:Johnjbarton|Johnjbarton]] ([[User talk:Johnjbarton|talk]]) 02:40, 30 November 2023 (UTC)
::::Thanks for all your trouble. I’ll keep an eye on the Village Pump and check back here every so often. I like this particular LGBT project sidebar because if saves a lot of time to not have to enter its directory manually. Is there a place where the Sidebar itself can be edited? That was how I ended up here in the first place. [[User:Chrisdevelop|Chrisdevelop]] ([[User talk:Chrisdevelop|talk]]) 02:48, 30 November 2023 (UTC)
:::::By "the Sidebar" do you mean "The page [[GaLTaS]] has a sidebar and I want to change its content?
:::::If yes edit the intro and see
:::::<nowiki>{{LGBTQ sidebar}}</nowiki>
:::::This template contains the config for the sidebar. Navigate to the config file by putting "Template:" in Wikipedia search bar followed by the name of the template: [[Template:LGBT_sidebar]]. Edit that page to change the template.
:::::'''BEWARE''' any change you make affects '''all''' pages using that sidebar. You should discuss any changes on the [[Template_talk:LGBT]] page, or better ask someone else to do the edits the first time. [[User:Johnjbarton|Johnjbarton]] ([[User talk:Johnjbarton|talk]]) 03:03, 30 November 2023 (UTC)
::::::Brilliant, thank you - exactly what I needed to know; and yes, I will take your advice re editing this. [[User:Chrisdevelop|Chrisdevelop]] ([[User talk:Chrisdevelop|talk]]) 03:28, 30 November 2023 (UTC)
== Hide image ==
Hi. I'd like to hide the image in {{tlx|IPCC}}, when it's invoked in [[IPCC]], which already has the same image in {{tlx|infobox organization}}. I've tried <code><nowiki>content1 = {{IPCC|child=yes}}</nowiki></code> but it didn't work. Does anybody know if that's possible? Otherwise, it might be better to remove the sidebar from that article. Thanks! [[User:Fgnievinski|fgnievinski]] ([[User talk:Fgnievinski|talk]]) 15:22, 21 January 2024 (UTC)
I've noticed [[Longitude]] invokes [[Template:Geodesy]] with parameter "notshowfig=1" which seems to be ignored. [[User:Fgnievinski|fgnievinski]] ([[User talk:Fgnievinski|talk]]) 05:18, 4 February 2024 (UTC)
Here's another example where the sidebar image duplicates the lead image: [[Light cone]]. [[User:Fgnievinski|fgnievinski]] ([[User talk:Fgnievinski|talk]]) 05:19, 4 February 2024 (UTC)
== Add support for V T E ==
Can you add support for V T E <code><nowiki>{{navbar|Template Name|mini=y}}</nowiki></code> in the bottom right corner of this template like many other templates have? [[User:Qwerty284651|Qwerty284651]] ([[User talk:Qwerty284651|talk]]) 02:32, 5 June 2024 (UTC)
:{{replyto|Qwerty284651}} It's called a navbar, and it's already present. Why do you think that it isn't? --[[User:Redrose64|<span style="color:#a80000; background:#ffeeee; text-decoration:inherit">Red</span>rose64]] 🌹 ([[User talk:Redrose64|talk]]) 15:37, 5 June 2024 (UTC)
::I meant to add to the {{tl|sidebar}} template the ability display VTE i.e. the <code><nowiki>{{navbar|Template Name|mini=y}}</nowiki></code>. [[User:Qwerty284651|Qwerty284651]] ([[User talk:Qwerty284651|talk]]) 16:28, 5 June 2024 (UTC)
:::Same answer, same question. It's already present in [[Template:Sidebar]], so, why do you think that it isn't? If something isn't working as expected. you ''need'' to provide examples. --[[User:Redrose64|<span style="color:#a80000; background:#ffeeee; text-decoration:inherit">Red</span>rose64]] 🌹 ([[User talk:Redrose64|talk]]) 18:16, 5 June 2024 (UTC)
::::I don't see VTE in {{tl|Tennis tournaments}}. [[User:Qwerty284651|Qwerty284651]] ([[User talk:Qwerty284651|talk]]) 18:22, 5 June 2024 (UTC)
:::::You need a {{para|name}} parameter, {{diff|Template:Tennis tournaments|prev|1227452320|like this}}. It is documented, at [[Template:Sidebar#Parameters]], particularly in the paragraph before the table. --[[User:Redrose64|<span style="color:#a80000; background:#ffeeee; text-decoration:inherit">Red</span>rose64]] 🌹 ([[User talk:Redrose64|talk]]) 20:19, 5 June 2024 (UTC)
== Urgent: Please fix this template for printed content [[Module:Sidebar/styles.css]]. ==
<div lang="en" dir="ltr">
Firstly, apologies for writing in English if this is not your first language (this is an automated message).
This template has been detected as one of 436 pages using styles that break the page when printed when the user is using dark mode. The fix is very straightforward - all your styles relating to dark mode must be scoped to. Since there is a high risk of this templates being copied to other wikis it is important this notice is acted on ASAP.
To fix this:
# Update `@media (prefers-color-scheme: dark` to `@media screen and (prefers-color-scheme: dark`
# Wrap any styles relating to `html.skin-theme-clientpref-night` in `@media screen`
If this message has not been acted on in 7 days, this will be fixed by an automated script. Thank you for your help fixing this important issue.
For any questions feel free to ask them at [[phab:T369874]].
[[User:Jon (WMF)|Jon (WMF)]] ([[User talk:Jon (WMF)|talk]]) 18:22, 2 August 2024 (UTC) on behalf of the web team.
</div>
== Missing CSS variable? ==
On row 385 there is the line <code>:cssText('color: var(--color-base)')</code>, but the --color-base CSS variable doesn't seem to be defined anywhere? [[User:MKFI|MKFI]] ([[User talk:MKFI|talk]]) 13:18, 15 October 2024 (UTC)
:{{ping|Jdlrobson}} I see that you {{diff|Module:Sidebar|diff=1226521837|label=added}} this. Where is the CSS variable defined? And why is this an inline style declaration instead of a class? Now dependent templates have problems changing text colors without using !important CSS declarations. [[User:MKFI|MKFI]] ([[User talk:MKFI|talk]]) 11:20, 17 October 2024 (UTC)
::The variable is defined in [https://doc.wikimedia.org/codex/latest/design-tokens/color.html the mediawiki design system]. It is active on the default skins of Vector 2022 and Minerva and is essential to make this template work in dark mode. It is not defined on opt in skins such as Monobook and Vector and there it will be ignored (we can add a fallback if that is useful and less confusing).
::[https://m.mediawiki.org/wiki/Recommendations_for_night_mode_compatibility_on_Wikimedia_wikis this link] should have lots of helpful context. Let me know if you have any follow up questions. <span style="background:white; color: black;">🐸</span> [[User:Jdlrobson|Jdlrobson]] ([[User talk:Jdlrobson|talk]]) 18:00, 18 October 2024 (UTC)
:::{{ping|Jdlrobson}} this module is used a base for multiple other templates. Your change overrides derived template style declarations and caused for example [[Template:Zoroastrianism sidebar]] to display black-on-red text which made it difficult to read instead of white-on-red as it should. This module has a [[Module:Sidebar/styles.css|stylesheet]]. Does the color variable really need to be an inline style declaration instead of a line in .sidebar-list-title class? [[User:MKFI|MKFI]] ([[User talk:MKFI|talk]]) 08:10, 19 October 2024 (UTC)
::::Presumably it could be added via a class. When dark mode was rolled out, for templates I was less familiar with I usually went with the most straightforward solution. I see this one uses [[Module:Sidebar/styles.css]] ?
::::You should be able to see the exact issue it fixes (unreadable black text on a black background) by visiting https://en.wikipedia.org/wiki/Template:Sidebar/testcases?useskin=vector-2022&vectornightmode=1
::::and undoing that inline style using this code: <syntaxhighlight lang=javascript>
$('.sidebar-list-title[style]').each((a,i)=>i.setAttribute('style',i.getAttribute('style').replace('color: var(--color-base)', '')))
</syntaxhighlight>
::::So you could likely move it to CSS, test if the issue is resolved and then undo my change. <span style="background:white; color: black;">🐸</span> [[User:Jdlrobson|Jdlrobson]] ([[User talk:Jdlrobson|talk]]) 16:21, 19 October 2024 (UTC)
:::::{{ping|Jdlrobson}} I can't do the change myself - the module and stylesheet are both template-protected. [[User:MKFI|MKFI]] ([[User talk:MKFI|talk]]) 08:33, 20 October 2024 (UTC)
== Templatestyles parameter ==
{{re|Izno}} Are there [[Wikipedia_talk:TemplateStyles/Archive_1#c-Izno-2018-07-27T01:35:00.000Z-In_the_context_of_meta_templates|still]] benefits of the caller templates using the numerous parameters {{para|templatestyles}}, {{para|child templatestyles}}, and {{para|grandchild templatestyles}} over a simple {{xtag|templatestyles}} in each? [[Special:Contributions/172.97.141.219|172.97.141.219]] ([[User talk:172.97.141.219|talk]]) 10:39, 30 November 2024 (UTC)
:Yes. Using the dedicated parameter allows you to use the cascading part of CSS, namely that the CSS in the child will apply after, not before the core TemplateStyles. This avoids the case where the child's styles are potentially overridden by styles of the same specificity in the core styles. You should generally always use these parameters. [[User:Izno|Izno]] ([[User talk:Izno|talk]]) 06:03, 1 December 2024 (UTC)
== Treating [[Module:Navbar/styles.css]] ==
{{ping|Izno}} Is it right not to treat [[Module:Navbar/styles.css]] in add_list_styles() whether sidebar has a navbar or not? If an article page transcludes a sidebar (with a navbar) and another navbar in this order, the styles doesn't seem to be applied on mobile view. [[User:本日晴天|本日晴天]] ([[User talk:本日晴天|talk]]) 15:42, 24 December 2024 (UTC)
:add_list_styles is just for the two kinds of lists and is about the classes that have been added since eternity in the several templates (infobox also). Both navbox and sidebar have instead move_hiding_templatestyles which will take care of embedded TemplateStyles tags. [[User:Izno|Izno]] ([[User talk:Izno|talk]]) 17:32, 24 December 2024 (UTC)
::Okay, but on some pages (ex. [https://en.m.wikipedia.org/wiki/Finder_(software)#Timeline Finder_(software)]) on mobile view, navbars are actually displayed in unintended styles because [[Module:Navbar/styles.css]] isn't used. How about modifying this module [[Special:Diff/1129707986/1265334216|like this]] and output an additional templatestyles tag if navbar is used? [[User:本日晴天|本日晴天]] ([[User talk:本日晴天|talk]]) 08:19, 27 December 2024 (UTC)
|