Module:Userbox is part of WikiProject Userboxes. This means that the WikiProject has identified it as part of the userboxes system. WikiProject Userboxes itself is an attempt to improve, grow, and standardize Wikipedia's articles and templates related to the userbox system, used on many users' pages. We need all your help, so join in today!UserboxesWikipedia:WikiProject UserboxesTemplate:WikiProject UserboxesUserboxes
Template-protected edit request on 4 January 2015
This edit request has been answered. Set the |answered= parameter to no to reactivate your request.
The second userbox is too wide due to its thick border. The third, however, compensates correctly.
Userboxes created with {{Userbox-2}} or {{Userbox-r}} are too wide if the specified border size is greater than 1px. Likewise, they are too narrow if the specified border size is zero. This bug is readily apparent in columns of multiple userboxes, as in the example floating to the right of this thread. It has already been fixed for {{Userbox}} with lines 79 and 82 of the module code:
Not done: please make your requested changes to the module's sandbox first; see WP:TESTCASES. I had all the border stuff working well when it was a template. I'm not sure when or why it was all converted to lua, but please make the changes in the sandboxes and add any appropriate testcases and I'll be happy to look them over and make the changes. — {{U|Technical 13}} (e • t • c)12:52, 4 January 2015 (UTC)[reply]
Technical 13, I'm still new to the modules namespace and still learning to use the sandboxes and testcases. I have implemented my changes in the sandbox. The testcases look good. In full disclosure, I had to make a couple fixes or updates to the testcases. Please check those changes as well to ensure that I didn't cheat the testcases in any way. Thanks again! – voidxor(talk | contrib)07:17, 6 January 2015 (UTC)[reply]
Note: I'm not particularly well versed in Lua either, so I prefer to leave these to other template editors that are. I know though that things like this should always be sandbox tested before being implemented. I'm reopening this request so a Lua knowledgeable template editor might be attracted to look it all over and implement it. Good luck! — {{U|Technical 13}} (e • t • c)14:05, 6 January 2015 (UTC)[reply]
I do have a question though... borderWidthNum = checkNum(args[9] or args['border-s'], 1) -- what's the default if those args aren't set? data.width = addSuffix(240 - 2 * borderWidthNum, 'px') requires the parameter to be set. How gracefully with the code fail if the borderWidthNum >= 120? How graciously will if fail if defined as 0 or < 0? — {{U|Technical 13}} (e • t • c)14:11, 6 January 2015 (UTC)[reply]
I've added Kephir's requested changes (before I saw WOSlinker's comment), but what WOSlinker says makes sense, so feel free to update the module again or reactivate the protected edit request as necessary. — Mr. Stradivarius♪ talk ♪08:57, 6 September 2015 (UTC)[reply]
@Kephir and WOSlinker: I've done some refactoring of the code in the sandbox so that the category code is separated out from the rendering code, and to remove the dependency on Module:Category handler. Any objections to me updating the module with it? I've also changed the module to only activate Category:Potentially illegible userboxes on user subpages, in the template namespace, and in the Wikipedia namespace. (Are there any other namespaces in which userbox templates reside?) — Mr. Stradivarius♪ talk ♪07:05, 9 September 2015 (UTC)[reply]
@WOSlinker: Which page(s) are you seeing this at? I just tested a couple of subpages of User:UBX at random and they seem to be working ok, plus I added some test cases for user subpage categories. If there's a problem with User:UBX pages then I'm not seeing it. — Mr. Stradivarius♪ talk ♪08:37, 9 September 2015 (UTC)[reply]
I was just wondering if the UBX pages should be categorised the same as templates: elseiftitle.namespace==10or(title.namespace==2andtitle.rootText~='UBX')then ? -- WOSlinker (talk) 09:31, 9 September 2015 (UTC)[reply]
Layout table edit request on 11 July 2016
This edit request has been answered. Set the |answered= parameter to no to reactivate your request.
Users of assistive technologies will get simpler, less confusing output. For me, "Table with two columns and one rows, TS This user likes Taylor Swift, table end" becomes just "TS This user likes Taylor Swift".
This edit request has been answered. Set the |answered= parameter to no to reactivate your request.
As Chinese Wikipedian, the .content table class may cause unexpected result on mobile page when you look at the user page, in this case every user box would display an unused whitespace at the top. You need make the following modify to fix:
Currently this puts any pages transcluding potentially illegible userboxes in the category as well, making the backlog seem bigger than it is and making it hard to go through it.
nyuszika7h (talk) 10:29, 6 September 2016 (UTC)[reply]
@MSGJ: If a user page calls {{userbox}} itself with non-compliant colors, it would be categorized, otherwise only the userbox templates, which is the intended effect, as the problem in the latter case needs to be fixed in the templates, not the user pages. @Izno:Done. – nyuszika7h (talk) 11:53, 6 September 2016 (UTC)[reply]
Please revert the change for now, as it's broken, categorizes regardless and causes "<noinclude></noinclude>" to show up on illegible userboxes. I should have tested it, but I didn't think of using {{Userbox/sandbox}} to use the sandbox version of the module (though I've done so with another template before). I'm trying there now, but no success so far, so for now the change should be just reverted. nyuszika7h (talk) 13:13, 10 September 2016 (UTC)[reply]
This edit request has been answered. Set the |answered= parameter to no to reactivate your request.
Currently, module Userbox supports up to three user categories. I suggest to upgrade the Userbox module to support up to five user categories. There are already userboxes, which pass five parameters, e.g. Template:User London. —andrybak (talk) 21:51, 21 August 2018 (UTC)[reply]
Template-protected edit request on 20 October 2018
This edit request has been answered. Set the |answered= parameter to no to reactivate your request.
Replace all instances of 240 with (args['wide'] and 482 or (args['small'] and 119 or 240)) or just replace the live version with the sandbox version. These edits allow for the use of |wide= which makes the userbox double the width of a normal userbox and |small= which make the userbox half the width of a normal userbox.
Not done: I'm neutral on the change (only a slight complication, but also doesn't appear to be used much/have a lot of utility) but since Zackman has opposed the change please gain a consensus before requesting a template-protected edit. Galobtter (pingó mió) 11:01, 24 October 2018 (UTC)[reply]
@Zackmann08 and Galobtter:, this change is useful because it would add more options to Template:Userbox-w (with 88 transclusions) sure it's not a lot but it's not a lot of code either. It also provides unification between user boxes of different sizes. I'm not sure it adds that much complexity (Zackmann08) and as making a custom user box would break the fact that this module is meant to unify user boxes. – BrandonXLF(t@lk)12:47, 24 October 2018 (UTC)[reply]
I noticed that the template pages transcluding Template:Userbox themselves are being placed into the user categories as opposed to user pages transcluding the templates only. (For example, Template:User de-1 is wrongly placed into Category:User de-1.) I propose that {{User other}} be used to limit the categorization to user pages only, but, not being proficient in lua, I'm not sure whether it should be implemented here in the module or at Template:Userbox. Could someone provide assistance? --Bsherr (talk) 21:01, 29 October 2018 (UTC)[reply]
It's deliberate that it includes the template in the category. For the odd occasions where it's not wanted, it can be removed by wrapping the category inside includeonly tags on that template, for example | usercategory=<includeonly>User de-1</includeonly>. It should however be setting the category sort so that it is shown at the start of the list rather than mixed in the middle. The documentation for Template:User de-1, which is at Template:User x/doc was setting a different sort value. I've update that code to set the correct sort, so now when you look at Category:User de-1, you'll see the template at the start of the list. -- WOSlinker (talk) 22:47, 29 October 2018 (UTC)[reply]
Font size
I'm not 100% sure I'm reading the code of the module correctly, but it seems like it hardcodes the font sizes for the userboxes. As part of our accessibility guidelines, WP:FONTSIZE specifies that hould be done as a percentage of the original font size and not as an absolute size. This improves accessibility and cross-platform usability. Moreover, the font size should never go below 85% of the page's default font size, and (again, correct me if I'm wrong--I'm not very familiar with Lua), but I think I see at least one place that hardcodes for an 8 pt font size, which is well below 85% of Vector's default of 11.9 pt. Can someone more experienced with Lua than I am chime in here and we can brainstorm some fixes? Cheers!! cymru.lass (talk • contribs) 02:50, 17 December 2018 (UTC)[reply]
Only add "Category:Userboxes with insufficient color contrast" to userboxes in template namespace?
Category:Userboxes with insufficient color contrast currently includes every page that transcludes a problematic userbox, instead of only the userboxes themselves (see edit request above). This reduces the category's usability to find the actual userboxes. Would a suitable solution be to only add the category for pages in the Template: namespace (which would leave out userboxes in the User: namespace, but should remove most the false positives)? –Sonicwavetalk23:09, 23 August 2019 (UTC)[reply]
An issue with this approach is that a lot of userboxes are in User namespace, like {{User:UBX/Blacksmithing}}. We could, for example, not categorize top-level user pages, like User:Example. But this would mean that subpages with userboxes (like User:Example/Userboxes) will still be categorized. I don't know how prevalent is placement of userboxes in subpages. I would guess that excluding top level user pages should take care of most of problematic categorization. —andrybak (talk) 23:17, 23 August 2019 (UTC)[reply]