Difference between revisions of "User talk:WardPhoenix/Sandbox"

From GodWiki
Jump to navigation Jump to search
m
m (archiving)
Tag: Replaced
Line 1: Line 1:
 
{{talkheader|title=Talk page about my Sandbox projects}}
 
{{talkheader|title=Talk page about my Sandbox projects}}
 
== 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 <code>Template:</code> if anyone but me would ever use it, as well. -- [[User:Djonni|Djonni]] ([[User talk: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 😆. -- [[User:WardPhoenix|WardPhoenix]] ([[User talk:WardPhoenix|talk]]) 09:45, 10 October 2020 (UTC)
 
 
:: Please do, by all means! 😊 One enhancement I have considered for it is a {{param|comment}} parameter, or similar, for nicely formatted <span style="font-family: Verdana, Helvetica, Arial, sans-serif; font-style: italic; color: #999;">/10/08/20 09:46AM, Artifact/</span> text, but being the only person who uses it means I haven't had much reason to improve it 😊 -- [[User:Djonni|Djonni]] ([[User talk:Djonni|talk]]) 09:59, 10 October 2020 (UTC)
 
 
{{outdent|::}} 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:
 
* {{para|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)
 
* {{para|commment}} to add a comment closely formatted like yours in your last comment above.
 
* <code>ER</code> will not be highlighted when idea is accepted but <code>yes</code> 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 {{para|status}} (accepted/rejected/reviewing) and the {{para|commment}} parameters are not displayed in the "light" format at the moment, this could be changed as well.
 
 
Thoughts at the moment?--[[User:WardPhoenix|WardPhoenix]] ([[User talk: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 {{tlc|Ideabox votes}} or {{tlc|Votes}}, with a couple of minor notes:
 
 
:* I would replace those mysterious <code>&amp;#8202;</code> 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 {{param|comment}} after the voting numbers;
 
:* I suggest we call the format you've laid out <code>mobile</code> rather than <code>full</code>, 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 <code>&lt;div style="text-align: center;">...&lt;/div></code>
 
 
: 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. 😊 -- [[User:Djonni|Djonni]] ([[User talk: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 <code>||next content</code> 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. -- {{unsigned|WardPhoenix}}
 
 
::: I just had a second look. I'm not sure that I understand what you mean by {{tqi|q=y|<code>{{!}}{{!}}next content</code> 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 <code>|&lt;span style="display:none;">&lt;/span></code> empty, non-displayed spans...? Were they just for your own debugging, when looking at the expanded code? -- [[User:Djonni|Djonni]] ([[User talk:Djonni|talk]]) 09:01, 19 October 2020 (UTC)
 
 
{{Outdent|:::}} 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) -- [[User:WardPhoenix|WardPhoenix]] ([[User talk:WardPhoenix|talk]]) 10:37, 19 October 2020 (UTC)
 
 
{| class="wikitable mw-collapsible mw-collapsed"
 
!colspan=4|This one is broken
 
|-
 
! style="width: 47%"|Approved Idea
 
! style="width: 1% ;|Confirmed
 
! style="width: 5% ;|Votes
 
! style="width: 47%"|In-game version
 
|-
 
|Argh. When I said “Give me a break.”, I was not talking about my bones, Almighty!||<div style="text-align:center;">[[File:cross.png]]</div>||{{User:WardPhoenix/Sandbox|1|2|3|4|format=full|status=accepted|comment=Lorem ipsum is great, but random sentences are too}}||TBD
 
|}
 
 
{| class="wikitable mw-collapsible mw-collapsed"
 
!colspan=4|This one works
 
|-
 
! style="width: 47%"|Approved Idea
 
! style="width: 1% ;|Confirmed
 
! style="width: 5% ;|Votes
 
! style="width: 47%"|In-game version
 
|-
 
|Argh. When I said “Give me a break.”, I was not talking about my bones, Almighty!||<div style="text-align:center;">[[File:cross.png]]</div>||{{User:WardPhoenix/Sandbox|1|2|3|4|format=full|status=accepted|comment=Lorem ipsum is great, but random sentences are too}}
 
||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 <code>||</code> 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:
 
 
<pre>{| class="wikitable"
 
|+ Table
 
!Header 1 !! Header 2
 
|-
 
|{{User:WardPhoenix/Sandbox|1|2|3|4|comment=Comment|format=full}}||Cell 2
 
|}</pre>
 
 
: you'll see what I mean. It's not difficult to fix. It you like, once it's out of your <code>User:</code> space and in <code>Template:</code>, I can tidy it up quite easily with manual {{tag|p}} or {{tag|br|s}} tags. Or I'm sure you can do it yourself, of course. 😊 -- [[User:Djonni|Djonni]] ([[User talk: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 {{tag|br|s}} 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! --[[User:WardPhoenix|WardPhoenix]] ([[User talk: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 {{tag|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 {{tag|p}} or {{tag|br|s}} would help is by causing the browser to render each on its own line (i.e., <code>{{tag|p|content={{tag|span|content=1 yes}}}}{{tag|p|content={{tag|span|content=2 no}}}}</code>) 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 <code>&lt;/noinclude></code> and the first <code>&lt;span></code>, that'll be a good start 😊 -- [[User:Djonni|Djonni]] ([[User talk:Djonni|talk]]) 06:20, 20 October 2020 (UTC)
 
 
 
----
 
[https://wiki.godvillegame.com/index.php?title=User_talk:WardPhoenix/Sandbox&action=edit&section=new&preload=User:WardPhoenix/Sandbox just a test]
 

Revision as of 16:58, 27 February 2021

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