Template talk:Clickable button 2#Fully-protected edit request (TfD)

{{talk page of redirect}}

{{permprot}}

{{archives|banner=yes}}

Template-protected edit request on 18 November 2017

{{edit template-protected|Module:Clickable button 2|answered=yes}}

ANiMOP (talk) 02:14, 18 November 2017 (UTC)

I want to add the necessary colors i did that in the arabic-wikipedia module page

:File:Red question icon with gradient background.svg Not done: it's not clear what changes you want to be made. Please mention the specific changes in a "change X to Y" format. — JJMC89(T·C) 08:01, 18 November 2017 (UTC)

Allowing same colors on other templates

Would it be possible to add the class parameter for the same colors used in this template to :Template:Drop down list? Thanks! Daylen (talk) 04:45, 24 April 2018 (UTC)

Adding images inside buttons?

Is there any way to include images inside of a button? Just trying to insert a file normally breaks it. Sdkb (talk) 17:24, 26 March 2020 (UTC)

:yes, :commons:Template:Clickable button 2 allows adding image with the button. - Vis M (talk) 12:09, 23 June 2021 (UTC)

Small buttons on mobile browsers

Copying from my talk page, {{u|Moxy}} has reported that these buttons can show up as very small on their mobile browser. Is this an issue experienced by others, and if so, is there a fix? Sdkb (talk) 17:32, 26 March 2020 (UTC)

File:Screen shot of mini call to action button.jpg|this is what the button looks like to the majority of our readers. - Moxy

File:Screen shot of Help,Introduction.jpeg| - Moxy

File:Streamlined_welcome_mobile_screenshot.jpg|How it displays for me. - Sdkb (talk)

:I see your still trying to push action buttons with no actions to them. The problem is that it's doing the opposite of what your wishing for...60 percent of readers see it as a small mini button that's barely legible..... and is why so many people have accessibility concerns let alone the wrong type of link to go to the next page with no action.--Moxy 🍁 00:47, 10 March 2020 (UTC)

::Here is how it displays on my mobile device. I'm not sure what's causing it to display as so small for you or how typical that is, but if it is frequent, that's reason to improve the code at Template:Clickable button 2, as buttons can be a useful tool and appear throughout Wikipedia. Sdkb (talk) 01:15, 10 March 2020 (UTC)

Option for buttons to open in new tab/window, rather than directly?

Is there a parameter that can be used for this, and if not, could one be added? {{u|Sdkb}}talk 21:12, 14 June 2020 (UTC)

Fully-protected edit request (TfD)

{{FPER|answered=yes}}

I'm going WP:BOLD and listing the template at WP:TfD for a merger with with the other clickable button, Template:Clickable button. Could an admin add the TfD notice to it? --littleb2009 (she/her) (talkcontribs) 00:21, 18 June 2021 (UTC)

P.S. Since I don't want anyone to break Wikipedia, remember to use tags!

{{nar}} Deactivating my edit request because an admin answered it at the TfD itslf. --littleb2009 (she/her) (talkcontribs) 23:22, 18 June 2021 (UTC)

ooui buttons

