-
-
Notifications
You must be signed in to change notification settings - Fork 7k
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
Add ability to filter followed accounts' posts by language #19095
Conversation
f6ff504
to
5cf26f6
Compare
8f6b5d4
to
c2f9038
Compare
21e6025
to
61ed41c
Compare
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.
I'm not completely sure about the “boosted” to “reblog” change, it's a breaking change for little gain (especially since “reblog” isn't currently used in the user interface).
I am very unsure about the way an account's languages is determined, it can easily cause you to miss languages, especially if new ones are added later on and/or if the account posts in a not very regular fashion (e.g. not the same amount of posts in each language, but with larger gaps between two posts in the same language).
Otherwise, the UI and code look fine to me.
(state, accountId) => state.getIn(['timelines', `account:${accountId}`, 'items'], ImmutableList()), | ||
state => state.get('statuses'), | ||
], (statusIds, statuses) => | ||
new ImmutableSet(statusIds.map(statusId => statuses.get(statusId)).filter(status => !status.get('reblog')).map(status => status.get('language')))); |
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.
This doesn't seem to be a very reliable way of handling that… showing languages only for the posts that got loaded by the WebUI at that point… it may also slightly bias against languages, since those not selected by the user would not pop up into their Home TL and thus might not be known by the WebUI (if they aren't in the first page of the account's posts).
Okay, I can rename the CSV header back. I think the sourcing of the languages for selection is not perfect, but adequate. If you have e.g. an EU account, and they make a copy of the same post in every supported language, then those languages will be represented across the most recent posts. The alternatives are:
|
61ed41c
to
6aa0c88
Compare
I renamed the CSV header back. |
I guess it could work in most cases, but I'm really unsure how reliable that would be. Server-side on more posts seems more reliable but I don't know. |
I think it's adequate for the initial implementation. If there is demand, we can add a server-side API. |
Similar to how you can choose to be notified of an account's new posts, or hide reblogs from them, you can choose the languages that appear on your home feed, for example when following a multi-lingual account, you can make it so only the language you understand lands on your home feed.
REST API changes
languages
param onPOST /api/v1/accounts/:id/follow
languages
attribute on Relationship entityOther
This project was funded through the NGI0 Discovery Fund, a fund established by NLnet with financial support from the European Commission's Next Generation Internet programme, under the aegis of DG Communications Networks, Content and Technology under grant agreement No 825322.