Template talk:Tree list

Names of templates
I wasn't too sure about the names for /branching and /final branching. Are there any better alternatives? &mdash; Martin (MSGJ · talk) 15:01, 22 June 2012 (UTC)
 * Hi, yes we were just discussing the same type of naming "issue". embanchement is branching, and branche is branch! I tried, , , , and . We were discussing on the succession talk page. I must be one of those "strange" programmers that embraced "CamelCase" a long time ago, I am not overly committed to keeping the CamelCase, but would prefer we use "Tree list" as it is more descriptive of what the template does.  and I had started the work on importing and translating, perhaps we should include all parties in the discussion?--UnQuébécois (talk) 15:38, 22 June 2012 (UTC)
 * I went with "tree view" because this is what UnQuébécois called it on his post to Mediawiki talk:Common.css. If you are sure "list" is better then I will not oppose Template:Tree list (with space and without Camel!) UnQuébécois: what is your opinion? &mdash; Martin (MSGJ · talk) 16:04, 22 June 2012 (UTC)
 * I copied the class directly as is, it was already called Treeview, and wanted to keep consistency across the wikis, however I also specifically referred to it as a list in the request, and all references to the templates spoke of a list! Like I said, I would prefer "Tree list" to "Tree view" for the templates, and I can capitulate to not using CamelCase! I do think we need to revisit the branching names, to avoid confusion for the "luddites" ! --UnQuébécois (talk) 16:54, 22 June 2012 (UTC)
 * Okay moved. Sorry for the confusion above - I saw ‎Martinvl's name and I thought that was his post not yours! Think I need some more coffee. &mdash; Martin (MSGJ · talk) 17:08, 22 June 2012 (UTC)

/end
I don't see /end as being particularly necessary. The same could be accomplished with a slight tweak to template:tree list (the addition of a parameter and the closing tags in /end), from what I can tell, in much the same way we would apply Template:Plainlist or Template:Flatlist. --Izno (talk) 20:11, 23 June 2012 (UTC)
 * /end is the same thing as, with the different branching levels, I'm not sure how you would implement the branching templates inside the outer template easily. The template was created in another language wiki, and was imported as is, except for the strange branching names. --Education does not equal common sense. (talk) 23:25, 25 June 2012 (UTC)
 * I don't see it being implemented any differently than with plainlist. Why do you think there would be a problem?
 * As for endplainlist, I didn't even know that existed, nor do would I personally condone its use. Templates with only a &lt;/div> (or another closing tag) seem like bad template editing to me. /shrug
 * I'm well aware it was imported as is. I'm suggesting that it shouldn't be used, "as is", since en has a chance to improve upon the case, I believe.
 * On another note, is it just me or should be coded as a &lt;span> rather than as an &lt;li> and then closed (&lt;/span>) rather than left to hang open? the same question for /finalbranching... --Izno (talk) 23:42, 25 June 2012 (UTC)
 * As it's a list, it implements list items, instead of numbering, or a,b,c or squares or dots. there are branches that link back up, it denotes that it is the last item in the list, at that level. --Education does not equal common sense. (talk) 00:03, 26 June 2012 (UTC)
 * Yes, but there's already an &lt;li> at the appropriate level. We're just opening another li and doing... what with it? I'm almost positive that should be a span and not an li. --IznoRepeat (talk) 00:18, 26 June 2012 (UTC)
 * Perhaps try it in the sandbox and make sure it works as intended? &mdash; Martin (MSGJ · talk) 11:24, 26 June 2012 (UTC)
 * Keeping the syntax similar to the other list formatting templates is probably a good idea, so if you are willing to update the usages and documentation I would be happy to go along with that. &mdash; Martin (MSGJ · talk) 11:23, 26 June 2012 (UTC)

Sub template names
Before this template gets widely used, can we come up with better names for the branching functionality? "final branch", "branching", "final branching", I know what the template does and these names are confusing to me. I had originally considered names like: "branch" - "last branch" - "terminal branch", or something more descriptive. --Education does not equal common sense. (talk) 20:20, 26 June 2012 (UTC)
 * No strong opinions on this one. If you can think of names which make sense to you, then please go ahead ;) &mdash; Martin (MSGJ · talk) 20:48, 26 June 2012 (UTC)

How to get this working on a self hosted wiki?
How do you get this working on a self hosted wiki? Do you just need to be on the latest version of the software? Is a plug-in of some kind needed? — Preceding unsigned comment added by 80.175.162.2 (talk) 12:50, 11 June 2015 (UTC)

Mobile
This doesn't display as intended on mobile. You just get normal bullets. Hairy Dude (talk) 01:59, 8 December 2015 (UTC)

First branch for second level?
Is there a way to have the first branch start at the second level and render like an upside down version of Template:tree list/final branch?  Ergo Sum  05:29, 9 July 2017 (UTC)
 * No see Village pump (technical)/Archive 160 -- PBS (talk) 20:27, 17 November 2017 (UTC)

Tree list will break
An uncommon but valid way to use the tree table is to have multiple nested empty branches, e.g.


 * Een tak op het eerste niveau
 * Een tak op het vierde niveau (hiervoor gaat het fout)
 * Nog een tak op het vierde niveau
 * Nog een tak op het derde niveau
 * De laatste tak op het derde niveau
 * Een tak op het tweede niveau
 * Een tak op het vierde niveau (hiervoor gaat het fout)
 * De laatste tak op het vierde niveau
 * De laatste tak op het derde niveau
 * Een tak op het vierde niveau (hiervoor gaat het fout)
 * De laatste tak op het vierde niveau
 * De laatste tak op het derde niveau
 * De laatste tak op het derde niveau

