Skip to content

Implement sort order per feed#8234

Merged
Alkarex merged 92 commits intoFreshRSS:edgefrom
PeterVavercak:4761-sort-order-per-feed
Feb 1, 2026
Merged

Implement sort order per feed#8234
Alkarex merged 92 commits intoFreshRSS:edgefrom
PeterVavercak:4761-sort-order-per-feed

Conversation

@PeterVavercak
Copy link
Contributor

@PeterVavercak PeterVavercak commented Nov 19, 2025

Adresses #4761

Changes proposed in this pull request:

  • Added number of sorted feeds and associative array for feed sorting option in Context.
  • Number of sorted feeds and local sorting option by its index saved into Minz Request Parameters.
  • Number of sorted feeds and local sorting options deleted when choosing another Option Of Global Sorting.
  • Added option of allowing sorting by feed in configuration.
  • Added variable for allowing local sorting in userConf.
  • Added function to get feeds by current get in context.
  • Added menu button for all individual feed sorting.
  • New database options for individual feed sorting in EntryDAO.
  • Considered choosing new entries based on chosen load limit.
  • Local sorting parameter saved into continuation value in Index Controller.

How to test the feature manually:

  1. At the bottom of Reading Configuration menu turn on individual sorting option menu
  2. Choose Sorting by feed option
  3. Choose feed at next sorting menu and choose sorting option for that feed

Pull request checklist:

  • clear commit messages
  • code manually tested
  • unit tests written (optional if too hard)
  • documentation updated

Additional information can be found in the documentation.

@Inverle Inverle changed the title 4761 sort order per feed Implement sort order per feed Nov 20, 2025
@Inverle Inverle added the UX User experience label Nov 20, 2025
@Alkarex
Copy link
Member

Alkarex commented Nov 20, 2025

Hello and thanks for the PR.
First, may I ask how much of it is generated by AI? I am asking because there are some patterns, which are quite typical to AI.

Regarding the approach, I think it is quite different from what is asked in #4761 where the idea is that when accessing a given feed individually, the default sorting should be a function of a preference defined for that feed. Likewise at category level (which can be done in another PR).
Similarly, there is also a wish to allow different default viewing preferences per feed (for another PR).

And indeed, I do not think it make much sense in the same view to mix various sorting orders.

  1. I would suggest to replace your new Sort feeds drop-down menu by an option in each feed. The menu does not scale well to many feeds anyway. The preference is to be saved in the attributes of each feed. image

  2. Drop FreshRSS_Context::$local_feed_sorting and use instead $feed->attributeString('default_sort')

  3. This also makes the CSS changes unnecessary

  4. The option allow_local_sorting can be removed

  5. I think all the changes in FreshRSS_EntryDAO can be dropped (some of it can maybe be discussed).

  6. Add instead some minor logic (maybe in FreshRSS_Context::updateUsingRequest()) when landing on a given feed to use the feed's (or category's) preferred sorting order, except when the user overrides the sorting order from the menu. Similar idea as the state_forced_by_user section.

  7. Introduce a secondary sorting order preference in configure/reading to select what the secondary sorting criterion should be when sorting by feed name (can be done in another PR).

I realise that it will make this PR quite different from your first version, and sorry for that, but I do believe it would address a more common use-case and be easier to integrate to the rest as well as maintain over time. I hope it can make sense to you as well.

I will make a few more minor reviews inline.

@Alkarex Alkarex mentioned this pull request Dec 11, 2025
@Alkarex Alkarex linked an issue Dec 11, 2025 that may be closed by this pull request
@Alkarex Alkarex mentioned this pull request Dec 11, 2025
1 task
Copy link
Member

@Alkarex Alkarex left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The secondary sorting criterion is defined but not used, so this must be addressed.
The logic is a bit complicated though, so it could be an approach to leave it to a follow-up PR.

@Alkarex Alkarex modified the milestones: 1.28.0, 1.29.0 Dec 16, 2025
@Alkarex
Copy link
Member

Alkarex commented Jan 30, 2026

@PeterVavercak Tests welcome if you are around, in particular regarding paging (i.e. autoload of more articles)

@Alkarex Alkarex merged commit ee7eb67 into FreshRSS:edge Feb 1, 2026
1 check passed
@Frenzie Frenzie mentioned this pull request Feb 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

UX User experience

Projects

None yet

3 participants