Template talk:Use list
Proposed Improvement
Use lists have always bugged me, as for some commodities, they're simply very long. I tried to use our standard show/hide template but it wouldn't work with a table for the content so it could be columnised. I'd like some feedback on my first attempt at resolving these problems. I'm open to all comments - as is the wiki-way! This template could probably use a better name too, possibly using it in other places which have long lists? --Sagacious (talk) 19:52, 26 June 2008 (PDT)
- I likes. That said, since they're show/hide boxes, it doesn't matter how long they are, so I'm thinking some standard set of boxes would make things simpler. Like Buildings, Apothecary products, Furnisher products, Tailoring products, Weavery products, Shipyard products, Ironworking products and Distillery products, with something that doesn't include the box if the parameter is blank. For example, something like
{{Use list |furnisher= *product 1 *product 2 |distillery= *product 3 *product 4 |width=75% }}
- And the template will display a show/hide box for the furnisher and distillery products, but not any of the others. Not too sure how easily that could be worked. --Belthazar451 00:32, 27 June 2008 (PDT)
- Kinda, sorta, not really. The template cannot automagically push content into columns - it will just appear in one long list. Since a manual new column is triggered by a | that interferes with a template unless it's kinda - built in. So the method you suggested lacks a way of columnising the list of items - which was part of the purpose of the template. I see where you were going though :) --Sagacious (talk) 05:25, 27 June 2008 (PDT)
- Ah whoops, I didn't see where you'd called the col2 and col3 parameters on the Wood page. Maybe |furnisher=yes then |furnisher1=blah |furnisher2=blah? It just seems a shade unwieldy to have to re-call the same sort of show/hide boxes on umpteen commodity pages, when they're all using the same basic set of headings. --Belthazar451 07:01, 27 June 2008 (PDT)
- I think this could be possible. Try using Template:! to pass the pipe character to the template.--Fiddler 07:13, 27 June 2008 (PDT)
- Kinda, sorta, not really. The template cannot automagically push content into columns - it will just appear in one long list. Since a manual new column is triggered by a | that interferes with a template unless it's kinda - built in. So the method you suggested lacks a way of columnising the list of items - which was part of the purpose of the template. I see where you were going though :) --Sagacious (talk) 05:25, 27 June 2008 (PDT)
Here's a thought on another approach.
{{ifdef|{{{buildings|}}}|2={{Template:Use list-code|title=Buildings|list={{{buildings}}} }} }}
And you'd call it like this
{{uselist |buildings= *[[Apothecary]] [[bazaar]] (180) *Apothecary [[shoppe]] (90) *[[Bank]] (150) *[[Commodities market]] (300) *[[Distillery]] bazaar (300) *Distillery shoppe (150) {{!}} *[[Estate agent]] (160) *[[Fort]] (320) *[[Inn]] (520) *[[Iron monger]] bazaar (240) *Iron monger shoppe (120) *[[Palace]] (320) {{!}} *[[Shipyard]] bazaar (1000) *Shipyard shoppe (520) *[[Tailor]] bazaar (280) *Tailor shoppe (140) *[[Weavery]] bazaar (200) *Weavery shoppe (100) |shipyard= blah blah blah }}
--Fiddler 07:59, 27 June 2008 (PDT)
- Just got the hang of ifdef - I'll try this modification. --Sagacious (talk) 08:08, 27 June 2008 (PDT)
- Your suggestion was better than what I had going. The results can be seen here. Do you propose renaming Template:Use list/showhide to Template:Use list-code? --Sagacious (talk) 08:15, 27 June 2008 (PDT)
- Nah, I just had to pick a subtemplate name and that's the first thing that popped into my head. Looks good. --Fiddler 08:23, 27 June 2008 (PDT)
- Any ideas why the "puzzlepirates" skin on YPPedia makes small fonts appear big? I don't use it, but I test layout changes under it and without the lists being small in font size they look bleh. --Sagacious (talk) 08:49, 27 June 2008 (PDT)
- I'm on the Puzzlepirates skin and I don't see any difference between it and regular monobook. Could you provide a screenshot of the problems you're seeing? --Fiddler 09:01, 27 June 2008 (PDT)
- MonoBook vs. PuzzlePirates. It's the same in FF3 - I just tested it. --Sagacious (talk) 09:13, 27 June 2008 (PDT)
- I'm on the Puzzlepirates skin and I don't see any difference between it and regular monobook. Could you provide a screenshot of the problems you're seeing? --Fiddler 09:01, 27 June 2008 (PDT)
- Any ideas why the "puzzlepirates" skin on YPPedia makes small fonts appear big? I don't use it, but I test layout changes under it and without the lists being small in font size they look bleh. --Sagacious (talk) 08:49, 27 June 2008 (PDT)
- Nah, I just had to pick a subtemplate name and that's the first thing that popped into my head. Looks good. --Fiddler 08:23, 27 June 2008 (PDT)
- Your suggestion was better than what I had going. The results can be seen here. Do you propose renaming Template:Use list/showhide to Template:Use list-code? --Sagacious (talk) 08:15, 27 June 2008 (PDT)
(undent) Hmm. Maybe it's something to do with your font size. Truth be told though I like what I see in your puzzlepirates screenshot better. And since that's the default for all new users that's the skinn we should be designing for. --Fiddler 09:16, 27 June 2008 (PDT)
- It's strange though, because if you compare the size of the text before the show/hides - it's the same between both skins. --Sagacious (talk) 09:20, 27 June 2008 (PDT)
- I really like the look of this. It is certainly cleaning up the pages it is used on. One thing I would I find odd when looking at some of the showhide boxes is when the number of items of one of the columns is not matched with the others. I would prefer there not to be a vertical centering of the columns. Not sure where that is called from. -- Cedarwings (talk) 10:19, 27 June 2008 (PDT)
- It did look odd. Vertical alignment is now set to top. Before, it was using the default of center. I added a bgcolor parameter to {{showhide}} (Usage) and made this template use a light green. I think it works well - better than the beige default. --Sagacious (talk) 10:30, 27 June 2008 (PDT)
- I likes. I'm vaguely curious, though - why light green? =) Also, I'm thinking it might be an idea to include some links in the usage notes to pages which use the template, and maybe also to show the sample code again without the nowiki tags so users can see what the code will produce. Mind you, what does look a shade odd is the way the horizontal spacing of the columns isn't preserved between show/hide boxes, but I don't think there's anything you can do about that. --Belthazar451 16:22, 27 June 2008 (PDT)
- It did look odd. Vertical alignment is now set to top. Before, it was using the default of center. I added a bgcolor parameter to {{showhide}} (Usage) and made this template use a light green. I think it works well - better than the beige default. --Sagacious (talk) 10:30, 27 June 2008 (PDT)
- I really like the look of this. It is certainly cleaning up the pages it is used on. One thing I would I find odd when looking at some of the showhide boxes is when the number of items of one of the columns is not matched with the others. I would prefer there not to be a vertical centering of the columns. Not sure where that is called from. -- Cedarwings (talk) 10:19, 27 June 2008 (PDT)
(undent)Light green because I tried blue and it made the links a little hard on the eyes, it's not used on other show/hides, yellow is too close to beige, and I was going for something that wasn't too bright. I tried making the table 100% wide, in the hope the columns would space out evenly, but to no avail. --Sagacious (talk) 16:44, 27 June 2008 (PDT)
- I've had a stab at improving the usage section - but please stretch and destroy at will :-) --Sagacious (talk) 21:23, 27 June 2008 (PDT)
- No, no, it looks good now. I made a little tweak so the sample code would be the same as the demonstration, but otherwise it's good. In other news, I'm not entirely sure that mala-cat green is a very piratey colour, so I changed it to #be9884 - I got that from sampling the colour used in the dotted line on the header image and increasing the brighness so that the blue links would be readable. Change it back if you don't like it. =) --Belthazar451 22:18, 27 June 2008 (PDT)
- Okies then, let's see. Here's a few different saturation levels:
#be7c58 - the same colour as that used in the header bar
#be8a6e
#be9884
#bea99d
#beb3ad
#beb8b5
- I'm a fan of either 3 or 4, or at least something in approximately that range. 3 is what I currently have there now, and it looks fine on my monitor, though I suppose other people have different monitor settings. Once we get past 4, it starts looking a bit washed out to me. Though mind you, there's no real need to go with my suggested hue either. =) --Belthazar451 04:28, 28 June 2008 (PDT)
- I tried to avoid grey as we use that colour for trophy show/hides. 1-4 still make the blue kinda hard to read, not sure if it's a variation in browser colour rendering. 5 & 6 are grey >.> Why isn't Mala-cat green piratey :-P --Sagacious (talk) 06:47, 28 June 2008 (PDT)
- I have no problem reading the blue text on any of them, even 1, but yes, we do have to account for variations. I agree that we should avoid grey. That's the problem with fiddling with the saturation - eventually you just get grey. As for mala-cat green, it just doesn't excite me for some reason. =) I could always try pulling another colour off the header. Like
- I tried to avoid grey as we use that colour for trophy show/hides. 1-4 still make the blue kinda hard to read, not sure if it's a variation in browser colour rendering. 5 & 6 are grey >.> Why isn't Mala-cat green piratey :-P --Sagacious (talk) 06:47, 28 June 2008 (PDT)
- I'm a fan of either 3 or 4, or at least something in approximately that range. 3 is what I currently have there now, and it looks fine on my monitor, though I suppose other people have different monitor settings. Once we get past 4, it starts looking a bit washed out to me. Though mind you, there's no real need to go with my suggested hue either. =) --Belthazar451 04:28, 28 June 2008 (PDT)
#cfae7a
or
#d0ae7b
- --Belthazar451 07:05, 28 June 2008 (PDT)
(undent) If anything, the first one looks slightly clearer than the second. We spend too much time on finer details :-P --Sagacious (talk) 08:03, 28 June 2008 (PDT)
- No, it's just me, making a fuss over silly things. =) So, are you happy with #cfae7a, then? Or should we just give up on the whole thing and revert to mala-cat green? We could always try one of the pre-established standard background colours. --Belthazar451 15:56, 28 June 2008 (PDT)
Furniture
Is it worth appending each furniture entry so they link to their entry on the furniture list pages e.g. Stool ? It won't take me that long to make this change. --Sagacious (talk) 14:01, 27 June 2008 (PDT)
Debugging time
I've found a curious flaw in the template - if the list skips two parameters (for example, has furnisher and tailor products but not ironmonger or shipyard products) then the template leaves a gap between the two show/hide boxes. Broom flower#Use is a good example of what I mean. A bit of non-exhaustive testing shows that it's not confined to the example I gave above - if it has distillery and shipyard products but not furnisher or ironmonger, it leaves the gap in the corresponding spot. --Belthazar451 21:09, 27 June 2008 (PDT)
- Culprit - putting each section on a new line on the template. The show/hide divs already ensure each section is put on a new line, so it was just a clash of divs. --Sagacious (talk) 21:12, 27 June 2008 (PDT)
- Aye, I suspected it might have been that... --Belthazar451 22:18, 27 June 2008 (PDT)