See [https://design.wikimedia.org/style-guide/components/buttons.html WMF style guide for buttons] and [https://doc.wikimedia.org/oojs-ui/master/demos/?page=widgets&theme=wikimediaui&direction=ltr&platform=desktop#demo-section-buttons ooui demo].

Also, I feel that the button radius should be increased to 4px. Currently it is 2 px for this template. Earlier it was 4 px and looked better. - Vis M (talk) 12:28, 22 June 2021 (UTC)

Protected edit request on 9 November 2021

{{edit fully-protected|Module:Clickable button 2|answered=y}}

Merge with Module:Clickable button 2/sandbox Module:Clickable button 2/sandbox to effect {{slink|Wikipedia:Templates for discussion/Log/2021 June 18#Template:Clickable button}}. I have made several changes to the module:

  • Fixing a bug with mw-ui-constructive that would make the text color black ([https://web.archive.org/web/20211109233002/https://en.wikipedia.org/wiki/Template:Clickable_button_2/testcases#Same_page_constructive view here])
  • Adding a new parameter called {{para|link}} that when set to {{code|no}} will result in the button not becoming a link
  • A bit of hacking was involved to fix a certain bug caused when {{para|url}} is set to a link without {{para|1}} or {{para|2}} being set when {{para|link|no}} is set).
  • The {{para|color}} from the current {{tl|Clickable button}} has been added for backwards compatibility
  • NOTE: How each of these templates handle the former green button differs. That difference has not been resolved here for ease of transition.
  • {{para|color}} only works if {{para|class}} is not set. This is because {{tlf|clickable button}} did not support {{para|class}}. If both are set, then {{para|class}} takes precedence even if the class would not change the button color.
  • While {{para|1}} can be set to something like {{code|Foobar}} with the template still functioning, if it contains a pipe there were be unintended results. ([https://web.archive.org/web/20211109233002/https://en.wikipedia.org/wiki/Template:Clickable_button_2/testcases#brackets_and_pipe_in_label view here])
  • This is one of only major blocks to the current merger but could be solved without using Lua (like regex replacements via WP:AWB)

I worked really hard on this, and I have extensively tested to see if there were any problems. This is a highly visible template, so I half-expecting this request to be denied for procedural reasons (convention tells me these things aren't accepted without serious review). –MJLTalk 23:46, 9 November 2021 (UTC)

:Is the desired end result that both templates will use this same code? — Martin (MSGJ · talk) 18:01, 10 November 2021 (UTC)

::Yes –MJLTalk 19:29, 10 November 2021 (UTC)

:I see . Would it be more efficient to do ? — Martin (MSGJ · talk) 18:18, 10 November 2021 (UTC)

::Probably, but currently I just have the template wrap span:plainlinks just in case.

:In the "No link" test, would a blank output be more logical in this case, like the live version does? — Martin (MSGJ · talk) 18:19, 10 November 2021 (UTC)

::Oh dear, that result should've been identical to {{Clickable button 2/sandbox|2=Foo|link=no}}. I need to change that. –MJLTalk 19:32, 10 November 2021 (UTC)

:::I've marked this as answered for now and will reopen once that's fixed. –MJLTalk 19:33, 10 November 2021 (UTC)

:In the "URL placed as label" scenario, can/should the square brackets be removed from the output? — Martin (MSGJ · talk) 18:32, 10 November 2021 (UTC)

::They should, but I have not been able to think of a solution to that. –MJLTalk 19:28, 10 November 2021 (UTC)

:::Thanks for the quick answers. Great job, by the way! — Martin (MSGJ · talk) 22:11, 10 November 2021 (UTC)

::::{{re|MSGJ}} Of course! The issue has now been fixed.
I also added a new class called "clickbutton" just in case we want to do something with that (if the {{tag|span}} is already going to be there).
{{(:}} –MJLTalk 07:04, 11 November 2021 (UTC)

:::::Looks good. I share the perplexity of commenters in the TfD about why we would ever want a button which is not clickable. Especially a button which changes color when you hover over it, which makes it look clickable. This is not a holdup to implementation but why do we need this feature? — Martin (MSGJ · talk) 07:56, 11 November 2021 (UTC)

::::::It's nice for demonstrative purposes. I actually found out about this merger when I was using {{tl|clickable button}} in this thread. –MJLTalk 17:59, 11 November 2021 (UTC)

:::::::{{done}}. Sorry I forgot about this — Martin (MSGJ · talk) 12:31, 16 November 2021 (UTC)

:{{od|::::::}}

:{{Re|MSGJ|MJL}} This edit has caused a problem at Help:Introduction. The buttons there are supposed to take the reader to pages such as Help:Introduction to editing with Wiki Markup/1, but today they have lost the trailing number, jumping to non-existent pages such as Help:Introduction to editing with Wiki Markup/ -- John of Reading (talk) 18:10, 16 November 2021 (UTC)

::{{re|John of Reading|MSGJ}} Reverting to Special:Permalink/1055585062 this which removed the valuefunc will fix the issue. I'm going to have to investigate why it that sequence won't pick up anything after a '/'. I'm incredibly sorry about that.. {{\:}} –MJLTalk 18:22, 16 November 2021 (UTC)

:::Fixed now at least thanks to {{u|Izno}} responding quickly. {{love}} –MJLTalk 18:28, 16 November 2021 (UTC)

[[:Category:Pages using old style ui-button-color]] is no longer useful

There are two pages left in :Category:Pages using old style ui-button-color:

both of these usages of "old style ui-button-color" are in the discussions about this usage. Also, both discussions mention the category itself. Because there are no more usages of "old style ui-button-color" in the wild, I propose the categorization into this tracking category be removed from Module:Clickable button 2 and the category then can be deleted. —⁠andrybak (talk) 11:53, 8 October 2022 (UTC)

:@Andrybak, I've made this change, so they should end up removed from the category sometime Soon. Feel free to {{tl|db-g8}} the category whenever it's actually empty. Izno (talk) 08:29, 29 June 2023 (UTC)

Edit Request Module Borked

{{Ping|Primefac}} When a person makes an edit request, due to luaMain being removed, they see "Lua error in Module:Submit_an_edit_request at line 118: attempt to call field 'luaMain' (a nil value)." Because this is being called in Module:Submit_an_edit_request. I'm not sure if this is just part of staging for the move or an unintentional thing, but it seems significant. Sagflaps (talk) 22:51, 23 February 2024 (UTC)

:Looks like you and Izno took care of the issue; thanks to both. One can only sandbox so much before going live! Primefac (talk) 07:24, 24 February 2024 (UTC)

Edit request 24 February 2024

{{edit fully-protected|Module:Clickable button 2|answered=yes}}

Description of suggested change: Please revert [https://en.wikipedia.org/w/index.php?title=Module:Clickable_button_2&diff=prev&oldid=1209820386 this edit]

Reason: This change seems to have broken system messages which invite users to submit edit requests (Module:Submit an edit request depends on Module:Clickable button 2). See Template:Submit an edit request for an example of the Lua error that is getting displayed when someone views the source of a page they don't have the necessary permissions to edit. {{small|pinging {{u|Primefac}} for your info.}} All the best, ‍—‍a smart kitten[meow] 01:03, 24 February 2024 (UTC)

:I'd advise you to withdraw this, as there's a edit request that should unbreak this without reverting a huge edit at Template talk:Submit an edit request. Queen of Hearts (talkstalk • she/they) 01:18, 24 February 2024 (UTC)

::@Queen of Hearts: I'm torn - on the one hand, the other edit request will (hopefully) fix things with just a small change. On the other hand, part of me thinks it might be better to revert the change in this module (to the last known stable version) as a precaution, given the issue that's been noticed as a result of it. As my understanding of Lua is fairly limited, I don't have the technical knowledge to be able to understand all of the changes made in the most recent edit to this module myself - therefore, part of me thinks it might be better to leave this request open, and leave it to the responding admin to decide which edit to implement. All the best, ‍—‍a smart kitten[meow] 01:33, 24 February 2024 (UTC)

:File:Red information icon with gradient background.svg Not done: I took care of the other one and would hate for someone else to process this one. I will check to see if there are other uses of the module. Izno (talk) 01:53, 24 February 2024 (UTC)