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

Sort Menu Changes #589

Closed
wants to merge 21 commits into from
Closed

Sort Menu Changes #589

wants to merge 21 commits into from

Conversation

Sjmarf
Copy link
Contributor

@Sjmarf Sjmarf commented Sep 9, 2023

Replaced the sort mode popup. Addresses:

Why?

We were missing a couple of sort modes, and adding them to the existing menu makes it even more large and cumbersome than it already is. This is my attempt at a better system. Let me know what you think. Feedback on the design would be appreciated too - as discussed in Slack, this setup isn't very apple-like. Would different appearance/animations be better? Or a different system entirely?

Edit: Discussion happened. See here.

Details

  • The sort mode popup now comes up from the bottom as a sheet. Some of the options have been grouped together into sections. See video.
  • Added the three missing sort modes (top of 3/6/9 months, added in 0.18.1).
  • Added a new APISiteVersion struct to store the Lemmy version number. If the user's instance is on too old of a version, the three new sort modes will be disabled. Previously, the user would have been able to select these but an error message would have been shown. Now, they can't select them. I've only implemented this check for the three newest sort modes; I haven't bothered with the older ones. Of course, most users are on up-to-date instances, but if new sort modes (or features in general) are added in future this system would be used to prevent the user from accessing them until their instance updates.

Video

ss2.mov

@Sjmarf Sjmarf requested a review from a team as a code owner September 9, 2023 22:35
@Sjmarf Sjmarf requested review from JakeShirley and EricBAndrews and removed request for a team September 9, 2023 22:35
@Sjmarf Sjmarf marked this pull request as draft September 9, 2023 23:07
@Sjmarf
Copy link
Contributor Author

Sjmarf commented Sep 11, 2023

Made some changes. Still more to come. Discussion on Slack here.

I brought back the small picker, with limited sort options. What do people think about the format shown in the image? Should the "Top" options be collapsed as they are on dev or uncollapsed as shown here? On slack, we discussed the possibility of A/B testing various options.

Clicking "Show All" opens a full-screen sheet with all sort options available.

This sheet also includes a "Filters" section, with the option to hide/show read posts, as well as a NavigationLink to the keyword filter settings. In future, we could have additional filter options here, such as filtering posts with images or posts with links. Not in this PR though.

Still to do:

  • Add the ability to hold down the "Feeds" button in the tab bar to open the original picker shown in the initial description of this PR. Swiping this picker up will open the full-height sheet described here.
  • Add the option to change the default sort mode from the sheet.

@Sjmarf Sjmarf changed the title Added new sort-mode menu Sort Menu Changes Sep 12, 2023
@Sjmarf Sjmarf marked this pull request as ready for review September 17, 2023 21:07
@Sjmarf
Copy link
Contributor Author

Sjmarf commented Sep 17, 2023

It's pretty much done now, I think.

(If you're wondering why FeedView was renamed to FeedContentView and wrapped inside of a new FeedView, see #617)

@Sjmarf
Copy link
Contributor Author

Sjmarf commented Oct 10, 2023

Closes #617

@Sjmarf Sjmarf closed this Dec 10, 2023
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

Successfully merging this pull request may close these issues.

3 participants