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

Don't reload page when re-sorting answers if we don't need to #1542

Open
cellio opened this issue Feb 27, 2025 · 0 comments
Open

Don't reload page when re-sorting answers if we don't need to #1542

cellio opened this issue Feb 27, 2025 · 0 comments
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

Comments

@cellio
Copy link
Member

cellio commented Feb 27, 2025

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 a const) as an arg, so I don't know how we can ask if answer count is greater than page size.

@cellio cellio added area: frontend Changes to front-end code type: change request New feature or request priority: low complexity: unassessed Needs further developer investigation before complexity/feasibility can be determined. labels Feb 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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
Projects
None yet
Development

No branches or pull requests

1 participant