Template talk:Navbox

  (Redirected from Module talk:Navbox)
Jump to navigation Jump to search

Template:Navbox subgroup

@Randomtransmans: Why did you create Template:Navbox subgroup? When doing that, you should have seen a notice that the page was deleted on 16 March 2019 per this TfD. It is used in Template:Touch! Generations which you also created. I can hardly remember, but I believe the subgroup template is redundant and should be replaced with plain navbox. Perhaps others with better recollection can confirm. The template is eligible for speedy deletion but no harm in asking first. Johnuniq (talk) 23:49, 5 June 2020 (UTC)

Are you deleting it? Randomtransmans (talk) 01:52, 6 June 2020 (UTC)
I only asked a question. Someone else deleted it after my comment here. I see that someone with a better grasp than me of how it works has already fixed Template:Touch! Generations so there appears to be nothing more to do. Please review WP:INDENT for how to use a colon when replying. Johnuniq (talk) 02:30, 6 June 2020 (UTC)

Adding "History" next to "Edit"

Hey I want to add that, I want people to view the history of the Navbox, the abbreviation should be "H" and when putting the pointer on it, it would say "View the history for this template" can you add that? — Preceding unsigned comment added by Gamerknowitall (talkcontribs) 02:32, 7 June 2020 (UTC)

This is a perennial proposal. See suggestions/discussions from 2008 and 2010 from Template:Navbox's archives, and similar from 2009, 2012, and 2016 from Template:Navbar's archives. According to this 2006 discussion, T:Navbar had a history link added and subsequently removed many years ago. There are probably other similar discussions scattered elsewhere on the project, though I didn't feel like trying to hunt any down. The obvious objection is that this is adding more interface clutter for no real benefit (i.e. how many readers even know what the current VTE links are for, or use any of them other than by accident or out of curiosity?). A navbox's history is already trivially accessible by just clicking through to view that navbox and clicking the "History" tab on it; is saving a single click really worth the addition of another link on every single transclusion of almost every navbox on the site? If anything, there are stronger arguments for removing at least one link from the navigation (I would not miss the edit links at all, to be honest) than for adding any more. ディノ千?!☎ Dinoguy1000 11:07, 14 June 2020 (UTC)

Help with striping

Hello! Maybe someone here has a better understanding of how the odd/even striping in this template functions, I am a bit lost right now. I am trying to properly export the template to dewiki, in order to replace the current de:Template:Erweiterte Navigationsleiste (there are lots of compatibility changes I will have to make, of course). As can be seen on my testing page, a lot is working well already, but in the child and collapsible examples the striping does not work as intended. I am not aware of any changes I made to the code (module, styles) with regards to the striping. Any ideas? Thanks, XanonymusX (talk) 10:38, 25 July 2020 (UTC)

That is a strange test site. Why not put the template and module in a sandbox at dewiki and try it there? Also, make a test page with just one example of a problem—that makes it easier to focus on the issue. Apart from the extensive renaming you have done, and ignoring the irrelevant function isIllegible, the only difference between Module:Navbox and what you're using is that you have some extra code (which I haven't tried to understand):
if not item:match ("{\|") then
    item = item:gsub ("\n([^\*])", " %1") -- listed items without table/ul/ol
