Template talk:Canvas snippet

From FlightGear wiki
Jump to navigation Jump to search

Initial thoughts

Yeah, variables are dependencies in the form of required symbols, i.e. the root group, the name of the canvas, styling or placements. The script section should probably accept a syntaxhighlight section as parameter. And, I'd probably use "contributors" (plural) and show that next to the screen shot/code snippet. The note could be optional and would contain other relevant information. The image itself would be a normal thumbnail with its alt etc set already ? variables/names can probably be unified by supporting a symbols tag ? Canvas dimensions (or background color) does indeed make sense because some things have inherent placement/coloring assumptions - so maybe something like "environment" instead for both (NxN, black). Thanks so far - I'll see if I can easily turn the old table into the template now.--Hooray (talk) 17:33, 21 September 2014 (UTC)

I am considering skipping at least a visible table. Also the headings are probably redundant to all users capable of editing Nasal.
I took the liberty of conglomerating all the dependencies (variables, names, canvas size and color etc.) into one parameter, dependencies, and to not use the {{note}} template more than necessary (it will be easier to find the important stuff if it is not used all that much). It seems such a section is used on most of the snippets anyway.
It seems that, logically as well from the present snippets, a screenshot is nearly mandatory, so I made a missing one a bit more obvious.
Johan G (Talk | contribs) 23:10, 21 September 2014 (UTC)
Now, that's looking really cool - but looking at the markup, it's obviously not as straightforward to use anymore - maybe we should introduce another template to hide all the table markup and just keep usage really simple ? Otherwise, people will be easily as to where to add new stuff...--Hooray (talk) 03:25, 22 September 2014 (UTC)
Do you mean like when adding stuff to this template? Did not think of that at all. Using a subtemplate to hide the template markup will make that much easier. Good idea.
Johan G (Talk | contribs) 15:24, 22 September 2014 (UTC)

Syntax highlighting problems

The use of the <syntaxhighlight> tag cannot be used in a template. Instead {{#tag:syntaxhighlight|...}} should be used - see the new {{collapsible script}} template for an example. I'll change this template to demonstrate the fix.

Bugman (talk) 12:09, 16 October 2015 (EDT)

you just solved a long-standing mystery, thank you! --Hooray (talk) 12:29, 16 October 2015 (EDT)
No problems! Bugman (talk) 12:34, 16 October 2015 (EDT)