Module talk:RoundN

Check request

 * - Would you guys please take a look at this? As this is my third module, the module could probably benefit from your experienced eyes to spot potential bugs and ideas for improving the new features. The rendering of Round16 and Round8 are nearly identical, I think; I have not attempted to emulate the spacing of Round2 and Round4 but I don't see a good reason to display them exactly as long as the information conveyed is the same... perhaps those templates would benefit from standardization/a more compact form? What do you think? —CodeHydro 02:26, 2 January 2015 (UTC)

Byes
Two byes to a match leave a black line to the next round, see

-Koppapa (talk) 11:25, 6 January 2015 (UTC)

✅ Ha, I had actual set up my code to detect when both matches are skipped so I could remove the line. Silly me forgot to implement it! Good catch! Anyhow, while I was at it, I came up with a neat shorthand for skipmatch and also extended it beyond the first round. See Module talk:RoundN/testcases/3. Thanks again! —CodeHydro 03:44, 8 January 2015 (UTC)

Comments
It looks quite good to me. I haven't seen, that somebody would use colors, but ok - as a feature it is ok. You could get some input from WT:FOOTIE, as those templates are usually used by them. -- Edgars2007  (talk/contribs) 09:15, 3 January 2015 (UTC)

Please read before asking for seeds
RoundN is intended to replace templates like Template:Round16 which never used seeds. For seeds, use Module:TeamBracket. While it's hardly a challenge to add them, my thinking is that adding a check for seeds is more of a performance drag than helpful since there is already a module that supports them. As much as I want to make accommodate every possible need, the fact is too many features will slow down the module. Slow module = more servers resources used = more ad campaigns for donations = less pleasant wiki and slower page loads. Yes, this module does fancy things that Team bracket currently can't, like auto-bolding and score-summing, but these features save server resources because the mediawiki engine no longer has to parse wikibold markup in each parameter and Lua is more efficient at string processing. (If you want these features with seeds, let TeamBracket's programmers know that they may use RoundN's score cleaning/processing functions by adding  to their code.)  —CodeHydro 17:08, 27 January 2015 (UTC)

More compact
Could it be possible to reduce a line the distance between the title of the rounds and the first match box? There is too much space between both. Asturkian (talk) 08:00, 29 January 2015 (UTC)

