Skip to main content
Topic: Wiki: a way to support the examples (Read 49863 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Wiki: a way to support the examples

I recently added the columns template to the wiki, which means we can now put stuff on the wiki in columns.

The advantage of this is that you can, for example, put a block of code and some comments about the code side-to-side in code examples. For example, in this Font.drawText article. The code is shown on the left, the supporting comments for each line are neatly separated and shown on the right.

I was thinking - is it an idea to do it like this on all the API pages with examples? It seems a bit more illustrative to do that.

Re: Wiki: a way to support the examples

Reply #1
I think it's a very good idea, but text size on the web and therefore available screen dimension relies on so many different settings that it's not always a guarantee that we can get comments to line up properly using this columns method even if we stick to only using the monospace font stack that the <syntaxhighlight> tag's GeSHi is set to use.

This has now become one of those times where I wish I was more inclined to experiment with some JavaScript to basically take a syntax highlighted line and add some comment tooltipping in script. I could've sworn GitHub had per-line commenting on highlighted source that I could study...

Re: Wiki: a way to support the examples

Reply #2
Good point. The tooltipping sounds like a better idea; could also make it less cluttered.