Add "Trending" - Filter to Blueprints on front page.#102
Add "Trending" - Filter to Blueprints on front page.#102MvBonin wants to merge 8 commits intogabriel-dehan:mainfrom
Conversation
|
Hey @gabriel-dehan could you please approve the workflows for me to see if i need to fix anything? :) |
|
@MvBonin Just did! Sorry for the delay in reviewing, I'll try to do it this week-end, it's hard during the week with the work. |
gabriel-dehan
left a comment
There was a problem hiding this comment.
Thanks for the PR!
I am worried about the performances and left a few comments.
Additionally I think it would be good to add new indexes to support this feature:
add_index :votes, [:votable_type, :votable_id, :created_at]
add_index :blueprint_usage_metrics, [:blueprint_id, :last_used_at]
|
Thanks for all your input! Also with this data it will be a bit easier to tweak the constants for trending blueprints, feel free to play around with them to your liking! |
|
Hey @gabriel-dehan, I think I changed everything that you requested and just fixed some rubocop errors.
If you still want me to change something, I would love to do it. |
|
@MvBonin thanks a lot man! I just need to take some time to test the feature before merging but it looks all good to me! Requested changes are not specific AFAIK it's about the PR as a whole when I did the first review. Don't worry about it I'll merge it once I am done testing |
gabriel-dehan
left a comment
There was a problem hiding this comment.
Life being life and holidays being done it's been hard to find time to move forward with anything else than work, but I am approving this PR and will (soonish) test it on staging.
Thanks a lot for that, again.

2nd try :)
I have added the "Trending"-Filter option to the front page in the blueprints section. adds #75
Since I don't have access to the production blueprints data it would be nice, if you could test it @gabriel-dehan and @mattr-.
It's basically this:
Calculate trending score for all blueprints (no time restriction)
Older blueprints can trend again if they get recent engagement
What counts:
Feel free to tweak the multipliers to your liking.
For adding the test I used AI and for the Chinese Translation I used a translation tool, hope it is right.