end
What happens if you comment that out? Johnuniq (talk) 11:30, 25 July 2020 (UTC)
The whole sandbox concept of enwiki does not exist on dewiki; and over the years we have moved most Lua-related testing to the Beta cluster (I guess your “strange” refers to the new Vector, but that has no influence on the contents, obviously).
You are right to point out that one change I made, which is for compatibility with the currently used templates on dewiki. However, the striping problem was there already before I changed that (to be sure I have just tested it without the code in the preview, and it stayed the same). Very strange. The other major difference is that the styles are coming from TemplateStyles instead of the common.css, but I have not touched the odd/even part and I can see the classes in the HTML source, so there must be some issue with replacing the placeholders.—XanonymusX (talk) 13:43, 25 July 2020 (UTC)
@XanonymusX: If there is still a problem, consider making a sandbox here: Module:Sandbox/XanonymusX/Navbox and put the test (just one simple example showing a problem) on the talk page. You would need to change "Modul" to "Module" (the latter works on all sites) and maybe some other stuff. Then you would see if it works at enwiki. If it does, the problem is in one of the related pages (the style sheet??) and not the module. If it doesn't, I can have a look although you might have to remind me. Johnuniq (talk) 03:21, 30 July 2020 (UTC)
@Johnuniq: Thanks for the advice. Well, I have created the sandbox and Module talk:Sandbox/XanonymusX/Navbox works just fine. But outside enwiki it still does not, even after newly copying all the relevant styles from MediaWiki:Common.css. I have really no explanation for this difference. The class names are the same, and so are the markers. Is there any JS involved in the striping? That would be the only thing I can think of now. --XanonymusX (talk) 10:10, 30 July 2020 (UTC)
No, there is no JavaScript involved. I can have a look at the test site but not for a day or two, and I would need a reminder. The first step would be to edit each test page (that's Module talk:Sandbox/XanonymusX/Navbox here) and examine "Pages transcluded onto the current version of this page" at the bottom. Here, that is showing:
Module:Arguments
Module:Navbar
Module:Sandbox/XanonymusX/Navbox
Then compare the versions of each transcluded module with what is on the other site. For simplicity, the other site should have a test page with exactly the same wikitext. The test looks like "Multiple Subgroup Test" from Template:Navbox/testcases. That uses {{navbox}} whereas your test uses {{#invoke:...}}. That raises the question of whether the module gets all the arguments correctly. If you're really keen, you could include some mw.log code to see what arguments arrive in the module. Perhaps Module:Arguments is obsolete at the test site? Johnuniq (talk) 10:29, 30 July 2020 (UTC)
@Johnuniq: That worked, invoking the module directly does the thing! That means that the problem is the templatestyles tag, which I had put in the template rather than in the module. Not sure why this changes anything, but alright. I just have to find out where exactly to insert the templatestyles then…--XanonymusX (talk) 11:06, 30 July 2020 (UTC)

For navboxes with custom styling, VTE link underlines don't color properly

Template:University of Michigan uses a dark blue background with white text (including for links). I just made this fix so that, when a reader hovers a cursor over a link, the underline appears white, rather than the normal blue (which is nearly invisible). The template's show and hide buttons have a white underline somehow too. However, the VTE buttons have the blue underline. Could we make a fix so that they will be white as well? I'm not sure exactly where the code is that's leading to the current display, but since the show/hide renders correctly, I assume the issue is more likely here than there. (please {{ping}} on reply) {{u|Sdkb}}talk 06:38, 3 August 2020 (UTC)

Obsolete template

In line 453 args = getArgs(frame, {wrappers = {'Template:Navbox', 'Template:Navbox subgroup'}}), the obsolete Template:Navbox subgroup should probably be deleted. –XanonymusX (talk) 15:17, 3 August 2020 (UTC)

Seems reasonable. Anyone else? --Izno (talk) 20:02, 4 August 2020 (UTC)
Do not forget to remove the rest of the support for the deprecated and deleted {{Navbox subgroup}}. I have made the change to the sandbox. See Special:Diff/948473914/976558840. 50.53.22.81 (talk) 16:54, 3 September 2020 (UTC)
 Done Primefac (talk) 16:59, 3 September 2020 (UTC)
Thank you. 50.53.22.81 (talk) 17:02, 3 September 2020 (UTC)

Undocumented state value

Why does {{MSC Malaysia|state=open}} {{MSC Malaysia}} show the first instance expanded?

It seems that any value for |state=, other than the canonical values, will expand the navbox. -- Michael Bednarek (talk) 03:10, 5 September 2020 (UTC)

You should only use the documented values (autocollapse, collapsed, expanded, plain, off). Why would you want to use another? --Redrose64 🌹 (talk) 08:26, 5 September 2020 (UTC)
I don't want to at all; I just observed that |state=open was inserted into an article, and I was about to correct it when I noticed this behaviour. It seems quite common: insource:/state=open/. -- Michael Bednarek (talk) 10:08, 5 September 2020 (UTC)
The documentation says A navbox with [state=]autocollapse will start out collapsed if there are two or more tables on the same page that use other collapsible tables. Otherwise, the navbox will be expanded. That appears to be consistent with the behavior that is observed here. – Jonesey95 (talk) 13:27, 5 September 2020 (UTC)
The documentation also lists 5 permissible values for |state=, and goes on: If set to expanded, the navbox will always start out in an expanded state. My point is that an infinite number of other values will also expand the box. -- Michael Bednarek (talk) 02:09, 6 September 2020 (UTC)
We should not need to explicitly state that if you don't use one of the five listed parameters things won't go as planned. Primefac (talk) 16:27, 6 September 2020 (UTC)
It's standard for computer-related documentation and behavior to work like this. Consider the alternatives. First, some quite ugly code could be added to the module to display a large error message if a parameter uses an undefined value (I quite like that idea to achieve consistency, but it's hard to retrofit). Second, the documentation could declare that any other value will do X where X is a defined outcome. The problem with that is that if you ever introduce a new value with some different behavior, people will complain that documented behavior has changed. Another problem is the documentation bloat: it's best to say if you enter A then X will occur, if B then Y, etc. People should do what the documentation says. Johnuniq (talk) 23:39, 6 September 2020 (UTC)

Template-protected edit request on 22 September 2020

Decorative images are often not connected directly to the topic of the article, and as such can be confusing when stumbled upon when flipping through images in a Media Viewer interface. See Wikipedia:Village pump (technical) § Invisible Pictures (permalink). Please apply Special:Diff/976559973/979741741 to Module:Navbox to remove such decorative images from Media Viewer. —⁠andrybak (talk) 16:44, 22 September 2020 (UTC)

 Done Nardog (talk) 16:46, 22 September 2020 (UTC)
The article is a derivative under the Creative Commons Attribution-ShareAlike License. A link to the original article can be found here and attribution parties here. By using this site, you agree to the Terms of Use. Gpedia Ⓡ is a registered trademark of the Cyberajah Pty Ltd.