User talk:C.Ezra.M/Template:Movehead: Difference between revisions
From Bulbapedia, the community-driven Pokémon encyclopedia.
Jump to navigationJump to search
(Ignore the size of the change in page bytesize, it's just because of long URLs.) |
m (Text replacement - "Bfdifan2006" to "C.Ezra.M") |
||
(3 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
Hi, these look really great. First off, thank you for making these, I like the way you went about it, the parameters are very clear. Can I ask why they don't work with the "display: none" feature? I am not being confrontational, I still 100% trust your judgment, I'm just curious as to what exactly causes the incompatibility between the two. I see that the columns can be hidden in the egg move header, so maybe if we just had "gen(n)=no" options, that could work? I could be saying something dumb here, of course. '''[[User:Oneofthosedf|<span style="color:#D64933">Oneofthosedf</span>]] [[User talk:Oneofthosedf|<span style="color:#2877AC">(talk)</span>]] [[Special:Contributions/Oneofthosedf|<span style="color:#64B823">(contribs)</span>]]''' 22:15, 28 March 2022 (UTC) | Hi, these look really great. First off, thank you for making these, I like the way you went about it, the parameters are very clear. Can I ask why they don't work with the "display: none" feature? I am not being confrontational, I still 100% trust your judgment, I'm just curious as to what exactly causes the incompatibility between the two. I see that the columns can be hidden in the egg move header, so maybe if we just had "gen(n)=no" options, that could work? I could be saying something dumb here, of course. '''[[User:Oneofthosedf|<span style="color:#D64933">Oneofthosedf</span>]] [[User talk:Oneofthosedf|<span style="color:#2877AC">(talk)</span>]] [[Special:Contributions/Oneofthosedf|<span style="color:#64B823">(contribs)</span>]]''' 22:15, 28 March 2022 (UTC) | ||
:They would work with the {{User: | :They would work with the {{User:C.Ezra.M/code|display: none}} property, but I'm trying to make a template that doesn't use this because everything with {{User:C.Ezra.M/code|display: none}} is still technically visible to the MediaWiki parser. My solution that uses parser functions wrapped around the whole cell will be more beneficial for the total template include size. Possibly when Pokémon Scarlet and Violet release, we would have our first worries about the include size for most-learned moves, such as Tackle. --'''''[[User:C.Ezra.M|<span style="color:turquoise">C.Ezra.M</span>]]''''' <sub>([[User talk:C.Ezra.M|<span style="color:lime">T</span>]]/[[Special:Contributions/C.Ezra.M|<span style="color:orange">C</span>]])</sub> 05:53, 29 March 2022 (UTC) | ||
::Why exactly is that beneficial? Also, there shouldn't be any worries about new games, because we could easily get 3 different games in three different generations again in the next 3 years. You also might as well add Gen IX to these templates to test it. '''[[User:Oneofthosedf|<span style="color:#D64933">Oneofthosedf</span>]] [[User talk:Oneofthosedf|<span style="color:#2877AC">(talk)</span>]] [[Special:Contributions/Oneofthosedf|<span style="color:#64B823">(contribs)</span>]]''' 13:45, 29 March 2022 (UTC) | ::Why exactly is that beneficial? Also, there shouldn't be any worries about new games, because we could easily get 3 different games in three different generations again in the next 3 years. You also might as well add Gen IX to these templates to test it. '''[[User:Oneofthosedf|<span style="color:#D64933">Oneofthosedf</span>]] [[User talk:Oneofthosedf|<span style="color:#2877AC">(talk)</span>]] [[Special:Contributions/Oneofthosedf|<span style="color:#64B823">(contribs)</span>]]''' 13:45, 29 March 2022 (UTC) | ||
:::It reduces the total template include size, which could reduce the time a page needs to load. Compare the current {{template|Movehead/ | :::It reduces the total template include size, which could reduce the time a page needs to load. Compare the current {{template|Movehead/Level}} template and my movehead template. If you compare the bytesizes of the resulting strings (assuming inputs of {{User:C.Ezra.M/code|ice}} and {{User:C.Ezra.M/code|8}} in both cases, in that order, and, for my version, also {{User:C.Ezra.M/code|level}}), then the [https://mothereff.in/byte-counter#%7B%7C%20class%3D%22roundy%22%20style%3D%22background%3A%20%23638D8D%3B%20%20border%3A%205px%20solid%20%2398D8D8%22%0A%7C-%0A!%20style%3D%22width%3A%2026px%3B%20background%3A%2398D8D8%3B%20border-top-left-radius%3A%205px%3B%20-moz-border-radius-topleft%3A%205px%3B%20-webkit-border-top-left-radius%3A%205px%3B%20-khtml-border-top-left-radius%3A%205px%3B%20-icab-border-top-left-radius%3A%205px%3B%20-o-border-top-left-radius%3A%205px%3B%20color%3A%20%23000%3B%22%20colspan%3D%221%22%20rowspan%3D%222%22%20%7C%20%23%0A!%20style%3D%22width%3A%20110px%3B%20background%3A%2398D8D8%3B%20color%3A%20%23000%3B%22%20rowspan%3D%222%22%20colspan%3D%222%22%20%7C%20Pokémon%0A!%20style%3D%22width%3A%2050px%3B%20background%3A%2398D8D8%3B%20color%3A%20%23000%3B%22%20rowspan%3D%222%22%20%7C%20Types%0A!%20style%3D%22width%3A%20100px%3B%20background%3A%2398D8D8%3B%20color%3A%20%23000%3B%22%20colspan%3D%222%22%20rowspan%3D%222%22%20%7C%20Egg%20Groups%0A!%20style%3D%22background%3A%2398D8D8%3B%20border-top-right-radius%3A%205px%3B%20-moz-border-radius-topright%3A%205px%3B%20-webkit-border-top-right-radius%3A%205px%3B%20-khtml-border-top-right-radius%3A%205px%3B%20-icab-border-top-right-radius%3A%205px%3B%20-o-border-top-right-radius%3A%205px%3B%20color%3A%20%23000%3B%22%20colspan%3D%221%22%20%7C%20Level%0A%7C-%0A!%20style%3D%22width%3A%2040px%3B%20display%3Anone%3B%20background%3A%2380BB1D%3B%20line-height%3A%201em%3B%22%20%7C%20%5B%5BGeneration%20I%7C%3Cspan%20style%3D%22color%3A%23FFF%3B%22%3EI%3C%2Fspan%3E%5D%5D%0A!%20style%3D%22width%3A%2040px%3B%20display%3Anone%3B%20background%3A%23CAC02E%3B%20line-height%3A%201em%3B%22%20%7C%20%5B%5BGeneration%20II%7C%3Cspan%20style%3D%22color%3A%23FFF%3B%22%3EII%3C%2Fspan%3E%5D%5D%0A!%20style%3D%22width%3A%2040px%3B%20display%3Anone%3B%20background%3A%2367C1AB%3B%20line-height%3A%201em%3B%22%20%7C%20%5B%5BGeneration%20III%7C%3Cspan%20style%3D%22color%3A%23FFF%3B%22%3EIII%3C%2Fspan%3E%5D%5D%0A!%20style%3D%22width%3A%2040px%3B%20display%3Anone%3B%20background%3A%239072A3%3B%20line-height%3A%201em%3B%22%20%7C%20%5B%5BGeneration%20IV%7C%3Cspan%20style%3D%22color%3A%23FFF%3B%22%3EIV%3C%2Fspan%3E%5D%5D%0A!%20style%3D%22width%3A%2040px%3B%20display%3Anone%3B%20background%3A%236BAECE%3B%20line-height%3A%201em%3B%22%20%7C%20%5B%5BGeneration%20V%7C%3Cspan%20style%3D%22color%3A%23FFF%3B%22%3EV%3C%2Fspan%3E%5D%5D%0A!%20style%3D%22width%3A%2040px%3B%20display%3Anone%3B%20background%3A%23CB0B4F%3B%20line-height%3A%201em%3B%22%20%7C%20%5B%5BGeneration%20VI%7C%3Cspan%20style%3D%22color%3A%23FFF%3B%22%3EVI%3C%2Fspan%3E%5D%5D%0A!%20style%3D%22width%3A%2040px%3B%20display%3Anone%3B%20background%3A%23DC5A40%3B%20line-height%3A%201em%3B%22%20%7C%20%5B%5BGeneration%20VII%7C%3Cspan%20style%3D%22color%3A%23FFF%3B%22%3EVII%3C%2Fspan%3E%5D%5D%0A!%20style%3D%22width%3A%2040px%3B%20%20background%3A%23AC379E%3B%20line-height%3A%201em%3B%22%20%7C%20%5B%5BGeneration%20VIII%7C%3Cspan%20style%3D%22color%3A%23FFF%3B%22%3EVIII%3C%2Fspan%3E%5D%5D first one] has a bytesize of 1,937 bytes. [https://mothereff.in/byte-counter#%7B%7C%20class%3D%22roundy%22%20style%3D%22background%3A%23638D8D%3Bborder%3A3px%20solid%20%2398D8D8%3B%22%0A%7C-%0A!%20style%3D%22width%3A26px%3Bbackground%3A%2398D8D8%3Bborder-top-left-radius%3A%205px%3B%20-moz-border-radius-topleft%3A%205px%3B%20-webkit-border-top-left-radius%3A%205px%3B%20-khtml-border-top-left-radius%3A%205px%3B%20-icab-border-top-left-radius%3A%205px%3B%20-o-border-top-left-radius%3A%205px%3Bcolor%3A%23000%3B%22%20colspan%3D%221%22%20rowspan%3D%222%22%20%7C%20%23%0A!%20style%3D%22width%3A110px%3Bbackground%3A%2398D8D8%3Bcolor%3A%23000%3B%22%20rowspan%3D%222%22%20colspan%3D%222%22%20%7C%20Pokémon%0A!%20style%3D%22width%3A50px%3Bbackground%3A%2398D8D8%3Bcolor%3A%23000%3B%22%20rowspan%3D%222%22%7C%20Types%0A!%20style%3D%22width%3A100px%3Bbackground%3A%2398D8D8%3Bcolor%3A%23000%3B%22%20colspan%3D%223%22%20rowspan%3D%222%22%20%7C%20Egg%20Groups%0A!%20style%3D%22background%3A%2398D8D8%3Bborder-top-right-radius%3A%205px%3B%20-moz-border-radius-topright%3A%205px%3B%20-webkit-border-top-right-radius%3A%205px%3B%20-khtml-border-top-right-radius%3A%205px%3B%20-icab-border-top-right-radius%3A%205px%3B%20-o-border-top-right-radius%3A%205px%3Bcolor%3A%23000%3B%22%20colspan%3D%224%22%20%7C%20Level%0A%7C-%20style%3D%22line-height%3A1em%3B%22%20class%3D%22whitelinks%22%0A!!%20style%3D%22width%3A40px%3Bbackground%3A%23AC379E%3B%22%20%7C%20%5B%5BGeneration%20VIII%7CVIII%5D%5D%3Cbr%3E%3Csmall%3E%5B%5BPokémon%20Sword%20and%20Shield%7CSwSh%5D%5D%3C%2Fsmall%3E!!%20style%3D%22width%3A40px%3Bbackground%3A%239072A3%3B%22%20%7C%20%5B%5BGeneration%20VIII%7CVIII%5D%5D%3Cbr%3E%3Csmall%3E%5B%5BPokémon%20Brilliant%20Diamond%20and%20Shining%20Pearl%7CBDSP%5D%5D%3C%2Fsmall%3E!!%20style%3D%22width%3A40px%3Bbackground%3A%2336597B%3Bline-height%3A1em%3B%22%20%7C%20%5B%5BGeneration%20VIII%7CVIII%5D%5D%3Cbr%3E%3Csmall%3E%5B%5BPokémon%20Legends%3A%20Arceus%7CLA%5D%5D%3C%2Fsmall%3E%0A%7C-%20style%3D%22font-size%3Asmaller%3Bline-height%3A1em%3Bbackground%3Awhite%3Bdisplay%3Anone%22%0A!!%7C—!!%7C—!!%7C— My version] has just 1,408 bytes. I know, I don't currently know how to hide the bottom row with just using a parser function, but if I knew how to, then I would have 1,314 bytes in total. Because I accidentally duplicated the {{User:C.Ezra.M/code|line-height}}, {{User:C.Ezra.M/code|color}} and {{User:C.Ezra.M/code|background}} properties in some cases, and some semicolons at the end, if I fixed these, then it's just 1,178 bytes. And if the {{template|roundy}} template (and its subtemplates) are edited so there are no properties with vendor prefixes, and there are no spaces between properties and values in it, it would become even less: [https://mothereff.in/byte-counter#%7B%7C%20class%3D%22roundy%22%20style%3D%22background%3A%23638D8D%3Bborder%3A3px%20solid%20%2398D8D8%22%0A%7C-%20style%3D%22background%3A%2398D8D8%3Bcolor%3A%23000%22%0A!%20style%3D%22width%3A26px%3Bborder-top-left-radius%3A5px%3B%22%20colspan%3D%221%22%20rowspan%3D%222%22%20%7C%20%23%0A!%20style%3D%22width%3A110px%22%20rowspan%3D%222%22%20colspan%3D%222%22%20%7C%20Pok%C3%A9mon%0A!%20style%3D%22width%3A50px%22%20rowspan%3D%222%22%7C%20Types%0A!%20style%3D%22width%3A100px%22%20colspan%3D%223%22%20rowspan%3D%222%22%20%7C%20Egg%20Groups%0A!%20style%3D%22border-top-right-radius%3A5px%3B%22%20colspan%3D%224%22%20%7C%20Level%0A%7C-%20style%3D%22line-height%3A1em%22%20class%3D%22whitelinks%22%0A!!%20style%3D%22width%3A40px%3Bbackground%3A%23AC379E%22%20%7C%20%5B%5BGeneration%20VIII%7CVIII%5D%5D%3Cbr%3E%3Csmall%3E%5B%5BPok%C3%A9mon%20Sword%20and%20Shield%7CSwSh%5D%5D%3C%2Fsmall%3E!!%20style%3D%22width%3A40px%3Bbackground%3A%239072A3%22%20%7C%20%5B%5BGeneration%20VIII%7CVIII%5D%5D%3Cbr%3E%3Csmall%3E%5B%5BPok%C3%A9mon%20Brilliant%20Diamond%20and%20Shining%20Pearl%7CBDSP%5D%5D%3C%2Fsmall%3E!!%20style%3D%22width%3A40px%3Bbackground%3A%2336597B%22%20%7C%20%5B%5BGeneration%20VIII%7CVIII%5D%5D%3Cbr%3E%3Csmall%3E%5B%5BPok%C3%A9mon%20Legends%3A%20Arceus%7CLA%5D%5D%3C%2Fsmall%3E a neat 825 bytes]. | ||
:::Another advantage to using my version is that we won't need separate versions for level-up and breeding learnlists. --'''''[[User: | :::Another advantage to using my version is that we won't need separate versions for level-up and breeding learnlists. --'''''[[User:C.Ezra.M|<span style="color:turquoise">C.Ezra.M</span>]]''''' <sub>([[User talk:C.Ezra.M|<span style="color:lime">T</span>]]/[[Special:Contributions/C.Ezra.M|<span style="color:orange">C</span>]])</sub> 19:48, 29 March 2022 (UTC) | ||
::::If you're curious how I took the exact fully expanded wikicode for these, then I used [[Special:ExpandTemplates]]. --'''''[[User:C.Ezra.M|<span style="color:turquoise">C.Ezra.M</span>]]''''' <sub>([[User talk:C.Ezra.M|<span style="color:lime">T</span>]]/[[Special:Contributions/C.Ezra.M|<span style="color:orange">C</span>]])</sub> 20:14, 29 March 2022 (UTC) | |||
:::::Alright, keep up the good work, I'm sure you'll figure out. That loading reduction is massive. I don't have to worry about it now, but I sure would have appreciated it when I was younger with a worse setup. I've seen you code some pretty impressive stuff, and you seemed to have figured out all of those as well. I wish I could help with this, but I can only give you encouragement. Again, very thankful for the help. '''[[User:Oneofthosedf|<span style="color:#D64933">Oneofthosedf</span>]] [[User talk:Oneofthosedf|<span style="color:#2877AC">(talk)</span>]] [[Special:Contributions/Oneofthosedf|<span style="color:#64B823">(contribs)</span>]]''' 20:28, 29 March 2022 (UTC) |
Latest revision as of 10:08, 26 May 2024
Hi, these look really great. First off, thank you for making these, I like the way you went about it, the parameters are very clear. Can I ask why they don't work with the "display: none" feature? I am not being confrontational, I still 100% trust your judgment, I'm just curious as to what exactly causes the incompatibility between the two. I see that the columns can be hidden in the egg move header, so maybe if we just had "gen(n)=no" options, that could work? I could be saying something dumb here, of course. Oneofthosedf (talk) (contribs) 22:15, 28 March 2022 (UTC)
- They would work with the
display: none
property, but I'm trying to make a template that doesn't use this because everything withdisplay: none
is still technically visible to the MediaWiki parser. My solution that uses parser functions wrapped around the whole cell will be more beneficial for the total template include size. Possibly when Pokémon Scarlet and Violet release, we would have our first worries about the include size for most-learned moves, such as Tackle. --C.Ezra.M (T/C) 05:53, 29 March 2022 (UTC)- Why exactly is that beneficial? Also, there shouldn't be any worries about new games, because we could easily get 3 different games in three different generations again in the next 3 years. You also might as well add Gen IX to these templates to test it. Oneofthosedf (talk) (contribs) 13:45, 29 March 2022 (UTC)
- It reduces the total template include size, which could reduce the time a page needs to load. Compare the current
{{Movehead/Level}}
template and my movehead template. If you compare the bytesizes of the resulting strings (assuming inputs ofice
and8
in both cases, in that order, and, for my version, alsolevel
), then the first one has a bytesize of 1,937 bytes. My version has just 1,408 bytes. I know, I don't currently know how to hide the bottom row with just using a parser function, but if I knew how to, then I would have 1,314 bytes in total. Because I accidentally duplicated theline-height
,color
andbackground
properties in some cases, and some semicolons at the end, if I fixed these, then it's just 1,178 bytes. And if the{{roundy}}
template (and its subtemplates) are edited so there are no properties with vendor prefixes, and there are no spaces between properties and values in it, it would become even less: a neat 825 bytes. - Another advantage to using my version is that we won't need separate versions for level-up and breeding learnlists. --C.Ezra.M (T/C) 19:48, 29 March 2022 (UTC)
- If you're curious how I took the exact fully expanded wikicode for these, then I used Special:ExpandTemplates. --C.Ezra.M (T/C) 20:14, 29 March 2022 (UTC)
- Alright, keep up the good work, I'm sure you'll figure out. That loading reduction is massive. I don't have to worry about it now, but I sure would have appreciated it when I was younger with a worse setup. I've seen you code some pretty impressive stuff, and you seemed to have figured out all of those as well. I wish I could help with this, but I can only give you encouragement. Again, very thankful for the help. Oneofthosedf (talk) (contribs) 20:28, 29 March 2022 (UTC)
- If you're curious how I took the exact fully expanded wikicode for these, then I used Special:ExpandTemplates. --C.Ezra.M (T/C) 20:14, 29 March 2022 (UTC)
- It reduces the total template include size, which could reduce the time a page needs to load. Compare the current
- Why exactly is that beneficial? Also, there shouldn't be any worries about new games, because we could easily get 3 different games in three different generations again in the next 3 years. You also might as well add Gen IX to these templates to test it. Oneofthosedf (talk) (contribs) 13:45, 29 March 2022 (UTC)