-
Notifications
You must be signed in to change notification settings - Fork 31
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
New Sort Options #691
New Sort Options #691
Conversation
What version is the latest release version here? is it worth limiting the new top modes, the current instance list still shows a fair amount of instances on 0.18.1-0.18.3?
I think this is worth addressing, given it results in an empty feed with no clear reason why 😞 not quite sure what the best approach would be however as like you say right now it's globally set... I've thought of a horrible hack which I won't share out of shame 😂 We have a few weeks till this needs to be in so we can have a think of how to handle it... this will be a common problem going forward for other versioned values so we should try and come up with a nice solution that will solve it for future problems too 🙏 |
Couldn't remember when I was writing this, but I implemented a filter for it in my other sort-mode PR and it seems that they're new in 0.18.1. I can add a filter for it here, sure |
The best solution I can think of is to select the most similar sort mode to the default if the default is unavailable. Scaled would become hot, controversial would become most comments, etc. I'll think on it some more though |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code looks good--per Slack, let's go with offering a "fallback sort" option if the user selects a sorting option that is not supported by all instances.
Sure 👍 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! I really like moving sorting into its own menu section.
I noticed one bug around initializing the fallback state. When I first launch the app, it takes the default value and never the fallback. It works on subsequent loads--if I switch accounts or navigate back to the community menu and back into the feed it picks up the fallback, but it looks like the fallback is computed after the FeedView is already rendered and it does not reload on change.
So, I tried to fix it and now it works 90% of the time... but occasionally it just won't for some reason and I can't work out why :( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Commented a suggested fix for those 10% of cases where siteInformation
doesn't properly trigger updates
Co-authored-by: Eric Andrews <[email protected]>
Thanks! Looks like it works consistently now. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice 👍
Co-authored-by: Eric Andrews <[email protected]>
Co-authored-by: Eric Andrews <[email protected]>
Co-authored-by: Eric Andrews <[email protected]>
Co-authored-by: Eric Andrews <[email protected]>
Adds five new sort options:
scaled
controversial
top 3 months
top 6 months
top 9 months
scaled
andcontroversial
are 0.19.0+ whilst the newtop
modes are available on the latest release version. The 0.19.0+ sort modes are hidden on instances that aren't running 0.19.0 or above.Potential problem with this implementation:
You can still set the default sort mode to a mode that isn't available on your instance. If the user chooses an unsupported sort mode as the default, it would obviously be selected in the feed and they would see an error. I could filter out the modes that aren't available from the default sort-mode picker - this doesn't remove the problem though, because the user could set the default sort mode on a 1.19.0 instance and then switch accounts to an older instance, and they would still see an error.
Closes #673
Closes #321