Template talk:Progress bar
This template is so awesome! Thanks for making it ^^ - anja 10:48, 6 November 2007 (UTC)
- I dig the good documentation and examples. =) --Xeeron 12:23, 6 November 2007 (UTC)
- Thank you very much! User:Ab.er.rant helped me a lot whith this template by giving me hints on how to give it a proper name and how to format the documentation. He is also the one who had the original idea for the second calculation method. Please enjoy this template, and don't hesitate to ask questions if something isn't clear or to report a bug if you find one. -- Funky Jah (talk) 19:58, 6 November 2007 (UTC)
- Nicely documented Funky Jah!
- A suggestion: perhaps you might want to add a possibility to reverse the progress bar's colors? -- (CoRrRan / talk) 18:21, 13 November 2007 (UTC)
- What do you mean by reverse?
bar-background
andbox-background
lets you set your own colors for the bar. -- ab.er.rant 07:14, 14 November 2007 (UTC)- If you are talking about the color of the text automatically changing when it reaches the right border of the bar (see User:Anja_Astor/Sandbox), I already tried but didn't find any accessible and standard-compliant way to do it. Anja's solution is not flexible enough to be included into this template. I am still trying to figure out how to do this, maybe using javascript, but I'll have to be sure that disabling javascript won't break the design of the bar. Anyway, I'm still not sure this feature is really necessary. --Funky Jah (talk) 10:51, 15 November 2007 (UTC)
- What do you mean by reverse?
- Thank you very much! User:Ab.er.rant helped me a lot whith this template by giving me hints on how to give it a proper name and how to format the documentation. He is also the one who had the original idea for the second calculation method. Please enjoy this template, and don't hesitate to ask questions if something isn't clear or to report a bug if you find one. -- Funky Jah (talk) 19:58, 6 November 2007 (UTC)
Variables Extension[edit]
OMG I just realized that the Variables Extension has been installed on this wiki!!! That's just the one thing I needed to make this template even better (and a little less hard to read...) -- Funky Jah (talk) 16:29, 16 November 2007 (UTC)
- Well, after a few tests, this is hard to use and does not give interesting results, so I'll forget about it. --Funky Jah (talk) 10:50, 19 February 2008 (UTC)
- And... after opening my eyes, I just used it to create Template:Progress bar evolved, so after all it's a great extension. Funky Jah (talk) 22:01, 10 August 2009 (UTC)
Template evolution[edit]
I have a few ideas to make this template even more simple to use and customize. But this requires to rewrite all the code of the template. This would be a good thing, as it is very hard to read and maintain as it is now (all these curly braces make me sick... I wanna kick the guy who invented this syntax!). I can do it by myself, this should not be a problem as I have a pretty good idea of what I have to do and how to do it. The real problem is that if I change the code of this template, every user who used it on their pages will have to adapt their code to the new version. So I could put the new version of the template under a different name, but then how to tell people to use this one instead of the old one? I would personnaly rather stop supporting the old version once the new one is finished, so this is how I intend to do things:
- Write the new version in my userspace
- Once it is finished, replace the old version with the new one
- Then either:
- tell every user about the new version so that they can change their "broken" bars OR
- change the old bars myself so that they match as precisely as possible with their previous appearance OR
- add something to the template that notifies the viewer of a bar that it is using a deprecated version of the template
Tell me which solution you prefer, if you have suggestions, etc. -- Funky Jah (talk) 11:05, 19 February 2008 (UTC)
- It's really up to you and how much work you're willing to do :) It's fine to even not bother with telling people about the changes - they'll notice when they look at their page and they'll come here. Just have the docs ready. Or you can be a dear and go about fixing everyone's progress bar for them :) But the best middle ground would be to just leave a note on all those pages that use this template and telling them when you plan on upgrading this to version 2 and tell them to take note of it. -- ab.er.rant 14:39, 19 February 2008 (UTC)
- Sounds like a plan :) -- Funky Jah (talk) 15:31, 19 February 2008 (UTC)
- I've made a few tests, here is my demo of the new version of the progress bar : User:Funky_Jah/Sandbox. There are two major modifications :
- externalization of the second calculation method using variables
- new theme behavior which uses a theme template that can be reused through several bars and in any template compatible with this theme system.
- These two features need further improvement, but before I do that, please tell me what you think about them. -- Funky Jah (talk) 14:35, 20 February 2008 (UTC)
- Are you making it compulsory to use a theme page? -- ab.er.rant 04:01, 21 February 2008 (UTC)
- Well I don't know yet, this feature is far from being complete, and it's just a demo for now. But the idea behind this v2 is to externalize everything that is not necessary to the template, to make the code lighter and easier to read. In your case, instead of creating your own template with your specific default parameters, you could replace it with a theme template and pass it to the generic progress bar. However, I realize that this might be too much of a hassle if you intend to put only 1 bar in your page, or if you make several bars with different designs. So I may merge both methods. But then the code would become even harder to read... Oh Mighty Lyssa show me the way. Please. -- Funky Jah (talk) 09:16, 21 February 2008 (UTC)
- Well, given that the majority of template users don't bother even glancing at the code, readability is actually much less of an issue than ease-of-use. Having to create an additional page just for a progress bar (as opposed to a one-liner where I just put in my preferred colors) does seem to be a hassle. If you would like to explore the theme page further, my suggestion would be to keep this template as it is and create a new one instead, so that users who want to set up a theme can do so, yet those who don't, don't need to. -- ab.er.rant 01:42, 22 February 2008 (UTC)
- Well I don't know yet, this feature is far from being complete, and it's just a demo for now. But the idea behind this v2 is to externalize everything that is not necessary to the template, to make the code lighter and easier to read. In your case, instead of creating your own template with your specific default parameters, you could replace it with a theme template and pass it to the generic progress bar. However, I realize that this might be too much of a hassle if you intend to put only 1 bar in your page, or if you make several bars with different designs. So I may merge both methods. But then the code would become even harder to read... Oh Mighty Lyssa show me the way. Please. -- Funky Jah (talk) 09:16, 21 February 2008 (UTC)
- Are you making it compulsory to use a theme page? -- ab.er.rant 04:01, 21 February 2008 (UTC)
- I've made a few tests, here is my demo of the new version of the progress bar : User:Funky_Jah/Sandbox. There are two major modifications :
- Sounds like a plan :) -- Funky Jah (talk) 15:31, 19 February 2008 (UTC)
bug[edit]
the progression system with min, max and current seems to lead to bugs, like here. min is set to 0 there, max to 15000. When current is between ~300 and ~9000, the box gets an unusual height. - Y0_ich_halt 18:05, 12 May 2008 (UTC)
fixed. - Y0_ich_halt 22:19, 12 May 2008 (UTC)
overall style[edit]
i propose just adding {{{box-style}}}
and {{{bar-style}}}
. Put these at the very end of the style parts (style="...xyz:ab; {{{box-style}}}"
) and anything inside will overwrite the values given before. it's much easier. - Y0_ich_halt 12:32, 8 June 2008 (UTC)
- I was working on something like this but nothing really cool, simple to use and flexible enough came up to my mind. I had thought of some kind of "theme" system for the bar, but it was a serious pain in the ass to set up one, not to mention maintaining current behavior for those who do not wish to re-configure their bars was nearly impossible. So that's why I gave up this idea. But if you think of something nice to add to this bar, I'm really interested! Please speak further of your idea! --Funky Jah (talk) 21:01, 17 June 2008 (UTC)
Current
<div title="(title calculation) {{{desc|}}}}}}" style="background:{{{box-background|white}}}; border:{{{box-border|1px solid black}}}; margin:{{{box-margin|1px}}}; padding:{{{box-padding|1px}}}; width:{{{box-width|100%}}}; color:{{{text-color|black}}}; font-size:{{{text-size|small}}}; font-weight:{{{text-weight|bold}}}; line-height:1.25em;"> <div style="margin:0; padding:0; position:relative;"> <div style="margin:0; padding:0; width:(width calculation); background:{{{bar-background|#AAAAFF}}}; height:1.25em;">   </div> <div style="margin:0; padding:0; width:100%; position:absolute; top:0; z-index:1; background-color:transparent;text-align:center;"> (value calculation) {{{desc|}}}}}} </div> </div></div>
My change
<div title="(...) font-weight:{{{text-weight|bold}}}; line-height:1.25em; {{{box-style|}}}"> <div style="margin:0; padding:0; position:relative;"> <div style="margin:0; padding:0; width:(width calculation); background:{{{bar-background|#AAAAFF}}}; height:1.25em; {{{bar-style|}}}">   </div> <div style="margin:0; padding:0; width:100%; position:absolute; top:0; z-index:1; background-color:transparent;text-align:center;"> (value calculation) {{{desc|}}}}}} </div> </div></div>
(added some spacing for better viewability, also left out the colons for  (;))
The only changes are the two parameters {{{boy-style}}} and {{{bar-style}}}. These have to be at the end of the style attribute, because if one feature (like width, border, etc.) is defined twice, the latter is taken into effect. This means, you can fully use the standard setting and put anything you want to customize inside these parameters. if you add a second border-attribute, the default one will just be ignored. i used this method for my template profession div, too. - Y0_ich_halt 15:43, 18 June 2008 (UTC)
- That's smart! I think I'm gonna try this out to improve my theme system --Funky Jah (talk) 21:50, 18 June 2008 (UTC)
Thanks to all of you who like this template[edit]
It's been a while since I last came here to see how things are going for my cute little template. I was really amazed by the number of pages that link here! So I just wanted to thank everybody who included the progress bar template in their personal pages. Thanks to the people who helped improve this template too, you guys rock! Now that I'm all pumped up by this huge success, I might actually change a thing or two in the documentation (better English style, link to a CSS doc that can be read without a PhD in Computer Science, etc.). I have no intention on changing the template itself. There are a few things that could have been done better, but I fear changing anything would cause issues to the users. Perhaps there will be a v2.0 in an uncertain future, maybe on the GW2 wiki... --Funky Jah (talk) 15:05, 1 December 2008 (UTC)
- Amazing! I just got bored, so I came to Special:MostLinkedTemplates, and this one scores 61st over 1590 templates, with a total of 1550 links! I guess it's a bit too late for Template:Progress bar evolved to get such a high score, but who knows... (that's called psychological marketing ^^) Funky Jah (talk) 22:08, 10 August 2009 (UTC)
Comma?[edit]
Is there a way to make it display commas? Example: 4,328 / 10,000. || DarkMugen 23:01, 12 June 2011 (UTC)
- I'll try something out, but not on this template, as I do not support it anymore. See you on Template:Progress bar evolved for any new features! --Funky Jah (talk) 17:35, 13 June 2011 (UTC)
- Done! Check out the Progress bar evolved template for this cool new number formatting! --Funky Jah (talk) 18:58, 13 June 2011 (UTC)