cover
cover copied to clipboard
column sorting is not preserved between page loads in HTML formatting
with the HTML sorter if I sort the index by some column, visit a page, then go back the sorting reverts to the default setting. It should really do the other thing.
Right, its just a bunch of static html pages; nothing is preserved or communicated between pages. The quick way is to inject stuff into the window location and then use the referer instead of the raw page. That feels kinda gross and hacky. I'd prefer to do some kind of SPA-like thing. But I'm incredibly hesitant to actually write that in raw javascript.
I think I'm okay with jank URL hacks/referer hacks. As long as the average user doesn't think the UI is hacky its fine. And I worry about maintainability of having some kind of raw JS SPA. The window.location hack is much simpler.
The other option is require a front-end framework as a dependency.
I don't really have a problem with that as long as we include it with cover (so that the HTML view still works without internet access).
Did the default sorting column ever change?
No. What were we going to sort on? Percentage? You can replace this line https://github.com/florence/cover/blob/master/cover/private/html/assets/app.js#L66, with sortTable('coverage-percentage', floatCompareAsc)
to make percentage the default.
Changed in afe8ad666c251cde87502a63a86ef2465274169a