Module talk:Sidebar/Archive 6
![]() | This is an archive of past discussions about Module:Sidebar. Do not edit the contents of this page. If you wish to start a new discussion or revive an old one, please do so on the current talk page. |
Archive 1 | ← | Archive 4 | Archive 5 | Archive 6 |
Issue with latest style changes
The addition of the css border-collapse: collapse;
to .sidebar
has caused sidebars to loose the default padding which surrounds the entire sidebar (the 0 2em padding). Take Template:ArbCom sidebar, which has less padding around between the border and the content. Removing this CSS rule returns the padding to normal. Izno, do you have any ideas of how to keep the padding that surrounded the sidebar? By default this padding is there and I presume that other sidebars may have used this padding, which have now had this padding broken. Dreamy Jazz talk to me | my contributions 21:05, 4 August 2021 (UTC)
- That template was overriding that padding. Izno (talk) 21:16, 4 August 2021 (UTC)
- Izno, thanks. I was confused as in inspect element the padding rule on the .sidebar was not greyed out to show as overrided (which I assumed it would be if it was another rule overriding the padding) and as just disabling the rule seemed to fix the issue I didn't think pre-existing rules which applied to other elements were the problem. Thanks, Dreamy Jazz talk to me | my contributions 21:19, 4 August 2021 (UTC)
Template documentation of wraplinks parameter
Is it supposed to turn link wrapping on or off? (Pinging Uzume, who changed the wording in this edit from 2012.) --Paul_012 (talk) 14:44, 8 October 2021 (UTC)
- @Paul 012: All I did was fix the formatting of the documentation. You should probably ask the creators of these Template:Sidebar/doc changes instead: 246309531 and 325612879. The first is by @Sardanaphalus: where the section on "Handling long links" is first introduced. The second is by @Anomie: where the template used is changed from {{longlink}} to {{normalwraplink}}. My change also changed the template reference but only in the initial capitalization which always refers to the same page on Mediawiki references, so my change effectively only targeted fixing English and markup; not any semantic changes. You will also note, all such changes to the documentation, occurred before the conversion from the old template code to the new Scribunto code in 2013, so the documentation is quite likely outdated. —Uzume (talk) 18:28, 8 October 2021 (UTC)
- Based upon the current Module:Sidebar code,
|wraplinks=
causes the content to have the CSS classnowraplinks
added when value of|wraplinks=
is nottrue
. That seems quite different than the current documentation. This functionality was recently changed by @Izno: in 1036808367 and 1002719434 from the original 2013 Module code that was presumably ported from the older Template code (although the changes appear to make it effectively do the same as it used to). I can research the history of the parameter in the old template code too if you like but I am not sure how valuable that is. —Uzume (talk) 18:28, 8 October 2021 (UTC) - I updated the documentation here to swap the paragraphs around (addressing
|wraplinks=
before {{normalwraplink}}) and changing the referenced param value tofalse
, while adding that the {{normalwraplink}} template can be used to wrap specific links while|wraplinks=false
is used. Such a change certainly changes the semantics of the documentation (unlike my earlier referenced change) but methinks it corrects it to be inline with the current functionality. I hope that help by fixes things. —Uzume (talk) 18:28, 8 October 2021 (UTC) - Just to note I saw this and that it is entirely possible I fufed. I will look tomorrow in more detail. Izno (talk) 23:58, 8 October 2021 (UTC)
- The intention of the parameter today, and prior to my edits earlier this year, is to turn link wrapping on (review the version immediately prior to mine). A review of the module at the time of the 2012 edit has
{{#if: {{{wraplinks|}}}|{{#ifeq: {{{wraplinks|}}}|true||nowraplinks}}|nowraplinks}}
which also indicates that "true" turns off nowraplinks. The 2012 edit was accordingly wrong. Izno (talk) 04:16, 11 October 2021 (UTC)- @Izno: Thanks, I reverted my earlier changes and updated the documentation to reflect that here. —Uzume (talk) 07:07, 11 October 2021 (UTC)
- The intention of the parameter today, and prior to my edits earlier this year, is to turn link wrapping on (review the version immediately prior to mine). A review of the module at the time of the 2012 edit has
Vertically center the "[Expand]" button
I've noticed that the "[Expand]" button is not centered vertically like it's header text is to the left of it. It's really annoying to look at.
Could someone please center it? Lectrician1 (talk) 01:46, 20 December 2021 (UTC)
Removing sidebar images as page image
I am not (yet) able to reliably program in Lua without breaking things. Hence, could someone please add a parameter allowing "class=notpageimage" to be added to the sidebar image? Phabricator: [1] This would allow editors to choose whether or not to display the sidebar image as the preview image. Alternatively, we could just automatically add "class=notpageimage" to all sidebar images. Many of them are graphics not useful as previews, or not necessarily appropriate for all of the pages they're used on. Toadspike (talk) 12:14, 28 March 2022 (UTC)
- I intend to do this for all images, but as I expressed on the Phab task, this is nontrivial for me. Izno (talk) 18:49, 28 March 2022 (UTC)
How to override "class=nomobile" to display sidebar in mobile view?
Hi, if to make a sidebar visible in the mobile version of an article (mobile web site), how to override class=nomobile
? I cannot find information about this on the help page.
- Example: In the article Peerages in the United Kingdom the sidebar should be also visible in mobile view. The sidebar-template is {{Peerage}}, which uses the {{Sidebar with collapsible lists}}, which in turn uses {{Sidebar}}.
So how to do? How to pass a parameter from {{Peerage}} to {{Sidebar with collapsible lists}} to {{Sidebar}}? What is the right class-name to make a sidebar visible in mobile view? Thanks a lot! Regards, --W like wiki good to know 14:01, 12 April 2022 (UTC)
- This cannot be overridden and that will not change.
nomobile
is used because the old classvertical-navbox
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 addednomobile
as a result. Izno (talk) 17:24, 12 April 2022 (UTC)