Don't reload page when re-sorting answers if we don't need to #1542
Labels
area: frontend
Changes to front-end code
complexity: unassessed
Needs further developer investigation before complexity/feasibility can be determined.
priority: low
type: change request
New feature or request
meta:292886
When you change how answers are sorted on a question, we do a full page reload. This isn't a big deal in a lot of cases, but if you're on a slow network connection it can be painful. If all of the answers fit on the page, can we re-sort them without a full page load? (Presumably requires Javascript, and it's ok to say that if you disable JS, it falls back to the page load.)
If there are more answers than fit on the page (i.e. if pagination is already happening), client-side sorting isn't possible (the answers you need might be on other pages), so we should reload in that case. I don't know how hard it is to ask Rails "are you paginating?"; the calls to
paginate
seem to all take a number (not currently aconst
) as an arg, so I don't know how we can ask if answer count is greater than page size.The text was updated successfully, but these errors were encountered: