User talk:Platonides/NavFrame.js

From Wikimedia Commons, the free media repository
Jump to navigation Jump to search

"experimantal is not defined"

[edit]

I constantly get this error code when opening a page on Commons. I guess that MediaWiki:NavFrame.js is a little bit faulty. Please fix it. thx. --BLueFiSH 15:45, 25 September 2007 (UTC)[reply]

✓ Done Seems that it got on a new line when copied from monobook.js Platonides 11:13, 26 September 2007 (UTC)[reply]

The arrow

[edit]

Is there anyway to put the arrow inside the NavHead? Right now it's completely outside of the box when collapsed. Also, is there a way to customize the arrow so it reads something else like [show]/[hide]? I don't mean changing it with user css (I can do that), but changing it for everyone. For example:

I want to make the "review" the part you click. Is this possible? I think it should say show/hide by default anyway (in whatever language the user is using just like [edit] does with {{int:edit}}) Rocket000 14:39, 28 May 2008 (UTC)[reply]

Nevermind, I got the arrow inside using NavToggle:

But is it ok if I change the arrow to "[" + show/hide + "]"? Show/hide being variables. Rocket000 15:09, 28 May 2008 (UTC)[reply]

BTW, I found we already have MediaWiki:Show and MediaWiki:Hide. Rocket000 15:22, 28 May 2008 (UTC)[reply]

Hmm, I vaguely remember that this issue arrow->text has been discussed before, and the consensus was to keep the symbol. --Dschwen 00:00, 4 June 2008 (UTC)[reply]
Consensus? You mean people besides me care about this!? :) I was asking more from the technical standpoint. Rocket000 07:38, 4 June 2008 (UTC)[reply]
BTW, I believe the arrows were just place-holders until the show/hide was set up in other languages because it says "set up the words in your language" and we have MediaWiki pages for this purpose. Rocket000 07:46, 4 June 2008 (UTC)[reply]

Well, it's better then nothing. I have no idea how to call the MediaWiki show/hide so that it's in the user's language (the same variable used in TOCs). Rocket000 09:30, 4 June 2008 (UTC)[reply]

Uh, by the way, check out Template:QICpromoted. It took me some fumbling around to make it look like I wanted. But it is a customized foldable template. --Dschwen 15:47, 11 June 2008 (UTC), P.S.: Look here for an example usage. --Dschwen 15:48, 11 June 2008 (UTC)[reply]
Yes, that was the inspiration for {{VICpromoted}} :) Rocket000 (talk) 22:08, 12 June 2008 (UTC)[reply]

Show default

[edit]

Whats the idea behind setting the default number of shown navboxes to 50? It seems like we wouldn't need that contraption in that case, or which page has more than 50 boxes?! If 50 boxes are shown by default, what good is the ability to hide them? What user would click 50 times to hide all boxes? I'd suggest setting it down to 2 or 5 at the very most. We could also add a show all/hide all link to pages with navboxes. --Dschwen 15:45, 11 June 2008 (UTC)[reply]

The whole thing seems to work in reverse. Here's a page that has more than five boxes. They used to be collapsed by default before I started messing with it. Now they expand by default (even after reverting everything!). Raising it to 50 solve that problem, but it still doesn't make sense. Rocket000 (talk) 22:07, 12 June 2008 (UTC)[reply]

Ugly arrows can't fix it

[edit]

They don't look that small to me. I got the idea after seeing how nice the ones on n: looked (see their main page). "I see no reason to suddenly change them." Suddenly!? This script been broken forever and no one cares. No one maintains it and it's barely used anywhere (I know this because I broke it completely for three days no one said anything.) Templates like the one this was made for aren't even used because it's so bad. It took me forever to get {{VICpromoted}} to work right, and it's still ugly. If knew JS better, I would fix it. But even against my better judgement, I believe it's time to give in and use collapsible tables. We can deprecated this and remove it pretty easy to keep the size down. Rocket000 (talk) 15:50, 9 July 2008 (UTC)[reply]

Ok you lost me here. Why did it only take me a few minutes to get {{QICpromoted}} to work right? I frankly don't see what the big fuss is about with a gazillion edits in the last few weeks. It didn't seem broken to me. As for people not noticing that you screwed up the code, that doesn't surprise me, my browser for one caches JS pretty aggressively and from experience with other scripts I can say the same is true for many users. --Dschwen (talk) 15:55, 9 July 2008 (UTC)[reply]
What's even worse is that we are the only people talking on this page. So the whole issue doesn't seem to upset anybody. My conclusion from that would be just leave the script as it is. *shrug* --Dschwen (talk) 15:57, 9 July 2008 (UTC)[reply]
Exactly. So why revert me? If anything, it may have had a chance of getting someone else's attention that can help. It took me less than a couple minutes to copy {{QICpromoted}} and adapt it to {{VICpromoted}}, but to do anything more (like I demonstrated above) is practically impossible. I guess you're right about the cache thing. Anyway, I'll leave the arrows alone. I may add a HideText variable so I can change it in the templates (currently I can only change the expand arrow by giving NavFrame a title). There's a lot wrong with the script (for example, NavigationBarShowDefault does the opposite of what it should). However, the biggest issue is that the show/hide is outside the header. Does no one else see this? I don't know... I'll try some other things before I add the collapsible tables and get rid of this. Rocket000 (talk) 17:34, 9 July 2008 (UTC)[reply]
We could split the title with a / as the delimiter, so title="show/hide" would set bot HideText and ShowText. --Dschwen (talk) 17:42, 9 July 2008 (UTC)[reply]
I didn't know that was possible. I came across another problem though. The title thing doesn't work when you put display:none in NavContent which is almost always the desired behaviour. BTW, I'm testing out the collapsible tables right now (Meta's version) and I just realized we have all the CSS already sitting unused in MediaWiki:Common.css (navbox was recently used in a couple templates but none of the others). There's a few other styles that are unused too, but still I need to check the user space. Choosing tables over divs sounds kinda backwards but they really do work better with MediaWiki (they can be sorted and have much simpler markup - {|...|} compared to three or four divs). Rocket000 (talk) 00:32, 10 July 2008 (UTC)[reply]

Yay! It works now. Rocket000(talk) 04:15, 18 August 2008 (UTC)[reply]

Layout...

[edit]

Use {{FoldHead}}, {{FoldBody}}, and {{FoldFoot}} to construct foldable boxes. {{QICpromoted}} might be updated to use those; that would also get rid of the layout problem that the triangle is displayed over the text. Lupo 09:03, 18 December 2008 (UTC)[reply]

Sister script

[edit]

MediaWiki:CollapsibleTables.js is a very similar script doing the same thing for tables instead of divs. Can't we merge these two? Lupo 09:03, 18 December 2008 (UTC)[reply]

MediaWiki:CollapsibleTables.js works by removing row by row that exploit the difference between table, tr and th. MediaWiki talk:NavFrame.js its a series of divs and what it does it looks for the individual class names to know how to handle each one. Thats may main issue i've found in the past when trying to merge this 2 collapsible js, thought im quite newb on js script --User:Cizagna at wikia.com

Wrapped up in templates

[edit]

I should link to the documenation.

Template:FoldHead A lengthy review... Template:FoldBody This a comment.
This is another comment.
This is the result. Template:FoldFoot

It looks much nicer when the div code is wrapped up in templates. --04:00, 24 December 2008 (UTC)