-
Notifications
You must be signed in to change notification settings - Fork 832
Add a voting feature (upvote/downvote) #3926
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
base: main
Are you sure you want to change the base?
Conversation
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.
Pull request overview
This pull request adds a voting feature (upvote/downvote) to Miniflux, enabling users to classify entries as relevant or irrelevant. The feature is designed as a building block for future recommendation engines and analytics. The voting system allows values of -1 (downvote), 0 (no vote), and 1 (upvote), with buttons that can be toggled on/off.
Key changes:
- Added database schema for storing votes on entries and a user preference to show/hide voting buttons
- Implemented UI components with JavaScript handlers and CSS styling for voting buttons
- Added translations for voting button labels across all supported languages
Reviewed changes
Copilot reviewed 35 out of 36 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| internal/database/migrations.go | Adds database migration to create vote column on entries table and show_voting_buttons column on users table with appropriate constraints |
| internal/model/entry.go | Adds Vote field to Entry model to store vote values |
| internal/model/user.go | Adds ShowVotingButtons field to User and UserModificationRequest models to control visibility of voting buttons |
| internal/storage/entry.go | Implements UpdateEntryVote method to persist vote changes in the database |
| internal/storage/entry_query_builder.go | Updates query builder to include vote field when fetching entries |
| internal/storage/user.go | Updates user CRUD operations to handle the new show_voting_buttons field |
| internal/ui/entry_vote.go | Implements HTTP handler for processing vote update requests with validation |
| internal/ui/ui.go | Registers the updateEntryVote route in the UI router |
| internal/ui/static/js/app.js | Adds handleVoteAction JavaScript function to handle client-side vote interactions and UI updates |
| internal/ui/static/css/common.css | Adds CSS styling for vote buttons including hover states, active states, and color coding |
| internal/template/templates/views/entry.html | Adds vote buttons to entry detail page with appropriate data attributes |
| internal/template/templates/common/item_meta.html | Adds vote buttons to entry list items in the feed view |
| internal/ui/form/settings.go | Adds ShowVotingButtons field to settings form for user preferences |
| internal/ui/settings_show.go | Includes ShowVotingButtons in settings page rendering |
| internal/template/templates/views/settings.html | Adds checkbox to toggle voting buttons visibility in user settings |
| internal/locale/translations/*.json | Adds translations for upvote/downvote labels and settings checkbox across all supported languages |
| .gitignore | Adds *.envrc pattern (unrelated to voting feature) |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
Pull request overview
Copilot reviewed 40 out of 41 changed files in this pull request and generated 4 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…e updating the vote.
|
Sounds like feature creep to me: "Miniflux is a minimalist and opinionated feed reader.", and having a voting system to implement a recommendation engine is anything but :/ |

Have you followed these guidelines?
Rationale
At the moment, there is no way in Miniflux (or any other RSS feed reader that I looked at) to "upvote" or "downvote" an entry. I'm using "upvote" and "downvote" in the generic sense of the term, it's the equivalent of like/unlike or thumb up/down. In my opinion, it's a critical building block to implement more advanced features that revolve around optimising the content that we see. Here are a few use cases:
Why upvote/downvote, and not...
I have considered using the "starred" and "read/unread" statuses, labels, I have hijacked other buttons in other RSS readers, etc. It always feels clunky: too many clicks to classify an article, loss of another feature, etc. I believe a system like upvote/downvote is the clean way to go
Why doesn't it already exist?
I'm not entirely sure if people don't have a need for a relevant/irrelevant classification system, or if there is a lack of the things that come after having implemented such system. I didn't find a lot of open source and self-hosted recommendation engines or pipelines.
I am partial to this; I subscribed to many really good feeds, and I just don't have time to read everything, even if I want to. I need a way to prioritise. I built a recommendation engine from the data I collected with TTRSS, but I'm trying to move away from it (culture, and it was recently abandoned).
I have implemented such a recommendation engine (blog article here and code here. I have been running it "in production" for a few months, and it has been super helpful. Again, I'm not recommending any particular solution for the recommendation part, I just think the community needs basic build blocks to even go there.
How should it work?
It's probably not Miniflux's philosophy to implement recommendation engines, and it probably should be left to the community. The implementation of the engines could live in plugins or in custom third-party solutions. But these solutions all need the labelling of the articles, and I don't think the labelling can live in a plugin (hence this PR).
Please note that I also implemented a setting option to enable/disable the voting buttons, and they're disabled by default.
A picture is worth a thousand words