Jump to content

Module talk:Sidebar: Difference between revisions

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia
Content deleted Content added
m Archiving 1 discussion(s) to Module talk:Sidebar/Archive 6) (bot
Line 15: Line 15:
{{archives|search=yes|bot=MiszaBot II|age=90}}
{{archives|search=yes|bot=MiszaBot II|age=90}}
{{Lua sidebar}}
{{Lua sidebar}}

== 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 ==
== Sidebar missing in mobile view ==

Revision as of 15:12, 3 August 2024

{{LGBT sidebar}}: Refer GaLTaS, where the sidebar displays only in Desktop view on iPad and iPhone. Chrisdevelop (talk) 23:48, 29 November 2023 (UTC)[reply]

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 "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)." Johnjbarton (talk) 01:40, 30 November 2023 (UTC)[reply]
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? Chrisdevelop (talk) 01:55, 30 November 2023 (UTC)[reply]
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. Johnjbarton (talk) 02:40, 30 November 2023 (UTC)[reply]
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. Chrisdevelop (talk) 02:48, 30 November 2023 (UTC)[reply]
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
{{LGBT sidebar}}
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. Johnjbarton (talk) 03:03, 30 November 2023 (UTC)[reply]
Brilliant, thank you - exactly what I needed to know; and yes, I will take your advice re editing this. Chrisdevelop (talk) 03:28, 30 November 2023 (UTC)[reply]

Hide image

Hi. I'd like to hide the image in {{IPCC}}, when it's invoked in IPCC, which already has the same image in {{infobox organization}}. I've tried content1 = {{IPCC|child=yes}} 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! fgnievinski (talk) 15:22, 21 January 2024 (UTC)[reply]

I've noticed Longitude invokes Template:Geodesy with parameter "notshowfig=1" which seems to be ignored. fgnievinski (talk) 05:18, 4 February 2024 (UTC)[reply]

Here's another example where the sidebar image duplicates the lead image: Light cone. fgnievinski (talk) 05:19, 4 February 2024 (UTC)[reply]

Add support for V T E

Can you add support for V T E {{navbar|Template Name|mini=y}} in the bottom right corner of this template like many other templates have? Qwerty284651 (talk) 02:32, 5 June 2024 (UTC)[reply]

@Qwerty284651: It's called a navbar, and it's already present. Why do you think that it isn't? --Redrose64 🌹 (talk) 15:37, 5 June 2024 (UTC)[reply]
I meant to add to the {{sidebar}} template the ability display VTE i.e. the {{navbar|Template Name|mini=y}}. Qwerty284651 (talk) 16:28, 5 June 2024 (UTC)[reply]
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. --Redrose64 🌹 (talk) 18:16, 5 June 2024 (UTC)[reply]
I don't see VTE in {{Tennis tournaments}}. Qwerty284651 (talk) 18:22, 5 June 2024 (UTC)[reply]
You need a |name= parameter, like this. It is documented, at Template:Sidebar#Parameters, particularly in the paragraph before the table. --Redrose64 🌹 (talk) 20:19, 5 June 2024 (UTC)[reply]

Urgent: Please fix this template for printed content Module:Sidebar/styles.css.

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:

  1. Update `@media (prefers-color-scheme: dark` to `@media screen and (prefers-color-scheme: dark`
  2. 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.

Jon (WMF) (talk) 18:22, 2 August 2024 (UTC) on behalf of the web team.[reply]