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

Add sorting to multiple post display #79

Closed
12 tasks done
ismail-s opened this issue Jan 3, 2016 · 2 comments
Closed
12 tasks done

Add sorting to multiple post display #79

ismail-s opened this issue Jan 3, 2016 · 2 comments
Assignees

Comments

@ismail-s
Copy link
Owner

ismail-s commented Jan 3, 2016

  • Get the views to work with a sorting parameter
  • Update templates to display sorting select box and to handle changes to this box
    • Bootstrap
    • Polymer
    • Simple
  • Test everything
    • Make sure default sorting is newest first
    • Make sure sort oldest first works
    • Make sure sort newest first works for page 2
    • Make sure sort oldest first works for page 2
    • Make sure sorting urls generated for both views are correct
    • Make sure templates work for both sorting orders (ie functional tests)
@ismail-s
Copy link
Owner Author

ismail-s commented Feb 4, 2016

Whilst working on this, I have made it so that the tag view page, by default, displays the newest post first. Previously, the sorting was oldest post first. Making this change brings both view_all_posts and tag_view together in having the same behaviour.

@ismail-s
Copy link
Owner Author

ismail-s commented Feb 4, 2016

I have found and corrected a very subtle bug in some of the tests. Essentially, I was doing something like range(5, 10, -1) instead of range(10, 5, -1). As I was iterating over this (essentially), I ended up iterating over nothing resulting in the tests silently passing.
And if that wasn't enough, the numbers passed to range were also incorrect, and took some time to correct.

ismail-s added a commit that referenced this issue Feb 4, 2016
@ismail-s ismail-s self-assigned this Feb 4, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant