Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

column sorting is not preserved between page loads in HTML formatting #85

Open
florence opened this issue Aug 6, 2015 · 7 comments
Open
Assignees

Comments

@florence
Copy link
Owner

florence commented Aug 6, 2015

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.

@rpless
Copy link
Collaborator

rpless commented Aug 6, 2015

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.

@florence
Copy link
Owner Author

florence commented Aug 6, 2015

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.

@rpless
Copy link
Collaborator

rpless commented Aug 6, 2015

The other option is require a front-end framework as a dependency.

@florence
Copy link
Owner Author

florence commented Aug 6, 2015

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).

@florence
Copy link
Owner Author

florence commented Sep 4, 2015

Did the default sorting column ever change?

@rpless
Copy link
Collaborator

rpless commented Sep 4, 2015

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.

@florence
Copy link
Owner Author

florence commented Sep 4, 2015

Changed in afe8ad6

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants