User:Retro/Templates/chset-color
Appearance
< User:Retro | Templates
style="background-color: #"
Character cell contents
[edit]- User:Retro/Templates/chset-cell — Character cell with character + Unicode value
- User:Retro/Templates/chset-cell3 — Character cell with character + Unicode value + decimal index
- User:Retro/Templates/chset-cell4 — Character cell with character + Unicode value + decimal + octal index
- User:Retro/Templates/chset-ctrl — Control character cell with name + Unicode value
- User:Retro/Templates/chset-ctrl3 — Control character cell with name + Unicode value + decimal index
- User:Retro/Templates/chset-ctrl4 — Control character cell with name + Unicode value + decimal + octal index
- User:Retro/Templates/chset-cell-unified — Any of the above, plus optional kuten
Testing
[edit]digit
esc
graph
letter
misc
punct
undef
TfD drafting
[edit]Merging templates in Category:Character set table templates. Alright this TfD drafting is a bit factually wrong currently, because the chset-cell
and chset-ctrl
behave differently, but I can fix that. (Hopefully) I'll finish this up later. I still have to implement two (one?) final merged templates, but that should be extremely straightforward.
== Merging redundant templates === In the current template layout, all of the {{code|chset-cell}}, {{code|chset-ctrl}}, and {{code|chset-color}} could be merged into one template, with no loss in functionality and only slight changes in how they are used and backwards compatibility. I have a prototype merged version [[|here]]. With this in mind, there are now two paths forward: #All of the templates get merged, which has the advantage that the template code is less likely to become outdated because all the code is in one place. All of the other templates become redirects. #The code of certain templates is tweaked so they have distinct functionalities. However the rest of the templates are to be handled, I'm very confident that all the {{code|chset-color}} templates should be part of one template; there's actual no advantage to having separate templates and separate templates cause more maintenance trouble than they're worth. I'm in favor of option 1, since it will simplify everything and probably be the best route forwards for the future. If the separate templates did anything besides exposing different parameters from {{tlx|chset-cell-unified}}, I would be more in favor of allowing the {{code|chset-cell}} and {{code|chset-ctrl}} series templates to remain separate, but all of the templates in this series are identical aside from what parameters they allow the editor to access. The only trouble I forsee is that the user script [LINK USER SCRIPT] will need updating. This shouldn't be too difficult in theory, but it may take some time, which might delay certain modifications near the end of the process. Another possibility is for the user script to temporarily be disabled until it is updated, but that is probably not preferrable; the user script is higher priority than less templates for humans to deal with. ~~~~
Notes
[edit]- Useful search for finding all related templates.
- However, AllPages is even more useful, because Mediawiki search is inconsistent in its handling of redirects. Through this, I've found two redirects with children, Template:Chset-color-alpha, Template:Chset-color-intl, redirecting to Template:Chset-color-letter. I have currently intentionally omitted them from the template, but they would be easy to add.
- I think making this a meta-template for the other chset color templates would be ideal; that way, each character would only need one template per table cell, not two.
- However, I do not fully understand how multiple sets of cell-level table styling interact; it seems likely if any cells containing the template tried to get further styling, then it would interpret the second styling as a table cell, presumably.
- I think this should be renamed to
chset-theme
for two reasons:- As it currently stands, this template is responsible for both color and box border stylings. So the current name is misleadingly narrow.
- Especially if it becomes a metatemplate,
|color=
is confusing for those experienced with templates and HTML, because they might try to put an HTML color code or name directly in the parameter.
- Ah, I suspect I know why my template idea hasn't been done yet; because there's this existing machinery for generating the colors in the first place:User:HarJIT/Scripts/unicategorise.js I'm sure the user script could be modified; maybe I'll fork it myself.