User talk:WardPhoenix/Sandbox

From GodWiki
Jump to: navigation, search

Talk page about my Sandbox projects

  • Be polite
  • Assume good faith
  • No personal attacks
  • Do not bite the newcomers
  • Respond in a mature manner
  • Be welcoming
  • Maintain civility at all times

Djonni/Votes template

Feel completely free to use it, and even to improve it (though please don't break my user page! 😁)

I have no objection to it being moved to a permanent home in Template: if anyone but me would ever use it, as well. -- Djonni (talk) 04:43, 10 October 2020 (UTC)

Well I'd like to add some few tweaks, so I'll try working on that a little. And maybe it will end up in the template main space and used by more than 2 people πŸ˜†. -- WardPhoenix (talk) 09:45, 10 October 2020 (UTC)
Please do, by all means! 😊 One enhancement I have considered for it is a {{{comment}}} parameter, or similar, for nicely formatted /10/08/20 09:46AM, Artifact/ text, but being the only person who uses it means I haven't had much reason to improve it 😊 -- Djonni (talk) 09:59, 10 October 2020 (UTC)

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ So, after a lot of lost time because I thought my code was bugging and thus rewriting the whole template from scratch, then realizing it was not necessary because it was actually the damn wikitable bugging (top 10 of my favorite lost time in coding, atleast I have a better understanding of how the template work) I managed to tweak up the template to change few things:

  • |format=full to display a mobile-ideabox alike format of the data (please note that I manage to put the s on dupe when there is more than 1 dupe!).
    • The default format is still same as yours, I like to call it "light" in my mind)
  • |commment= to add a comment closely formatted like yours in your last comment above.
  • ER will not be highlighted when idea is accepted but yes will be, like it is in the original ideabox.

That particular last change can be tweaked back I guess, especially for the "light" format. Also at the moment, the |status= (accepted/rejected/reviewing) and the |commment= parameters are not displayed in the "light" format at the moment, this could be changed as well.

Thoughts at the moment?--WardPhoenix (talk) 20:35, 18 October 2020 (UTC)

Just had a little look and it looks good! I feel for you, having to rewrite the whole thing πŸ˜‚ But, as you say, at least that means you had to pull it apart and see how it worked!
I think this is basically ready to publish to {{Ideabox votes}} or {{Votes}}, with a couple of minor notes:
  • I would replace those mysterious   that you removed when you rewrote it; those are a special character called a "thin space" and the add just a hair of extra padding for the background colours. Minor aesthetic thing, but still. 😊
  • I think there's no reason why the lite format shouldn't show the {{{comment}}} after the voting numbers;
  • I suggest we call the format you've laid out mobile rather than full, to leave us room to replicate the desktop layout as well later on;
  • To more closely replicate the mobile layout, it might be worthwhile wrapping it in a <div style="text-align: center;">...</div>
That's all I have at first glance, but aside from the name for the format, anything else is easy to fix or improve after publishing it to the template namespace. 😊 -- Djonni (talk) 05:14, 19 October 2020 (UTC)
Well thanks! Will update it when I can, I also need to investigate a little that breaking the table issue:
It need to put the following ||next content on a new line at the moment to not break the table, which could be an issue for those wanting to use the template inside a wikitable. -- β€” Preceding unsigned comment added by WardPhoenix (talk β€’ contribs)
I just had a second look. I'm not sure that I understand what you mean by ||next content on a new line, I can't see that in the template code.
Also, it's probably not related to the table issue, but I'm curious why you've chosen to include the |<span style="display:none;"></span> empty, non-displayed spans...? Were they just for your own debugging, when looking at the expanded code? -- Djonni (talk) 09:01, 19 October 2020 (UTC)

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ For the "display :none", it was a technical necessity for both the status and the comment parameters on the mobile format because it was leaving blank space if the parameters were not used without the display none. I left it on the 4 others in an attempt to debug and because it was easier for me xD Could remove them I think (not entirely sure). As for the wikitable issue, it's not the template directly, but it's use inside a wikitable. (See below) -- WardPhoenix (talk) 10:37, 19 October 2020 (UTC)

This one is broken
Approved Idea Confirmed Votes In-game version
Argh. When I said β€œGive me a break.”, I was not talking about my bones, Almighty!
Just some random text TBD
This one works
Approved Idea Confirmed Votes In-game version
Argh. When I said β€œGive me a break.”, I was not talking about my bones, Almighty!
Just some random text TBD
Ahhhh, now I get you! I can definitely explain that, it's because the output from your template is multi-line. The double pipe || separator only works when it's on the same line as the first cell in the table row. So, if you want to be able to have the template inline in a table like that, there have to be no newlines in the template's output at all. If you head over to Special:ExpandTemplates and paste this into the wikitext box:
{| class="wikitable"
|+ Table
!Header 1 !! Header 2
|{{User:WardPhoenix/Sandbox|1|2|3|4|comment=Comment|format=full}}||Cell 2
you'll see what I mean. It's not difficult to fix. It you like, once it's out of your User: space and in Template:, I can tidy it up quite easily with manual <p>...</p> or <br /> tags. Or I'm sure you can do it yourself, of course. 😊 -- Djonni (talk) 13:49, 19 October 2020 (UTC)
Oh well, I would have not guessed that one, I guess what we consider a new line and what the computer consider a new line is not exactly the same sometimes xD. Not entirely sure how {{tag|p} or <br /> can fix it, but I guess I'm on for a good old "try things until code works and until you understand why it works (second part optionnal)" πŸ˜…. Thanks anyway, will try to update things! --WardPhoenix (talk) 21:10, 19 October 2020 (UTC)
Well, your solution needs to be that the entire output of the template will be on one line, with no line breaks at all. That will mean, though, that the <span>...</span> tags will all be on one line... which, if we don't change anything else, will mean that each 'row' of the output will be all on one line. So the way that <p>...</p> or <br /> would help is by causing the browser to render each on its own line (i.e., <p><span>1 yes</span></p><p><span>2 no</span></p>) without needing to have any actual line breaks in the output.
It's probably worth me pointing out that the first line break from the template actually comes right at the start. If you take the newline away between the </noinclude> and the first <span>, that'll be a good start 😊 -- Djonni (talk) 06:20, 20 October 2020 (UTC)

just a test