BTW, you should add in the documentation, the information about  and the possibility of 2+sum. Asturkian (talk) 09:09, 29 January 2015 (UTC)
 * Sorry for the delayed respond. I didn't see the question until just now. I'm assuming you've left the date/place box blank, which would make it appear as though there were a big gap between the title and the first match. A simple work around could be to put an empty span tag as the first date parameter, which would minimize the size of the first date row. As for documenting the   switch, that is a beta feature which is not officially released. The documentation will be updated when Beta goes live.  —CodeHydro 12:49, 24 March 2015 (UTC)


 * How does the score-boxes parameter work? <i style="font-family:Sans-serif"><b style="color:blue">QED</b><b style="color:red">237</b>&#160;<b style="color:green">(talk)</b></i> 16:20, 23 March 2015 (UTC)
 * Though I hate to do this, I must hold off on explaining it until the official release of Beta. Been working on a higher priority project so I haven't even touched RoundN since January (RoundN is expected to be used on a few thousand pages at most; the higher priority module is used on 2 million pages). Sorry, but, for now, you'll have to make do by studying Module talk:RoundN/testcases/4, Module talk:RoundN/testcases/5, and Module talk:RoundN/testcases/6 on your own. Very overwhelmed with work lately... and though I'm pretty fast at writing code, I'm awful slow when it comes to explaining it. (In fact, Beta has been 95% ready, but just updating the doc page would probably take me a couple of weeks... and it's probably going to be a while before I even get back to RoundN). —<b style="color:#aaaaaa; font-family:Unicode; font-size:12pt;">Code</b><b style="color:#5577aa">Hydro</b> 12:49, 24 March 2015 (UTC)


 * Okay, no problem. I just wanted to check it had not been forgotten. Take your time. <i style="font-family:Sans-serif"><b style="color:blue">QED</b><b style="color:red">237</b>&#160;<b style="color:green">(talk)</b></i> 14:38, 24 March 2015 (UTC)

Chess
Used it here. It bolds ½ over 1½. Is there a way to change that automatically? Or is manually bolding the way to go? If non-numbers are removes, shouldn't be 1 be bold over nothing? -Koppapa (talk) 17:07, 17 March 2015 (UTC)
 * I see you came up with a workaround on your own. I may have suggested something like sort, but your way seems to work just fine. The release of beta will have way to customize how scores are "cleaned" but alas Module:RoundN has been on hold because I have other priorities right now —<b style="color:#aaaaaa; font-family:Unicode; font-size:12pt;">Code</b><b style="color:#5577aa">Hydro</b> 13:32, 24 March 2015 (UTC)

Error with third place
Hello again. I was trying to export this module to the 2014–15 LKL season article (for making a 5-5-7 playoffs) and I found the third place series are not well displayed. Is there any way to fix it? Asturkian (talk) 21:17, 19 April 2015 (UTC)

Display one team in node
Hi, I know you are probably busy but is there a way to display only one team in a node at the same time you have scoreboxes? It does not seem to work when testing in User:Qed237/sandbox5. On WT:FOOTY It was requested a bracket that involves teams that can play after being eliminated. <i style="font-family:Sans-serif"><b style="color:blue">Qed</b><b style="color:red">237</b>&#160;<b style="color:green">(talk)</b></i> 13:53, 6 July 2015 (UTC)
 * Hmm, well there is a way.. .but why would you need score boxes for team by itself? Why not use something like Module_talk:RoundN/testcases/6--i.e., the losing teams are in a separate branch? I don't see a situation how a team by itself with no other team can score anything. —<b style="color:#aaaaaa; font-family:Unicode; font-size:12pt;">Code</b><b style="color:#5577aa">Hydro</b> 01:43, 10 July 2015 (UTC)
 * Just look at my sandbox and you see the reason, the best ranked eliminated team immediately joins the other teams (and no separate branch). <i style="font-family:Sans-serif"><b style="color:blue">Qed</b><b style="color:red">237</b>&#160;<b style="color:green">(talk)</b></i> 23:38, 17 July 2015 (UTC)
 * I edited your sandbox... something like that? not the prettiest solution, but doesn't require changing Module:RoundN. You may be able to get a better result with node_function{canvas} instead of {line}, but it would require some good HTML/CSS hacking to make it look good. —<b style="color:#aaaaaa; font-family:Unicode; font-size:12pt;">Code</b><b style="color:#5577aa">Hydro</b> 03:13, 18 July 2015 (UTC)
 * Looks fine, but I need the extra scorebox as the third round is played with two matches. <i style="font-family:Sans-serif"><b style="color:blue">Qed</b><b style="color:red">237</b>&#160;<b style="color:green">(talk)</b></i> 11:45, 18 July 2015 (UTC)

Two-legged matches
Are there any plans to add support for two-legged knock out rounds? TheBigJagielka (talk) 12:49, 30 October 2015 (UTC)
 * I think that already exists. TheBigJagielka are you thinking about something like

Just use 2+sum. Was that what you had in mind? <i style="font-family:Sans-serif"><b style="color:blue">Qed</b><b style="color:red">237</b>&#160;<b style="color:green">(talk)</b></i> 13:29, 30 October 2015 (UTC)
 * It is. Thanks, I didn't know that that feature existed. TheBigJagielka (talk) 13:33, 30 October 2015 (UTC)
 * Not easy to know as it has not been included in documentation for some reason. I just noticed it somehow I while back. <i style="font-family:Sans-serif"><b style="color:blue">Qed</b><b style="color:red">237</b>&#160;<b style="color:green">(talk)</b></i> 13:50, 30 October 2015 (UTC)
 * See now it has been mentioned on this talkpage before. 13:50, 30 October 2015 (UTC)<i style="font-family:Sans-serif"><b style="color:blue">Qed</b><b style="color:red">237</b>&#160;<b style="color:green">(talk)</b></i>

I was looking to update the bracket on the 2015 Canadian Championship, merging two templates into one.

From this:

To this:

There are two issues; I don't know how to make the league position (the left hand box) appear or know how to embolden the 'sum' for the semi-final winner on away goals. TheBigJagielka (talk) 14:05, 30 October 2015 (UTC)


 * Do you know why the RDseed in first semifinal match (Vancouver v Edmonton) is not "perfect" (a thicker bolded line). <i style="font-family:Sans-serif"><b style="color:blue">Qed</b><b style="color:red">237</b>&#160;<b style="color:green">(talk)</b></i> 15:05, 4 May 2016 (UTC)
 * It's an interaction with the skipmatch parameter. Basically the skipmatch attempts preserve shape of the table with invisible non-breaking space characters by default, but when nodes are skipped unevenly, the skipped characters cause the rows to become uneven in height. RDSeed is a CSS hack that depends on even row heights. I fixed it using the flex_tree parameter. The branch lines between matches won't be perfectly symmetrical, but the nature of the HTML forces one to choose between even looking seeds or even looking branches--i.e. the row height needed to make one thing look even will make the other to look uneven... —<b style="color:#aaaaaa; font-family:Unicode; font-size:12pt;">Code</b><b style="color:#5577aa">Hydro</b>
 * PS: This interaction between skipmatch and seeds was forced upon me the need to maintain backwards compatibility with the HTML of the old pre-module template. Just making a note here to remind myself and to let future programmers know not to fix this interaction. One of these days I will actually write the documentation for the flex_tree parameter along with all the other undocumented features... (PPS: for every feature you see in the current documentation, there are at least twice as many undocumented... :\ ) —<b style="color:#aaaaaa; font-family:Unicode; font-size:12pt;">Code</b><b style="color:#5577aa">Hydro</b> 15:21, 8 May 2016 (UTC)

Third place match alignment issue with two-legged matches
Hello, as I was converting the tournament bracket of UEFA Euro 1968 to use this module, I noticed that the third place match box seems to be shifted to the left of where is usually is located, after I had added "score-boxes" to display the final replay score. Am I doing something incorrectly, or is there an issue with the module? The problem seems to get worse with tournaments of more than four teams (see below). S.A. Julio (talk) 22:34, 19 February 2017 (UTC)
 * Euro 1968 example


 * Eight team example


 * The score-boxes parameter was not designed to be used for rematches. Instead put the rematch score in parenthesis in the same score box, like so:

Does this work for you? —<b style="color:#aaaaaa; font-family:Unicode; font-size:12pt;">Code</b><b style="color:#5577aa">Hydro</b> 20:12, 21 February 2017 (UTC)
 * Hmm, the only issue as that numbers in parentheses usually refer to penalty shoot-out scores. Also, the problem applies to normal tournaments over two legs that have a third place match (see below). S.A. Julio (talk) 20:32, 21 February 2017 (UTC)


 * I hadn't encountered a real-life multi-leg tournament with a third place match during the development of RoundN. Is your above example based on an actual tournament or is it purely theoretical? Granted I should have probably programmed the third place spot to tolerate multiple legs (and it wouldn't be difficult), but the score-boxes param still wasn't meant to be used in the way you wanted since the tournament was not actually multi-legged. If you don't like parenthesis, RoundN's score processing can tolerate most other characters of your choosing:


 * I will have to find the time to update RoundN's documentation since the score-boxes parameter isn't "officially" available yet. —<b style="color:#aaaaaa; font-family:Unicode; font-size:12pt;">Code</b><b style="color:#5577aa">Hydro</b> 14:03, 22 February 2017 (UTC)
 * All right thanks, I adjusted the article with the slash. But while maybe this situation is rare, I think it would be a good idea anyways to fix the issue with the third place match when the bracket has multiple legs. Also, why is the score-box parameter not yet "official" yet? S.A. Julio (talk) 00:01, 23 February 2017 (UTC)


 * - Sorry it took a year, but I finally got around to fixing this bug. —<b style="color:#aaaaaa; font-family:Unicode; font-size:12pt;">Code</b><b style="color:#5577aa">Hydro</b> 17:35, 4 September 2018 (UTC)

