Misplaced Pages

MediaWiki talk:Gadget-switcher.js: Difference between revisions

Article snapshot taken from Wikipedia with creative commons attribution-sharealike license. Give it a read and then ask your questions in the chat. We can research this topic together.
Browse history interactively← Previous editNext edit →Content deleted Content addedVisualWikitext
Revision as of 21:24, 27 July 2020 editJackmcbarn (talk | contribs)31,380 edits Custom styles for labels: re← Previous edit Revision as of 15:03, 12 August 2020 edit undoOnceinawhile (talk | contribs)Autopatrolled, Extended confirmed users, Pending changes reviewers49,716 editsNo edit summaryNext edit →
Line 44: Line 44:
Cheers! ] ☺ &#124; <small>]</small> &#124; 10:04, 10 June 2020 (UTC) Cheers! ] ☺ &#124; <small>]</small> &#124; 10:04, 10 June 2020 (UTC)
:{{ping|Naypta}} I wrote some new code to let you both change the style and move them to the top. To try it out, disable the switcher gadget in ], then add <code><nowiki>importScript('User:Jackmcbarn/switcher-unstable.js'); // Linkback: ]</nowiki></code> to ]. I added example wikicode to use it at ]. Let me know if this is what you want, and if so, I'll put in a request to update the real gadget with it. ] (]) 21:24, 27 July 2020 (UTC) :{{ping|Naypta}} I wrote some new code to let you both change the style and move them to the top. To try it out, disable the switcher gadget in ], then add <code><nowiki>importScript('User:Jackmcbarn/switcher-unstable.js'); // Linkback: ]</nowiki></code> to ]. I added example wikicode to use it at ]. Let me know if this is what you want, and if so, I'll put in a request to update the real gadget with it. ] (]) 21:24, 27 July 2020 (UTC)

==Disable show all?==
Hi {{ping| Jackmcbarn}} is there a way to disable the “show all” button? I would like to add that option as a feature on ]. ] (]) 15:03, 12 August 2020 (UTC)

Revision as of 15:03, 12 August 2020

Disable/fix for mobile skin

Hi User:Jackmcbarn I see this gadget is loaded by default on the mobile experience but I do not see it being used anywhere.

Given top loaded styles are problematic for slow connections, can I ask that you fix this gadget to work on mobile or disable it on mobile for the time being (remove the mobile target)?

Please do let me know if I can help in any way. Jdlrobson (talk) 21:45, 16 February 2016 (UTC)

@Jdlrobson: It seems to work fine on https://en.m.wikipedia.org/Broadway_Hollywood_Building for me (radio buttons in infobox). Does it not work there for you? Jackmcbarn (talk) 22:16, 16 February 2016 (UTC)

Thanks for the quick response @Jackmcbarn :) I have updated the bug - it seems like this is the symptom of a larger problem https://phabricator.wikimedia.org/T126817 Jdlrobson (talk) 22:40, 16 February 2016 (UTC)

For anyone else reading this, here's the conversation we had on IRC:
<jdlrobson> jackmcbarn: i see it now yup i didnt realise that's what it did- that said do you know why it's top loading CSS given they are just radio buttons?
<jackmcbarn> i wasn't aware it was top loading any css
* jackmcbarn looks
<jackmcbarn> i can't see any css it's loading anywhere at all. where do you see it at?
<jdlrobson> yeh that's what legoktm was suggesting
<jdlrobson> i suspect there's some kind of bug in the stack..
Jackmcbarn (talk) 22:48, 16 February 2016 (UTC)
Looks like this is now fixed. For some reason, thanks to a mysterious ping from @Liridon:, I only just got this notification so thank you for looking into it! Jdlrobson (talk) 17:42, 20 July 2017 (UTC)

Gadget switcher broken

@Krinkle: your last edit seemed to have broken the gadget, the show all radio button disappeared, and most of the testcases for template {{switcher}} are not working. Lam-ang (talk) 06:11, 21 August 2018 (UTC)

Yes, we've got Uncaught ReferenceError: $showAllRadio is not defined after the recent changes. --Петар Петковић (talk) 12:05, 22 August 2018 (UTC)
Apologies. I've fixed issue now. Krinkle (talk) 16:59, 22 August 2018 (UTC)

More aesthetic layout for many images

Would it be possible to modify the template to allow for the organization of the clickable buttons in columns when there are above a certain number of images? Since the template accommodates up to 40 images, it is unwieldy to have a vertical list of 40, since that just takes up space. An example of this phenomenon is in my sandbox. Continuing this discussion from Template talk:Switcher. Pinging @PrimeHunter and Jackmcbarn: Ergo Sum 00:15, 24 November 2019 (UTC)

Pinging @Krinkle: per PrimeHunter's suggestion, who may be able to assist. Ergo Sum 05:50, 25 November 2019 (UTC)
An active example of the problem can now be found on 1838 Jesuit slave sale. Ergo Sum 05:50, 25 November 2019 (UTC)

Custom styles for labels

Hi Krinkle - apologies for the unsolicited ping, I understand you're the maintainer of the switcher gadget.

Would it be possible to make a change to the gadget which would permit custom styles being put on the <label> elements? Over here we've been discussing using it in a template, but by default the switcher radio buttons fly off to the other side, which isn't very helpful. Essentially, what I want to do is plonk the radio buttons on top of the templates - which I can do by setting them to display inline - but of course, there's no way to do that in the current gadget code.

No worries if it's not possible for any reason, I know this is a bit of an edge case - it'd just be useful here

Cheers! Naypta ☺ | ✉ talk page | 10:04, 10 June 2020 (UTC)

@Naypta: I wrote some new code to let you both change the style and move them to the top. To try it out, disable the switcher gadget in Special:Preferences, then add importScript('User:Jackmcbarn/switcher-unstable.js'); // Linkback: ] to Special:MyPage/common.js. I added example wikicode to use it at User:Jackmcbarn/switcher#Testing new features. Let me know if this is what you want, and if so, I'll put in a request to update the real gadget with it. Jackmcbarn (talk) 21:24, 27 July 2020 (UTC)

Disable show all?

Hi @Jackmcbarn: is there a way to disable the “show all” button? I would like to add that option as a feature on Template:Historical map series. Onceinawhile (talk) 15:03, 12 August 2020 (UTC)