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

Fix feed ordering #4841

Merged
merged 1 commit into from
Nov 20, 2022
Merged

Fix feed ordering #4841

merged 1 commit into from
Nov 20, 2022

Conversation

aledeg
Copy link
Member

@aledeg aledeg commented Nov 12, 2022

Closes #4790

Changes proposed in this pull request:

  • sort feeds in category in a consistent manner.

How to test the feature manually:

  1. Check the feed order within a category in the subscription page
  2. Validate that the order is the same in normal view
  3. Validate that the order is the same in global view

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.

Before, the feeds were not ordered every time there was a change in the category feed list. This behavior was causing discrepancies in the displayed list. Now, the feeds are ordered every time there is a change in the category feed list.

@aledeg aledeg added View Bug (confirmed) 🐞 issues that are reproducable labels Nov 12, 2022
@aledeg aledeg added this to the 1.21.0 milestone Nov 12, 2022
@aledeg aledeg marked this pull request as draft November 12, 2022 03:14
@math-GH
Copy link
Contributor

math-GH commented Nov 12, 2022

I am not sure if it is the best way. Isn't there a chance to have the ordering while fetching the data in the database request (SQL query)?

@aledeg
Copy link
Member Author

aledeg commented Nov 12, 2022

Probably. But if you do that you have to take into account that we are supporting 3 different databases with their own syntax. On top of that, I am not sure they all supports sorting the same way. The sorting was already in the category class. I figured it was the most appropriated location to add it.

Before, the feeds were not ordered every time there was a change in the category
feed list. This behavior was causing discrepancies in the displayed list.
Now, the feeds are ordered every time there is a change in the category feed list.

See FreshRSS#4790
@aledeg aledeg marked this pull request as ready for review November 12, 2022 12:18
@aledeg
Copy link
Member Author

aledeg commented Nov 12, 2022

I've checked the differences between the 3 databases and I could not find something that is reasonable. We also supports adding a feed without putting it in the database (addFeed method) which will void the database sorting.

@Alkarex Alkarex merged commit 02b9065 into FreshRSS:edge Nov 20, 2022
@aledeg aledeg deleted the fix/feed-ordering branch November 20, 2022 14:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug (confirmed) 🐞 issues that are reproducable View
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] Global view: feeds not alphabetically ordered
3 participants