Alternate name for Final
@Codehydro Can you add an option to add an alternate name for the Final, similar to |Consol= ? I'd like to change the name of the Final to 'Gold Medal Match' but I can't see a way to do this. 09:04, 21 May 2018 (UTC)
 * Nevermind, I figured it out. TheBigJagielka (talk) 09:08, 21 May 2018 (UTC)

Code to insert bold tags
I edited Module:RoundN twice. The first was to clean whitespace and remove some of the globals which I assume were unintended. The second was to fix a problem in several articles which were showing . The articles follow. These had problems because they have (I think) broken wikitext, namely an odd number of occurrences of ''' (triple apostrophe). Someone familiar with the topic might like to fix them. Re the first edit: I did not fix the following because I couldn't quickly work out what was wanted. They should be investigated. The remaining globals are:  +   +   (at  ).
 * 2015–16 Magyar Kupa (men's handball)
 * 2016–17 Magyar Kupa (women's handball)
 * 2017–18 Magyar Kupa (women's handball)
 * Archery at the 2010 Commonwealth Games – Men's recurve individual
 * Fencing at the 1996 Summer Olympics – Men's épée
 * Fencing at the 1996 Summer Olympics – Men's foil
 * Fencing at the 1996 Summer Olympics – Men's sabre
 * Fencing at the 1996 Summer Olympics – Women's épée
 * Fencing at the 2008 Summer Olympics – Women's sabre
 * Fencing at the 2016 Summer Olympics – Men's sabre
 * Fencing at the 2016 Summer Olympics – Women's foil

Re the second edit: The original had some problems which meant that replacing example with &lt;b>example&lt;/b> was not occurring. When it was attempted (due to broken wikitext in the above articles), the runtime error occurred. The code is quite complex—please check what I did! Johnuniq (talk) 09:13, 14 August 2018 (UTC)




 * Thanks for working on RoundN! I think this was my 3rd Lua module and I am pretty sure I didn't even know that making function local was a thing at the time (FYI, I hadn't even heard of Lua just 6 weeks prior to when I stopped working on RoundN in Jan 2015). I agree that making those functions local sounds like a good idea.

As for your changes around the line local hasBold, b = ..., the changes miss the purpose of original, which was to bold text when users enter something like  (as opposed to  properly closing it with  ). Unclosed bold is works fine in MediaWiki-based templates but doesn't work in Lua-based templates, so those lines were an attempt maintain backwards compatibility. Your edit only affected paired/closed wiki-bold mark-up, which left, for example, left all of the score numbers (33, 40, etc.) unbolded in 2015–16 Magyar Kupa (men's handball).

That said, non-working bolding is better than the error that was there before, so good job restoring partial functionality while I was MIA :) It's fixed now. —<b style="color:#aaaaaa; font-family:Unicode; font-size:12pt;">Code</b><b style="color:#5577aa">Hydro</b> 23:32, 8 September 2018 (UTC)
 * }
 * @Codehydro: It's good code! I monitor script errors and my edits here were, I'm afraid, merely intended to remove those errors. I know nothing about this topic or exactly what the module is supposed to do so I was working in the dark. If you want to support a single occurrence of  as valid bolding I suppose that is ok, but my humble opinion is that it would be better to throw an error or put the article in a hidden category so the broken wikitext can be fixed. The purpose of my edit was to remove a problem, but while doing that I chose to only replace   if there were exactly two occurrences as a quick workaround. Anyway, that's up to you. You may not be aware that the global variables I mentioned are almost certainly bugs that need to be fixed. I can explain more if you like, but searching for each will show places where they would give   as an uninitialized global. I could take a stab at fixing a couple of them but it would take longer than I have to work out the underlying intention regarding what should happen. Johnuniq (talk) 01:30, 9 September 2018 (UTC)

"previewnumbers" do not work
"previewnumbers" do not work, the template claims that match 1 is match 2, match 2 is match 3 and then it continues. Instead, the number 1 ("match 1") is next to the headings. DenSportgladeSkåningen (talk) 18:23, 17 August 2018 (UTC)


 * fixed —<b style="color:#aaaaaa; font-family:Unicode; font-size:12pt;">Code</b><b style="color:#5577aa">Hydro</b> 21:01, 8 September 2018 (UTC)

score-boxes=0 and 3rdplace=yes does not display correctly
The following code combinations do not display correctly:

I'm not yet skilled enough with Lua to make the correction myself. Can somebody help? $\color{blue}\chi$chi (talk) 15:40, 23 August 2018 (UTC)
 * Pinging . $\color{blue}\chi$chi (talk) 17:12, 25 August 2018 (UTC)
 * I know nothing about this module and only dropped in to fix an error as mentioned two sections up. I might get time to look but I definitely do not want to spend time working out what the problem is and what is wanted. I would need a very clear explanation of what happens now and what should happen. Also, I'd like to see an example of a working template with results close to what is wanted. I removed the formatting from the section header because it breaks anchors. Johnuniq (talk) 23:38, 25 August 2018 (UTC)
 * Sorry for the vagueness. Here is my understanding of the problem. score-boxes is used to determine how many cells are needed for the score. For early Olympic wrestling, and perhaps other sports, there was no score at all so I've used . This works fine except for the 3rd place match of 4- or 8-teams competitions:


 * I'm assuming the module is expecting a score for the 3rd place match, so it actually puts the two 3rd-place adversaries side-by-side instead of one over the other. I noticed that this is a problem for Firefox, but not for Edge, which puzzles me even more. $\color{blue}\chi$chi (talk) 11:07, 27 August 2018 (UTC)
 * I put an example from above in my sandbox (permalink) showing what HTML is produced by the module. One problem has been identified, namely that different browsers show the results differently. Is there any other problem with the above? I ask because it is not clear to me why empty boxes should be displayed. Are you saying that what Edge shows in my sandbox is what is wanted? Is there an article showing empty boxes? If the only problem is the browser difference, the next step would be to ask at WP:VPT where HTML experts live. Someone would need to say what HTML output should occur before edits to the module can be contemplated. Johnuniq (talk) 00:42, 28 August 2018 (UTC)


 * This bug has now been patched. —<b style="color:#aaaaaa; font-family:Unicode; font-size:12pt;">Code</b><b style="color:#5577aa">Hydro</b> 17:32, 4 September 2018 (UTC)
 * @Codehydro: Thanks. Please also see my earlier post above with "remaining globals". The variables are almost certainly bugs that should be fixed. Johnuniq (talk) 23:11, 4 September 2018 (UTC)

Lines between matches not in line with centre of box
Hi - It appears that the bold lines connecting any two matches starts from either slightly above or below the middle of the box, and then enters slightly above or below the middle of the box it's connecting to. How easy is this to fix? M00036 (talk) 14:40, 7 January 2019 (UTC)
 * This aesthetic compromise is intentional. Due to the way the CSS box model works and the fact the Wikipedia makes us use only inline CSS, making the lines balanced required generating a lot more HTML/CSS and slowed down page loads too much. The current compromise was found to be the optimal balance between visual acceptability and code bulk. —<b style="color:#aaaaaa; font-family:Unicode; font-size:12pt;">Code</b><b style="color:#5577aa">Hydro</b> 16:06, 19 May 2019 (UTC)

Right to Left Wikis
Hi, everyone. How can I use this module in the right to left WIKIs such as azb.wikipedia.org? I have created a copy of this module in azb but I have a small problem with this module in our wiki and It is the float of the Brackets' connector lines. All the vertical lines have stood on the right side of connectors, and I could not move these lines to the left side of connectors. For example please check here to understand clearly my issue. I am thankful for your guidance: Ziraksima (talk) 11:24, 17 January 2019 (UTC)
 * I suggest you make a far simpler example in a sandbox with the minimum required to demonstrate the problem. Put the same wikitext (perhaps in English) in a sandbox here, then spell out what the problem is (what text is wrong and what should it be). Once that is available, you might consider asking at WP:VPT because ultimately the question regards the html output by the module. Fixing the module would be easy if it were known what html was required. Johnuniq (talk) 22:35, 17 January 2019 (UTC)

|score-boxes=2+sum don't allow penalties
If you use |score-boxes=2+sum, you don't have the option to add penalties result to the sum box. Alternatively, you can display penalties' result between parenthesis on the second leg box but the sum won't work (e.g. |1 |1 (4) would display 15 on the sum box because 1+14=15).A.Caseiro (talk) 19:43, 23 February 2019 (UTC)
 * Automatic sum is meant for simple numbers. Just use  and do the math manually, e.g.  .  If you want a different width sum box then use something like    —<b style="color:#aaaaaa; font-family:Unicode; font-size:12pt;">Code</b><b style="color:#5577aa">Hydro</b> 03:38, 14 May 2019 (UTC)

Issue with first match byes
If the top match in the first round is a bye, there is a larger than normal spacing between the top of the knock-out bracket and the round descriptors...M00036 (talk) 14:48, 11 March 2019 (UTC)


 * Example? —<b style="color:#aaaaaa; font-family:Unicode; font-size:12pt;">Code</b><b style="color:#5577aa">Hydro</b> 03:27, 14 May 2019 (UTC)

M00036 (talk) 07:16, 15 May 2019 (UTC)


 * I edited the above to use and added   to all but top one. I also added  because... why do it manually? See   —<b style="color:#aaaaaa; font-family:Unicode; font-size:12pt;">Code</b><b style="color:#5577aa">Hydro</b> 21:54, 16 May 2019 (UTC)


 * Thanks for the above - very useful (and thanks also for emboldening tip!). Also wondered whether it's possible to set up a knockout with R1, R2 and QFs but no SFs or Final? (and with boxes for SF and Final hidden). Similar to the question below in some ways I guess. M00036 (talk) 16:43, 17 May 2019 (UTC)


 * Don't worry about the above - just found it in the code M00036 (talk) 16:47, 17 May 2019 (UTC)


 * Well this is how I did it (which I think looks quite good - see once-defeated pool section):

M00036 (talk) 13:12, 21 May 2019 (UTC)

Bronze match and no final, title "bronze match" is not in place
I created a compilation in Swedish wikipedia about the qualification for the 2017 World Beach Football Championship. But I chose to remove the final, as both finalists are qualified for the World Championship. This means that the title "bronze match" is not in place, see examples here (on svwp). It is the same in English wikipedia, as you can see in my sandbox. DenSportgladeSkåningen (talk) 12:37, 16 April 2019 (UTC)
 * Is that related to this module? I can see Module:RoundN is used in your sandbox but what makes you think this module is a problem? Johnuniq (talk) 03:38, 17 April 2019 (UTC)
 * It is exactly the same module. But since you are rude, just forget it. I create a custom template for this purpose in Swedish wikipedia instead. DenSportgladeSkåningen (talk) 11:08, 17 April 2019 (UTC)
 * Sorry, I was only trying to be helpful. However, my comment was mistaken because I forgot what this page is about (I'm watching it after fixing a couple of errors in August 2018). There is a recent proposal to merge certain modules that I am interested in, modules which round numbers to a specified number of decimal places. I'm afraid I thought I was commenting regarding one of those. Total confusion. Johnuniq (talk) 11:27, 17 April 2019 (UTC)

Width with em value
Width cannot be specified with em value in the  and   parameters. Since the em value is useful for specifying width in number of characters, I would like you to be able to specify the width with the em value. --Nekohan (talk) 17:07, 10 June 2020 (UTC)
 * This limitation is inherited from the of the various RoundN-like templates. RoundN was designed to be fully backwards compatible so that the thousands of pages using the original templates would not need to be edited after the templates they used were converted to RoundN. While adding EM widths support is probably doable without breaking backwards compatibility, implementing such support is probably not worth it because it is easy enough to simply multiply whatever EM value you want by 12.6 (wikitables put font at 90% of the surrounding font size, which is generally the article text size of 14px = 1em; thus, 14px * 0.9 = 12.6px = 1em in wikitables).  — Code  Hydro  14:07, 25 August 2020 (UTC)

"Template:RoundN" listed at Redirects for discussion
A discussion is taking place to address the redirect Template:RoundN. The discussion will occur at Redirects for discussion/Log/2021 February 10 until a consensus is reached, and readers of this page are welcome to contribute to the discussion. Hhkohh (talk) 19:26, 10 February 2021 (UTC)

Missing line in second round bye
In the 1926 JBUs Pokalturnering, both a first and second round bye was issued to two different teams. While the actual teams getting byes are not displayed in the knock-out bracket, a visual line between the first round match and third round match (involving the second team getting a bye) should be displayed. Any ideas to how can this be made possible? Froztbyte (talk) 13:21, 21 February 2021 (UTC)

Change to |color field
A suggestion for the  field: Use it like  to color the winner, instead of in a predetermined order.

Current state:

Current state:

Wanted state:

Wanted state:

Wanted state:

Wanted state:

Wanted state:

Thanks. Deancarmeli (talk) 10:16, 29 June 2021 (UTC) Edited. Deancarmeli (talk) 10:18, 29 June 2021 (UTC)

Horizontal lines
I'm trying to get horizontal lines with RoundN (like here: 2013 World Snooker Championship which currently uses a bespoke template) but haven't found anything. Best I can do is:

Any ideas? Nigej (talk) 10:16, 16 December 2021 (UTC)


 * That's the best I could do, it only works for  and it still looks bad. Deancarmeli (talk) 11:00, 16 December 2021 (UTC)

Two Round 8 matches for Single-Elimination Tournament
Hey there! I'm currently doing a playoff bracket wherein after the Round of 16, would go on to two Rounds of 8 and then would proceed to the Semis and Grand Finals. Can I possibly know what feature I can add to the bracket that will allow me to show Two Rounds of 8?

talk 01:56, 30 December 2021 (UTC)
 * Try:

Deancarmeli (talk) 07:31, 30 December 2021 (UTC)

About the 2x-to-beat
Currently making a bracket with qf. How do you add a 2x-to-beat? Homaisyou100 (talk) 14:44, 11 January 2022 (UTC)

Orphan function
It appears the orphan function is not working for the 2022 men's Olympic ice hockey bracket. Can someone offer guidance to help get it fixed? Taxman1913 (talk) 07:54, 16 February 2022 (UTC)

Remove annoying thicker line
As soon as you add seeds, the line to the left for each entry becomes thicker. For instance as shown here (borrowed from DenSportgladeSkåningen above):

In the Swedish Wiki I've adjusted the code to correct this. See how it looks like in svwp.

The code I changed was on row 833, where I changed -%s to -0.7ex. Perhaps it can be done in a better way, but this way I got it to work after testing around. May I propose you do the same change in enwp? Inno (talk) 04:44, 22 May 2022 (UTC) Added edit request Inno (talk) 18:34, 25 May 2022 (UTC)


 * Red information icon with gradient background.svg Not done: made your edit to the sandbox, and it didn't appear to make a difference, at least not in my browser:


 * Also not crazy about the way the a.e.t. link overlaps with the number 5 in the Paraguay box. Never mind, that's just my browser's font-size setting.  P.I. Ellsworth &numsp;- ed.  put'r there 09:09, 27 May 2022 (UTC)
 * I have changed the values on row 833 in sandbox to 'margin = ('-2px %s -2px -2ex'):format(padding, padding)', still no difference so the tree above doesn't seem to use the code in the sandbox. Inno (talk) 14:50, 27 May 2022 (UTC)
 * Tried ('-10px %s -10px -10ex') and still no change. Moved the request template to the top of this section and left it open so other template editors can have a look at this.  P.I. Ellsworth &numsp;- ed.  put'r there 16:17, 27 May 2022 (UTC)

I have no clue how the sandbox works. Obviously not well. Why not implement my proposed change to the template like I did in svwp? Works like a charm. The thicker border to the left is gone. Here's the link again. Inno (talk) 04:38, 28 May 2022 (UTC)
 * ✅ – seems pragmatic enough.  P.I. Ellsworth &numsp;- ed.  put'r there 09:09, 28 May 2022 (UTC)
 * Great Ellsworth, thanks :) Inno (talk) 10:24, 28 May 2022 (UTC)
 * my pleasure!  Paine  17:36, 28 May 2022 (UTC)

Four-way final
Is it possible to do this using the RoundN module?

Template-protected edit request on 21 June 2022 — Enabling automatic winner background color
The proposed change comes to address the color parameter functionality:
 * 1) When set to yes it will work exactly as before. no change.
 * 2) When set to yes, while bold_winner is also set to yes, the cells for the winners of both the final and the 3rdplace match will be colored correctly, as was suggested in

Current state, lines 652–656: <pre style="overflow: auto;"> if m.showBox[m.phase] then p.teamBoxCSS = colorFinal and {border = p.teamBoxNormal.border, background = p.bgColor[m.phase + (col.show3rd or 0)]} or p.teamBoxNormal local f = {phase = m.phase, bold = m.bold.win(m.phase)}

Wanted state: <pre style="overflow: auto;"> if m.showBox[m.phase] then if p.bold then if m.bold.win(m.phase) and colorFinal then color_index = 1 + (col.show3rd or 0) else color_index = 2 + (col.show3rd or 0) end p.teamBoxCSS = colorFinal and {border = p.teamBoxNormal.border, background = p.bgColor[color_index]} or p.teamBoxNormal else p.teamBoxCSS = colorFinal and {border = p.teamBoxNormal.border, background = p.bgColor[m.phase + (col.show3rd or 0)]} or p.teamBoxNormal end local f = {phase = m.phase, bold = m.bold.win(m.phase)} CLalgo (talk) 16:20, 21 June 2022 (UTC)
 * curious as to how and where this has been tested?  P.I. Ellsworth &thinsp;, ed.  put'r there 05:46, 27 June 2022 (UTC)
 * Fair question. I've copied the code of Module:RoundN to the empty page of Module:RoundN test, with the relevant changes. Then, I've used the latter to preview User:CLalgo/sandbox/RoundN test, which is a userspace page I've created and tested on that shows the 4 combinations of final an 3rd place match winners. The userspace page uses the syntax of Module:RoundN, but invokes Module:RoundN test. CLalgo (talk) 10:53, 27 June 2022 (UTC)
 * Trying to understand... don't see how placing the module code in a non-existing module page can be tested like that. However, I did place the module code along with your changes into the sandbox module, and then placed your userpage sandbox code into my user sandbox (using {{code| {{#invoke:RoundN/sandbox... }}) to compare it with your user sandbox (using {{code| {{#invoke:RoundN... }} in preview) and saw the color switches in the second, third and fourth examples. So I've seen the changes your edit brings about, but how are these changes improvements over what the module presently produces?  P.I. Ellsworth &thinsp;, ed.  put'r there 11:41, 27 June 2022 (UTC)
 * Currently, when one sets, the module is hardcoded to color specific, predetermined cells in specific, predetermined colors regardless of input. If the brackets were made before the competition has ended, in all but one case their structure would have to be changed in order to use the color functionality correctly. With my change, the coloring wouldn't be hardcoded to specific cells, but would be done automatically to match the input. CLalgo (talk) 11:57, 27 June 2022 (UTC)
 * Okay, sounds very good so {{done|done}}, and thank you for your patience and your explanation!  P.I. Ellsworth &thinsp;, ed.  {{sup|put'r there}} 12:27, 27 June 2022 (UTC)
 * Thank you, and sorry that the change wasn't clear enough to begin with. CLalgo (talk) 12:45, 27 June 2022 (UTC)

Template-protected edit request on 28 June 2022 — Enabling repechage color
The proposed change comes to address the color parameter functionality, in Repechage cases were the winner of the brackets is awarded a bronze medal:
 * 1) color_repechage — a new parameter, taking   and    values.
 * 2) When set to , it is hardcoded to color the upper box of each match at the final stage of the brackets, which is usually 1, in bronze. That is, it works with the same logic as the color parameter.
 * 3) When set to   while bold_winner is also set to , the cells of the winners of each match at the final stage of the brackets, which is usually 1, are colored bronze.

Changes to be done: Lines 349–350: <pre style="overflow: auto;"> 'color', '3rdplace', <pre style="overflow: auto;"> 'color', 'color_repechage', '3rdplace',
 * Current state:
 * Wanted state:

Lines 534–535: <pre style="overflow: auto;"> p.span = p.tCols > c and bump * 2 or p.branch_upwards or math.max((bump - 1) / 2, 2) col.show3rd = p['3rdplace'] and c == p.tCols and rowNum.third <pre style="overflow: auto;"> p.span = p.tCols > c and bump * 2 or p.branch_upwards or math.max((bump - 1) / 2, 2) col.color_repechage = p['color_repechage'] and ((c == p.tCols) or ((c == p.tCols-1) and skipMatch[math.pow(2, p.tCols) - 1])) col.show3rd = p['3rdplace'] and c == p.tCols and rowNum.third
 * Current state:
 * Wanted state:

Lines 652–665: <pre style="overflow: auto;"> if m.showBox[m.phase] then if p.bold then if m.bold.win(m.phase) and colorFinal then color_index = 1 + (col.show3rd or 0) else color_index = 2 + (col.show3rd or 0) end p.teamBoxCSS = colorFinal and {border = p.teamBoxNormal.border, background = p.bgColor[color_index]} or p.teamBoxNormal else p.teamBoxCSS = colorFinal and {border = p.teamBoxNormal.border, background = p.bgColor[m.phase + (col.show3rd or 0)]} or p.teamBoxNormal <pre style="overflow: auto;"> if m.showBox[m.phase] then if col.color_repechage then col.color_repechage = 2 end if p.bold then if m.bold.win(m.phase) and (colorFinal or col.color_repechage) then color_index = 1 + (col.show3rd or 0) + (col.color_repechage or 0) else color_index = 2 + (col.show3rd or 0) + (col.color_repechage or 0) end p.teamBoxCSS = (colorFinal or col.color_repechage) and {border = p.teamBoxNormal.border, background = p.bgColor[color_index]} or p.teamBoxNormal else p.teamBoxCSS = (colorFinal or col.color_repechage) and {border = p.teamBoxNormal.border, background = p.bgColor[m.phase + (col.show3rd or 0) + (col.color_repechage or 0)]} or p.teamBoxNormal
 * Current state:
 * Wanted state:

– CLalgo (talk) 09:54, 28 June 2022 (UTC)
 * ✅, and please update the /doc page as needed.  P.I. Ellsworth &thinsp;, ed.  put'r there 19:56, 28 June 2022 (UTC)

Template-protected edit request on 30 June 2022 — Fixed bug: Empty finals color
Currently, when the  parameter is used, the final match is colored even when empty. With the proposed change, when  will be used with , the coloring will only be done when the matchboxes are no longer empty.

Lines 659–663: <pre style="overflow: auto;"> if m.bold.win(m.phase) and (colorFinal or col.color_repechage) then color_index = 1 + (col.show3rd or 0) + (col.color_repechage or 0) else color_index = 2 + (col.show3rd or 0) + (col.color_repechage or 0) end <pre style="overflow: auto;"> if m.bold.win(m.phase) and (colorFinal or col.color_repechage) then color_index = 1 + (col.show3rd or 0) + (col.color_repechage or 0) elseif m.bold.box[#m.nonEmpty] then color_index = 2 + (col.show3rd or 0) + (col.color_repechage or 0) else color_index = 4 end CLalgo (talk) 10:41, 30 June 2022 (UTC)
 * Current state:
 * Wanted state:
 * Could you point to a page where this problem is occurring? (Not that I don't believe you, I just want to be able to do my own testing to make sure the change indeed fixes the problem before deploying it) * Pppery * <sub style="color:#800000">it has begun... 15:26, 8 July 2022 (UTC)
 * this is an older version of Judo at the 2022 Mediterranean Games – Women's 78 kg: . Is that good enough? CLalgo (talk) 19:09, 8 July 2022 (UTC)
 * Yep. ✅ * Pppery * <sub style="color:#800000">it has begun... 19:12, 8 July 2022 (UTC)

Medal colors for gold/silver/bronze
Hi there, the parameters  and   allow for the background of a cell to be colored in gold / silver / bronze. I was wondering whether these colors should perhaps be adjusted for accessibility as, for example, when visiting a red link, the contrast between the link and the bronze background (on a page such as this one) is fairly low. If they need to be adjusted, some options (mentioned here) could include: mandatory lighter colors or an option to make them available. Is this perhaps something to consider or are the current colors ok? Another option could be to only color the background of the cell with the score and leave the background of the athlete name "as is"? Simeon (talk) 19:51, 30 June 2022 (UTC)


 * As I said in my talk page, I also find the current color contrast troubling, and thank Simeon for starting this discussion. Both options mentioned are doable. Changing the colors to lighter one could be done very easily. Creating an option for lighter ones is also an option, and I've already written the code for it and tested it. I haven't submitted it because I was wondering myself if it is a good solution, or should the lighter colors should be the only option. As this is a widely used module, I'd like to invite more people to take part in this discussion. CLalgo (talk) 20:25, 30 June 2022 (UTC)
 * Here is an example of the current version and an alternative with lighter colors, and their contrasts:


 * {| class=wikitable style="border: none; background: none;"

! rowspan=2 colspan=3| Examples ! colspan=3| AA Compliant ! colspan=3| AAA Compliant ! colspan=3| Ref. ! !!  !! !  !!  !! !  !!  !!
 * + style="font-size:140%"| Current version
 * + style="font-size:140%"| Current version
 * rowspan=7 style="width:15px; border: none; background: none;"|
 * rowspan=7 style="width:15px; border: none; background: none;"|
 * rowspan=7 style="width:15px; border: none; background: none;"|
 * - style="color:#0645AD"
 * bgcolor=gold| Unvisited links
 * bgcolor=silver| Unvisited links
 * bgcolor=#C96| Unvisited links
 * 
 * 
 * 
 * - style="color:#0B0080"
 * bgcolor=gold| Visited links
 * bgcolor=silver| Visited links
 * bgcolor=#C96| Visited links
 * 
 * 
 * 
 * - style="color:#BA0000"
 * bgcolor=gold| Unvisited red-links
 * bgcolor=silver| Unvisited red-links
 * bgcolor=#C96| Unvisited red-links
 * 
 * 
 * 
 * - style="color:#A55858"
 * bgcolor=gold| Visited red-links
 * bgcolor=silver| Visited red-links
 * bgcolor=#C96| Visited red-links
 * 
 * 
 * 
 * bgcolor=gold| No link
 * bgcolor=silver| No link
 * bgcolor=#C96| No link
 * 
 * 
 * 
 * }
 * 
 * bgcolor=gold| No link
 * bgcolor=silver| No link
 * bgcolor=#C96| No link
 * 
 * 
 * 
 * }
 * 
 * 
 * }


 * {| class=wikitable style="border: none; background: none;"

! rowspan=2 colspan=3| Examples ! colspan=3| AA Compliant ! colspan=3| AAA Compliant ! colspan=3| Ref. ! !!  !! !  !!  !! !  !!  !!
 * + style="font-size:140%"| Light-color version
 * + style="font-size:140%"| Light-color version
 * rowspan=7 style="width:15px; border: none; background: none;"|
 * rowspan=7 style="width:15px; border: none; background: none;"|
 * rowspan=7 style="width:15px; border: none; background: none;"|
 * - style="color:#0645AD"
 * bgcolor=F7F6A8| Unvisited links
 * bgcolor=DCE5E5| Unvisited links
 * bgcolor=FFDAB9| Unvisited links
 * 
 * 
 * 
 * - style="color:#0B0080"
 * bgcolor=F7F6A8| Visited links
 * bgcolor=DCE5E5| Visited links
 * bgcolor=FFDAB9| Visited links
 * 
 * 
 * 
 * - style="color:#BA0000"
 * bgcolor=F7F6A8| Unvisited red-links
 * bgcolor=DCE5E5| Unvisited red-links
 * bgcolor=FFDAB9| Unvisited red-links
 * 
 * 
 * 
 * - style="color:#A55858"
 * bgcolor=F7F6A8| Visited red-links
 * bgcolor=DCE5E5| Visited red-links
 * bgcolor=FFDAB9| Visited red-links
 * 
 * 
 * 
 * bgcolor=F7F6A8| No link
 * bgcolor=DCE5E5| No link
 * bgcolor=FFDAB9| No link
 * 
 * 
 * 
 * }
 * CLalgo (talk) 20:58, 3 July 2022 (UTC)
 * It seems like we need some additional changes to make the light-color version compliant? I'm not very familiar with what it'd mean if we're not compliant but, if possible, I'd prefer to make it compliant - even if that means fewer / no colors. Simeon (talk) 19:17, 4 July 2022 (UTC)
 * I agree, that's why I haven't pushed these lighter colors. I'll try other silver and bronze shades to achieve AA compliance. CLalgo (talk) 19:32, 4 July 2022 (UTC)
 * Would Light Yellow be more compliant? I.e.
 * {| class="wikitable plainrowheaders" style="text-align:center"
 * 
 * 
 * 
 * }
 * CLalgo (talk) 20:58, 3 July 2022 (UTC)
 * It seems like we need some additional changes to make the light-color version compliant? I'm not very familiar with what it'd mean if we're not compliant but, if possible, I'd prefer to make it compliant - even if that means fewer / no colors. Simeon (talk) 19:17, 4 July 2022 (UTC)
 * I agree, that's why I haven't pushed these lighter colors. I'll try other silver and bronze shades to achieve AA compliance. CLalgo (talk) 19:32, 4 July 2022 (UTC)
 * Would Light Yellow be more compliant? I.e.
 * {| class="wikitable plainrowheaders" style="text-align:center"
 * Would Light Yellow be more compliant? I.e.
 * {| class="wikitable plainrowheaders" style="text-align:center"

! scope=row| Example 1
 * + example
 * style="background-color:lightyellow"| example
 * } >> Lil-unique1  (  talk  ) — 13:56, 18 July 2022 (UTC)
 * Actually, the light gold is the the only one of the three that is AA Compliant. CLalgo (talk) 06:07, 19 July 2022 (UTC)

Visited and unvisited redlinks are essentially impossible to make AAA compliant, as they are not AAA compliant against white backgrounds. However, we can (and need to per MOS:COLOR) make the colors AAA compliant and AA compliant where possible. Here is my proposal:

Frankly, I'd be fine with removing the color altogether, but I understand if people want them. Pinging previous participants, as this discussion has been stale for a few months. – Pbrks (t • c) 14:46, 9 September 2022 (UTC)


 * I have no preference on colour so long as we're compliant. >> Lil-unique1  (  talk  ) — 15:26, 9 September 2022 (UTC)


 * Are those the darkest shades still AAA compliant for visited an AA compliant for unvisited? CLalgo (talk) 09:03, 10 September 2022 (UTC)
 * Do you mean for AAA for bluelinks and AA for redlinks? If so, then no, the gold could be darker. I lightened it for aesthetic reasons, as it looked much darker than the others. It could be as dark as If not, then no, since we cannot get AAA compliance for unvisited redlinks. – Pbrks (t • c) 13:49, 10 September 2022 (UTC)
 * Perhaps we should consider: do we need these background colours? I would prefer AA compliance and AAA compliance first, without background colours, and we should only add background colours if it can be justified not being compliant with a particular guideline. Simeon (talk) 17:14, 10 September 2022 (UTC)
 * I do not care for the colors; I don't see any good reason to have them. With that said, we would have the same compliance rating as my proposal if all of the backgrounds were the default light grey color. – Pbrks (t • c) 18:32, 10 September 2022 (UTC)

Templatestyles
This template really should be converted to make use of template styles, its reusing lots of style statements, and using template styles would reduce the size of the generated output significantly. If I can find some time, I'll attempt to have a go at it. —Th e DJ (talk • contribs) 14:30, 15 July 2022 (UTC)
 * What is this undocumented edit you've made to this module? CLalgo (talk) 16:03, 15 July 2022 (UTC)
 * It's not undocumented, the edit summary tells exactly why it was made, which is what edit summaries are for. If you set a css background color you should always set the text color as well. If you don't, you break accessibility for people not using standard colors. Pretty basic rule of background color usage. See also Wikipedia_talk:Manual_of_Style/Accessibility —Th e DJ (talk • contribs) 17:16, 15 July 2022 (UTC)
 * Was anything changed in terms of module functionality? Any added features\parameters? CLalgo (talk) 12:11, 16 July 2022 (UTC)
 * no —Th e DJ (talk • contribs) 08:03, 18 July 2022 (UTC)

node_function{orphan}
Maybe I missed something, but  doesn't seem to work as it should. Look in my sandbox (copied it from 2022 MLS on svwp) for an example, it still shows lines from Conference Semifinal 1 and Conference Semifinal 2 to Conference Final 1, but not from 3 and 4. DenSportgladeSkåningen (talk) 07:01, 18 October 2022 (UTC)


 * I'm seeing the same issue for brackets of any size. It seems that it works fine in the first column but in subsequent columns, the top two matches won't have their lines hidden. See my testcases here: User:Blaixx/sandbox/RoundN-main. I have a hunch that the bug is somewhere below the comment  but the code is really hard (for me) to understand! <b style="color: #329604">B</b><b style="color: #FD8F42">L</b><b style="color: #0096FF">A</b>IXX 14:58, 23 February 2024 (UTC)

Automatic VTE links
any objections to adding automatic VTE links? with Module:Sports table, you don't need to add the name to tell the module the name of the parent, which reduces errors when the module/template is moved to a new location. we could still have the template, but would not need the name. Frietjes (talk) 16:12, 5 December 2022 (UTC)
 * Frietjes, I think it's going to be a very rare case when you want to put the bracket in its own template. This might have been the case awhile ago, but the current trend is to put the brackets directly in the article and use WP:LST when necessary.  A quick check of "WhatLinksHere" in template space shows only a handful.  Thanks! Plastikspork <sub style="font-size: 60%">―Œ <sup style="margin-left:-3ex">(talk)  16:04, 21 December 2022 (UTC)
 * okay, now removed. Frietjes (talk) 21:08, 21 December 2022 (UTC)

Unbold aet and pen when using bold_winner
per this discussion with S.A. Julio, I have tweaked the code so that aet and pen and other parenthetical links are not bolded when using bold_winner. let me know if you see any problems and I can adjust the code. see 2022 FIFA World Cup knockout stage for a live example. Frietjes (talk) 21:22, 21 December 2022 (UTC)


 * Frietjes: Please see Misnested Tags in Article namespace and note the many articles with misnested tags attributed directly to this module. Cheers! —Anomalocaris (talk) 00:51, 22 December 2022 (UTC)
 * okay, I changed it to a less aggressive pattern match. Frietjes (talk) 18:17, 22 December 2022 (UTC)
 * Frietjes: OK, the misnested tags are cleared, so, thanks! —Anomalocaris (talk) 22:53, 22 December 2022 (UTC)

Edit request 25 February 2024 Fix node_function orphan bug
Description of suggested change: A fix for the longstanding  bug where the lines from the first two matches in each round (after the first) would not be hidden (see examples here: User:Blaixx/sandbox/RoundN-main). This is what it looks like when fixed: User:Blaixx/sandbox/RoundN (tables generated using the Module:RoundN/sandbox).

The fix took a long time to find but is actually pretty simple. We just need to null out a variable once per column. That way all subsequent rounds will work the same way as the first. I also added some comments.

Diff: See diff here: <b style="color: #329604">B</b><b style="color: #FD8F42">L</b><b style="color: #0096FF">A</b>IXX 01:04, 25 February 2024 (UTC)
 * sorry for the ping. Would you mind taking a look at this edit request when you have a chance? I saw that you've made some edits to this module before. Thanks! <b style="color: #329604">B</b><b style="color: #FD8F42">L</b><b style="color: #0096FF">A</b>IXX 15:55, 2 March 2024 (UTC)
 * Blaixx the bug is the connecting lines wrongly appearing, yes? SWinxy (talk) 23:00, 3 March 2024 (UTC)
 * Yes, "node_function{orphan}" should hide the lines to the next column of boxes and the bug is what you've said: the lines wrongly appearing. <b style="color: #329604">B</b><b style="color: #FD8F42">L</b><b style="color: #0096FF">A</b>IXX 04:46, 4 March 2024 (UTC)


 * .  P.I. Ellsworth &thinsp;, ed.  put'er there 13:57, 7 March 2024 (UTC)

It got worse readability when the template is implement to the 2023 Copa Libertadores. Any idea?

KyleRGiggs (talk) 08:21, 18 July 2024 (UTC)