Fixed: #713: Disply likes and boosts on post cards #744
Geen beoordelaars
Labels
Geen label
A: API
A: Backend
A: Federation
A: Front-End
A: I18N
A: Meta
A: Security
Build
C: Bug
C: Discussion
C: Enhancement
C: Feature
Compatibility
Dependency
Design
Documentation
Good first issue
Help welcome
Mobile
Rendering
S: Blocked
S: Duplicate
S: Incomplete
S: Instance specific
S: Invalid
S: Needs Voting/Discussion
S: Ready for review
Suggestion
S: Voted on Loomio
S: Wontfix
Geen mijlpaal
Geen project
Niet toegewezen
1 deelnemer
Notificaties
Vervaldatum
Geen vervaldatum ingesteld.
Afhankelijkheden
Geen afhankelijkheden ingesteld.
Referentie: Plume/Plume#744
Laden…
Tabel toevoegen
Verwijs in een nieuwe issue
Geen beschrijving gegeven.
Branch "display-boost-and-likes-in-timelines" verwijderen
Het verwijderen van een branch is permanent. Hoewel de verwijderde branch kan blijven bestaan voor een korte tijd voordat het daadwerkelijk wordt verwijderd, kan het in de meeste gevallen NIET ongedaan gemaakt worden. Wilt u doorgaan?
This is a basic and simple way to display them. No interaction possible.
Alos, this patch is not optimised. as everytime a partial post_card is
called,
Post::count_likes()
andPost::count_reshares()
are calledwhich means quite a few more quesies are sent to database unless diesel
uses some cache mechanisem.
A way to enhance this this would be to keep a count of likes and reshares
are kept in Post model / table.
On dark theme:


On Light theme:
Thanks for the PR.
I'm not 100% about the presentation, these counters looks too big and in the middle of the card to me, like if they were the most important information here. Maybe moving on the same line as the author/blog/date would help?
And for the like/share counter cache on Post, feel free to implement it if you want, but this PR can probably be merged as it is. I don't know if Diesel does caching, but Postgres and SQlite certainly do, so it should be fine.
Ok, how about that?
On larger cards:

@elegaanz is it ok with you ?
Yes, it looks great! Thank you