eloquence / lib.reviews

A free/libre code and information platform for reviews of anything
Creative Commons Zero v1.0 Universal
173 stars 13 forks source link

Display reviews count on teams main page #313

Closed Poslovitch closed 1 year ago

Poslovitch commented 1 year ago

Related: https://github.com/eloquence/lib.reviews/issues/199

Would happily get some feedback on this one, before I start doing it for the user and thing pages. :)

image

eloquence commented 1 year ago

Thanks @Poslovitch. I've pushed a commit which should preserve functionality and simplify a bit by looking up the join relationship directly. (Doing a full join on all reviews for every team instantiation is potentially a bit expensive.) Let me know if that works for you as expected (it does for me) and I can merge.

I've also changed it from reviewsCount to reviewCount to be consistent with the review count we have for review subjects (things).

Poslovitch commented 1 year ago

Thanks @eloquence ! It works on my end as well.

I'm glad to see there's a .count() operator in thinky. I somehow overlooked it. Once merged, I'll carry on with the other suggestions of #199 :)