However, this breaks under the new parser. See [//en.wikipedia.org/w/index.php?title=Template_talk:Tree_list&action=parsermigration-edit#Tree_list_will_break here]. The problem is that asterisks are handled differently: Remex insert extraneous invisible empty &lt;li>-elements which match the first-child CSS selector. Is this something that can be solved in CSS and/or wikicode? --bdijkstra (talk) 10:43, 28 March 2018 (UTC)
 * Hmm, this is going to be a bit difficult.. Not sure if this is fixable while maintaining the current template structure. I created sandbox versions and testcases, to experiment but couldn't immediately figure something out. —Th e DJ (talk • contribs) 10:41, 6 April 2018 (UTC)
 * Well hopefully this crazy magic can save us.. Testcases with parser migration tool —Th e DJ (talk • contribs) 11:20, 6 April 2018 (UTC)
 * Thanks! I've deployed this without ".mw-parsermigration-right" on nlwiki, where Remex is already active, and there it works fine (after a browser cache refresh). --bdijkstra (talk) 15:30, 6 April 2018 (UTC)
 * Also live on en.wp now. —Th e DJ (talk • contribs) 12:20, 10 July 2018 (UTC)

A problem with long Tree list
When there are more than 133 lines in one of the tree branches, the connecting line is disconnected.

Look at User:RimerMoshe/Tree list Template.

Is it possible to increase the number of rows to as many as possible? RimerMoshe (talk) 13:38, 28 December 2018 (UTC)
 * Looks OK to me. -- Red rose64 &#x1f339; (talk) 22:48, 28 December 2018 (UTC)
 * Red rose64, Please look for the line with the word "A problem" in User:RimerMoshe/Tree list Template. RimerMoshe (talk) 16:50, 30 December 2018 (UTC)
 * I did. There is no problem there. -- Red rose64 &#x1f339; (talk) 23:35, 30 December 2018 (UTC)
 * Red rose64, I see what appears in Figure 1. Do you see anything different? The line of the tree chart is broken in a place marked with a green circle in Figure 2. I expect the line to continue as indicated in red.


 * Thank you. RimerMoshe (talk) 08:20, 31 December 2018 (UTC)
 * Tree list problem temp 03.PNG It might be a problem with your browser; mine is Opera 36. BTW I used a PNG file, not a JPG, per WP:WPSHOT - it's much smaller, 3 KB rather than 50 KB or larger. -- Red rose64 &#x1f339; (talk) 09:02, 31 December 2018 (UTC)
 * Red rose64, My browser is Internet Explorer 11. RimerMoshe (talk) 11:19, 31 December 2018 (UTC)
 * Microsoft. They always get it wrong. I've dropped a note at Village pump (technical). -- Red rose64 &#x1f339; (talk) 22:13, 31 December 2018 (UTC)
 * FWIW: It looks fine to me in Firefox for Mac (logged in or logged out), but it is broken in Safari for Mac and Chrome for Mac (both logged out of WP). In the latter two, the line hooks right at "006", two lines below the "004 A problem" line, then resumes its vertical path just above "A second level branch", as in the screen shots above. – Jonesey95 (talk) 22:49, 31 December 2018 (UTC)

I think the problem may be with the file "upload.wikimedia.org/wikipedia/commons/f/f2/Treeview-grey-line.png" that is used to draw the line. It is 5983 pixels long. One resolution to this problem may be to make this line longer, and then update Template:Tree list/styles.css with the new length. – Jonesey95 (talk) 23:07, 31 December 2018 (UTC)
 * , we can also just document that the limit is about 130 entries. Especially since this seems a theoretical problem and not an article problem. —Th e DJ (talk • contribs) 07:15, 2 January 2019 (UTC)
 * Th e DJ, This is not a theoretical question. See he:פורטל:דואר ובולאות/מילון מונחים/לפי נושא in the Hebrew Wikipedia (Still under construction). RimerMoshe (talk) 09:33, 2 January 2019 (UTC)
 * , We cannot endlessly make that image bigger. There will always be limits. Some lists will simply be too big. I also highly question the usability of that tree there. If I need to scroll so much, I have lost my sense of indentation anyways, so I don't see the value of using the tree for that specific example.
 * If anything, someone might try to rework the complete implementation of the template to not require an image as a single continuous line for multiple entries. (or preferably, avoid images all together and make the thing accessible to the blind at the same time... ), but that is a different endeavour. —Th e DJ (talk • contribs) 09:42, 2 January 2019 (UTC)
 * Th e DJ, Thank you for the answer. I understand that there must be a limit, but I would be happy if the bar could be raised to a higher number of lines, such as 250 or 300 instead of 133. If this is not possible, of course I will have to adjust accordingly and change my list structure. RimerMoshe (talk) 09:55, 2 January 2019 (UTC)

Untitled
background: url("//upload.wikimedia.org/wikipedia/commons/f/f2/Treeview-grey-line.png") no-repeat 0 -2981px;

Is not valid css. — Preceding unsigned comment added by 213.146.6.1 (talk) 13:09, 16 July 2019 (UTC)


 * Could you provide a use case that will fail in the W3C CSS Validator? --bdijkstra (talk) 13:43, 21 February 2020 (UTC)

Option to disable list items text wrapping
The template does not seem to allow disabling of text wrapping for the list contents. The tree view, when its list items are text-wrapped, can sometimes look cluttered and/or confusing when list items contain dashes, which can make the dash look like a branch of the tree in small screens. I tried using and nbsp characters but the list items remain text-wrapped. Perhaps allowing an option/parameter to disable text wrapping might help? Sanglahi86 (talk) 20:55, 16 July 2022 (UTC)

Collapsing
Is it possible to add an element which can collapse one branch? BluesD (talk) 09:08, 28 April 2023 (UTC)


 * Just use the on the branch. BluesD (talk) 09:39, 28 April 2023 (UTC)


 * How exactly did you do it? seems to break one level of  to me. The code


 * Grampa
 * Dad***Brother
 * Sister
 * Nephew
 * Subject
 * Uncle
 * Aunt


 * Results in:


 * Grampa
 * Dad
 * Brother
 * Sister
 * Nephew
 * Subject
 * Uncle
 * Aunt


 * Makes aunt and uncle siblings to their father. I need an additional * to get what I want, i.e. grampa's children:


 * Grampa
 * Dad
 * Brother
 * Sister
 * Nephew
 * Subject
 * Uncle
 * Aunt


 * Grampa
 * Dad
 * Brother
 * Sister
 * Nephew
 * Subject
 * Uncle
 * Aunt


 * Cato censor (talk) 14:43, 19 July 2024 (UTC)


 * It turns out you only need, not , but I'm afraid it could result in ill-formed HTML not rendering correctly in every browser. Any ideas? Cato censor (talk) 16:12, 19 July 2024 (UTC)


 * Grampa
 * Dad
 * Brother
 * Sister
 * Nephew
 * Subject
 * Uncle
 * Cousin
 * Aunt