User talk:Killian

From NetHackWiki
Revision as of 13:10, 2 September 2009 by Killian (talk | contribs) (Sortable tables)
Jump to navigation Jump to search

Sortable tables

Hi Killian,

Thanks for your help at Polearm with the abbreviations in the table headers. I was looking at some of your automatically generated tables (such as at Gem (program at Talk:Gem)) and I think they could be improved by making the tables sortable. Then you can gather all the hard gems together, or sort them alphabetically by name, or numerically by value, or whatever you want. All you have to do is give the table the css class "sortable" and give any columns that shouldn't be sortable the class "unsortable". I've done some example code based on your original program here with example output here.

(One other issue with sortable tables is that sorting doesn't play nice with horizontal separators between different categories (gems and glass, different categories of weapons, etc)).

I don't know if this is worth reautomating or should I go and edit all the tables manually? Rhebus 12:24, 1 September 2009 (UTC)

Maintaining the programs sounds like a better idea in the long run. Feel free to overwrite any of my programs that need updating; that's what history's for after all.
Apart from Gem, which generators would be worth making sortable? I can't think of any off the top of my head, though on the other hand I had completely forgotten that the Gem table was my work at all. Other than the Gem table and the skill tables (which can't meaningfully be sorted), what have I done?
As for the separators, I think it would be best to either remove them entirely, or else split the table into separate tables, unless Mediawiki has some fancy grouping features I'm unaware of. -- Killian 13:10, September 2, 2009 (UTC)