Template talk:Clickable button
| This template does not require a rating on Wikipedia's content assessment scale. It is of interest to the following WikiProjects: | ||||||||
| ||||||||
Assistance
[edit]Hi @Hike395, I was wondering, I literally learnt Lua the past three hours just so I could write this module's sandbox Module:Clickable button/sandbox, now I've tried my best, but I get the error seen at Template:Clickable button/testcases which calls the module directly. Can you help in any way? It's basically gonna do the same thing as Module:Clickable button but instead use the classes etc. to make a Codex fake button since mw-UI is in maintenance mode and will soon be deprecated.
Could you assist? 😄 waddie96 ★ (talk) 23:19, 13 September 2025 (UTC)
- Wait managed to fix it waddie96 ★ (talk) 23:26, 13 September 2025 (UTC)
- Is there any chance you could assist me in checking it operates properly? I seem to have one or two cases it doesn't work and struggling to fix them;. waddie96 ★ (talk) 07:54, 14 September 2025 (UTC)
- All fixed now it seems! waddie96 ★ (talk) 06:59, 17 September 2025 (UTC)
- Is there any chance you could assist me in checking it operates properly? I seem to have one or two cases it doesn't work and struggling to fix them;. waddie96 ★ (talk) 07:54, 14 September 2025 (UTC)
Merge /sandbox update – Change to use Codex button
[edit]Hi there, I plan to make an edit request to merge the /sandbox module. I've tried my best at my first Lua go, and I think I've ironed everything out. Throwback to my assembly and BASIC days as a child 🧒 then I chose a different career path. So the concepts were all there, I just didn't know how to put it into the Lua scripting language. Anyway, got it. Just need to check all use-cases.
I recommend we upgrade to Codex since OOUI is not deprecated per se, but there's a notice in the debug/console browser log to say that it is and that the devs who are using the components in their MediaWiki core code should change: This page is using the deprecated ResourceLoader module "mediawiki.ui.button". [1.41] Please use Codex. See migration guidelines: https://www.mediawiki.org/wiki/Codex/Migrating_from_MediaWiki_UI.
In addition, could someone watching this please also just have a squizz through the code and give tips/feedback. I'd appreciate it! waddie96 ★ (talk) 22:15, 17 September 2025 (UTC)
- Thank you for using the sandbox and the testcases page. Please convert these test cases to use the normal test case templates so that there is a standardized way to compare the behavior of the live and sandbox templates. The format used for the test cases at the bottom of the page is a good one. Convert the ";" markup to real headers so that test cases can be linked from discussions. – Jonesey95 (talk) 14:10, 18 September 2025 (UTC)
- Yeah I will, I'm just not done checking the output of the sandbox yet. waddie96 ★ (talk) 15:14, 18 September 2025 (UTC)
- You can use the case number to refer to them waddie96 ★ (talk) 15:14, 18 September 2025 (UTC)
- Not all cases have numbers. Some have letters. Please just use regular headers, and make sure that a test case template is used. – Jonesey95 (talk) 16:28, 18 September 2025 (UTC)
- Nice work with the /testcases updates. When you have the /sandbox working as well as or better than the live template, post again here asking for feedback and explain the changes you have made. – Jonesey95 (talk) 19:58, 18 September 2025 (UTC)
- Anyone who is watching this page, the module Module:Clickable button/sandbox is done. If you'd like to check out the Template:Clickable button/testcases waddie96 ★ (talk) 18:47, 22 September 2025 (UTC)
- The sandbox versions of the "URL button" test cases appear to be broken. The "Disabled via parameter" test clicks through to example.org; is that intentional? Why would a disabled button work? That is as far as I got on the page. – Jonesey95 (talk) 01:41, 23 September 2025 (UTC)
- Yeh, I messaged and then decided to overhall for performance 🙈 so it has been messy whilst I've been editing it in an external code editor (CodeMirror is terribly slow, laggy, no IntelliSense, no symbol editor, no language server etc. etc.) waddie96 ★ (talk) 04:29, 23 September 2025 (UTC)
- I'm done now, #Disabled via parameter is working now. waddie96 ★ (talk) 04:30, 23 September 2025 (UTC)
- And it was because I was in the middle of resolving for the '1' as a boolean rather than a string, since Module:Arguments wasn't resolving it with something like Module:Yesno as I thought it would. Sorted now though waddie96 ★ (talk) 04:31, 23 September 2025 (UTC)
- There are three nonexistent categories on the testcases page as well as Category:Pages using duplicate arguments in template calls, which should be fixed. I have to go on a short wikibreak; I will leave it to others to provide more feedback. Is there an explanation somewhere of the new parameters? Existing parameters should be in the test cases as well, if changing the way they work is being proposed. – Jonesey95 (talk) 05:34, 23 September 2025 (UTC)
- The non existent categories are from me testing the
|category=argument which is a legacy parameter that categorizes the button into a custom category, we can ignore it, but that’s why they’re there. Yes the doc for the new module I made at c:Module:Clickable button/doc. Sorry should have linked that. The duplicate calls is probably from the fact that I tweaked that the testcases compare the current module with an older version from 2 days ago instead of the current live module. I’ll swop it back. waddie96 ★ (talk) 07:13, 23 September 2025 (UTC)- Five examples from live templates can be seen on the testpage. My issue/gripe is the gigantic buttons that the Wiktionary redirect templates have created. It's ridiculous! The limit on button size/contents is 40 characters or less, but in addition buttons aren't supposed to be used for links that navigation you to another page, that is what a link is for. They're meant to be for actions such as replying to acomment or starting a new comment. Like the 'Reqeust edit' edit-protected template button.
- I've had to implement a new class
.cdx-button--word-wrapfor backward compatibility to apply to these cases so they fit, but I don't want to enable it by default as this interferes with the developers' design/aim/style system. It wont' mess with their buttons on the screen, however, since this button's CSS selectors do are specific enough to select elements created by this template only. - The
.cdx-button--word-wrapclass changes the following attributes:max-width: none; white-space: normal; word-wrap: break-word;and should only be implemented if updating all the transclusions is prohibitive/improbable/unrealistic. Anyway, the module will have to detect what template is transcluding it, and pass this class to its parent element when it's transcluded onto one of those templates. Since this template can't pass the class as I see on it's /doc page it's substituted (??). waddie96 ★ (talk) 08:23, 23 September 2025 (UTC) - See the design system specifications for a button from Codex at their documentation site. waddie96 ★ (talk) 08:23, 23 September 2025 (UTC)
- I'm making a breaking change. waddie96 ★ (talk) 23:00, 29 September 2025 (UTC)
- Ready for merge. waddie96 ★ (talk) 08:48, 23 October 2025 (UTC)
- I'm making a breaking change. waddie96 ★ (talk) 23:00, 29 September 2025 (UTC)
- The non existent categories are from me testing the
- There are three nonexistent categories on the testcases page as well as Category:Pages using duplicate arguments in template calls, which should be fixed. I have to go on a short wikibreak; I will leave it to others to provide more feedback. Is there an explanation somewhere of the new parameters? Existing parameters should be in the test cases as well, if changing the way they work is being proposed. – Jonesey95 (talk) 05:34, 23 September 2025 (UTC)
- The sandbox versions of the "URL button" test cases appear to be broken. The "Disabled via parameter" test clicks through to example.org; is that intentional? Why would a disabled button work? That is as far as I got on the page. – Jonesey95 (talk) 01:41, 23 September 2025 (UTC)
- Anyone who is watching this page, the module Module:Clickable button/sandbox is done. If you'd like to check out the Template:Clickable button/testcases waddie96 ★ (talk) 18:47, 22 September 2025 (UTC)
- Nice work with the /testcases updates. When you have the /sandbox working as well as or better than the live template, post again here asking for feedback and explain the changes you have made. – Jonesey95 (talk) 19:58, 18 September 2025 (UTC)
- Not all cases have numbers. Some have letters. Please just use regular headers, and make sure that a test case template is used. – Jonesey95 (talk) 16:28, 18 September 2025 (UTC)
Dead Link
[edit]The "Wikimedia design style guide advice on buttons" in See Also is a {{deadlink}} 26 January 2026 — Preceding unsigned comment added by ~2026-57352-9 (talk) 22:46, 26 January 2026 (UTC)
- So it is. Thanks. Primefac (talk) 21:14, 1 February 2026 (UTC)
"quiet" button design
[edit]I do not know whether there are plans for this template to support button design according to Codex: "Using links and buttons". Wikimedia Open Source. Retrieved October 16, 2025.
But if so, please note that something has gone wrong. Codex presents three button weights as equal: Primary, Normal and Quiet.
Please note that the Quiet weight design makes the button not look like a button. Please consider never implementing this. Designs that require users to hover above the element to understand their purpose and function fails basic interaction criteria. I'm hoping the quiet design in reality is special purpose and the weak link here is only the presentation/documentation.
Regards, CapnZapp (talk) 20:22, 31 March 2026 (UTC)