Template talk:Clickable button 2
This is the talk page of a redirect that targets the page: • Template:Clickable button Because this page is not frequently watched, present and future discussions, edit requests and requested moves should take place at: • Template talk:Clickable button |
Template:Clickable button 2 is permanently protected from editing because it is a heavily used or highly visible template. Substantial changes should first be proposed and discussed here on this page. If the proposal is uncontroversial or has been discussed and is supported by consensus, editors may use {{edit protected}} to notify an administrator to make the requested edit. Usually, any contributor may edit the template's documentation to add usage notes or categories.
Any contributor may edit the template's sandbox. Functionality of the template can be checked using test cases. |
Archives: 1 |
|
Template-protected edit request on 18 November 2017
[edit]This edit request to Module:Clickable button 2 has been answered. Set the |answered= or |ans= parameter to no to reactivate your request. |
ANiMOP (talk) 02:14, 18 November 2017 (UTC)
I want to add the necessary colors i did that in the arabic-wikipedia module page
- 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)
Is it possible to create a button that opens the link in a new page?
[edit]Hi
Is it possible to create a button the opens the link in a new page? I'm working on something that needs someone to go to another page but I really want to keep the page with button open as well.
Thanks
John Cummings (talk) 09:55, 21 February 2018 (UTC)
- @John Cummings: HTML the target attribute (
<a href="..." target="_blank">
) opens links in new tabs or windows. If this is what you are referring to by "new page", then it is not possible using wikitext.If you want a "Create [input box] article" function, see Extension:InputBox. — Dispenser 14:00, 10 March 2018 (UTC)
- Thanks very much @Dispenser:. John Cummings (talk) 14:50, 10 March 2018 (UTC)
- @John Cummings and Dispenser: I would also find it very useful to have a parameter that'd allow a button to open a page in a new window. Would there be a way to add such a parameter? Sdkb (talk) 06:09, 11 March 2020 (UTC)
- It is not possible to specify attributes for link tags. This could be worked around with JavaScript, but honestly browser makers should just improve navigation. — Dispenser 17:40, 15 March 2020 (UTC)
Allowing same colors on other templates
[edit]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?
[edit]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
[edit]Copying from my talk page, 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)
-
this is what the button looks like to the majority of our readers. - Moxy
-
- Moxy
- 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?
[edit]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)
[edit]This edit request has been answered. Set the |answered= or |ans= parameter to no to reactivate your request. |
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) (talk • contribs) 00:21, 18 June 2021 (UTC)
P.S. Since I don't want anyone to break Wikipedia, remember to use <noinclude></noinclude> tags!
(non-admin reply) Deactivating my edit request because an admin answered it at the TfD itslf. --littleb2009 (she/her) (talk • contribs) 23:22, 18 June 2021 (UTC)
ooui buttons
[edit]See WMF style guide for buttons and 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]This edit request to Module:Clickable button 2 has been answered. Set the |answered= or |ans= parameter to no to reactivate your request. |
Merge with Module:Clickable button 2/sandbox Module:Clickable button 2/sandbox to effect 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 (view here)
- Adding a new parameter called
|link=
that when set tono
will result in the button not becoming a link- A bit of hacking was involved to fix a certain bug caused when
|url=
is set to a link without|1=
or|2=
being set when|link=no
is set).
- A bit of hacking was involved to fix a certain bug caused when
- The
|color=
from the current {{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.
|color=
only works if|class=
is not set. This is because {{clickable button}} did not support|class=
. If both are set, then|class=
takes precedence even if the class would not change the button color.
- While
|1=
can be set to something like[[Foobar]]
with the template still functioning, if it contains a pipe there were be unintended results. (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). –MJL ‐Talk‐☖ 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)
- I see <span class="plainlinks"><span class="mw-ui-button">. Would it be more efficient to do <span class="plainlinks mw-ui-button"> ? — 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 MJL ‐Talk‐☖ 19:32, 10 November 2021 (UTC)
- I've marked this as answered for now and will reopen once that's fixed. –MJL ‐Talk‐☖ 19:33, 10 November 2021 (UTC)
. I need to change that. –
- Oh dear, that result should've been identical to MJL ‐Talk‐☖ 19:32, 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. –MJL ‐Talk‐☖ 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)
- @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<span>...</span>
is already going to be there).
–MJL ‐Talk‐☖ 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 {{clickable button}} in this thread. –MJL ‐Talk‐☖ 17:59, 11 November 2021 (UTC)
- Done. Sorry I forgot about this — Martin (MSGJ · talk) 12:31, 16 November 2021 (UTC)
- It's nice for demonstrative purposes. I actually found out about this merger when I was using {{clickable button}} in this thread. –MJL ‐Talk‐☖ 17:59, 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)
- @MSGJ: Of course! The issue has now been fixed.
- Thanks for the quick answers. Great job, by the way! — Martin (MSGJ · talk) 22:11, 10 November 2021 (UTC)
- They should, but I have not been able to think of a solution to that. –MJL ‐Talk‐☖ 19:28, 10 November 2021 (UTC)
- @MSGJ and 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)
- @John of Reading and 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.. –MJL ‐Talk‐☖ 18:22, 16 November 2021 (UTC)
Category:Pages using old style ui-button-color is no longer useful
[edit]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 {{db-g8}} the category whenever it's actually empty. Izno (talk) 08:29, 29 June 2023 (UTC)
Edit Request Module Borked
[edit]@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]This edit request to Module:Clickable button 2 has been answered. Set the |answered= or |ans= parameter to no to reactivate your request. |
Description of suggested change: Please revert 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. pinging 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 (talk • stalk • 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)
- 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)