Commit graph

11 commits

Author SHA1 Message Date
Joshua Wehner
d227e1d285
Suppressing articles negative-follow tags from appearing in the "relevant" feed (#19948)
* Try suppressing all negative-follow tags

* userData isn't always available

* Bolster test coverage for tag filter scenarios

* Antitags for the non-basic 'strategy'

* Rename antitags -> hidden_tags

* Rename 'anti_tags' -> 'hidden_tags' as well

* Use userData.followed_tags to derive hidden_tags
2023-08-28 10:11:20 -04:00
Joshua Wehner
b812ca5955
(Really) Enable multiple reactions on #index (#19202) 2023-03-22 10:20:00 -04:00
Joshua Wehner
727705dc89
Revert "Enable multiple reactions on #index (including front-end render)" (#19197) 2023-03-03 09:59:51 -05:00
Joshua Wehner
8a45a4bf67
Enable multiple reactions on #index (including front-end render) (#19169)
* Revert "(Temporarily) Remove multiple reactions from #index (#19142)"

This reverts commit a45d300639.

* Clean up reaction category count mechanism for #index

* Remove, unnecessary

* Expose reaction categories in JSON response

* Update test with new categories

* Fix flaky sample / minimum floor

* buildArticle (infinite scroll) with multiple reactions

* If we're doing #index front-end, we aren't feature-flag'd

* nbsp

* react (home feed) has multiple_reactions

* Update app/assets/javascripts/utilities/buildArticleHTML.js

Co-authored-by: Rajat Talesra <rajat@forem.com>

* Clean up Reactable#reaction_categories

* Use 'multiple_reactions_icons_container'

* Try adding a ReactionCount test

* Adapt memory fix from 76dd53d

* Try adding categories to fixture

* Attempt to eager-load distinct public categories

* Setting dependent to the default for rubocop

* Try making image assets more public?

* Revert "Fix flaky sample / minimum floor"

---------

Co-authored-by: Rajat Talesra <rajat@forem.com>
Co-authored-by: Mac Siri <mac@forem.com>
2023-03-03 15:17:19 +01:00
Jeremy Friesen
19e5b6da35
Ensuring home feed uses minimum score threshold (#18123)
Prior to this commit we had a hard-coded 0; there are other hard-coded
score ranges throughout the code-base.  These are unexplained magic
numbers.  The hope with this change is to provide a mechanism for Forem
owners to adjust a configuration and see a change in behavior.

Related to forem/forem-internal-eng#484
2022-07-15 16:37:51 -04:00
Jeremy Friesen
f5243ea844
Normalizing feed page size (#15326)
This commit removes a handful of magic numbers and instead relies on a
constant.

This has a small impact in that the Basic feed will now return 50
articles instead of 25.  However, normalizing the feed pagination window
size helps reduce some oddities in reporting.

In addition, this might be something we consider giving administrators
the ability to set (with default options, because we shouldn't allow
page sizes of 10_000 as that's a massive memory hog).

Related to #14709
2021-11-16 11:12:01 -05:00
Jeremy Friesen
da36b5fd17
Refactoring to extract common interface (#15229)
This is a hypothetical and experimental interface change.  The goal of
the change is to begin looking at what a "Feed"'s method interface would
look like.

I would like to reduce the controller logic necessary for deciding on
different strategies, and instead defer to a builder/strategy lookup
pattern.
2021-11-02 13:16:09 -04:00
Jeremy Friesen
ed78f8f479
Extracting a common calculator for feed weights (#15199)
Prior to this commit, there existed duplicate logic between two of the
primary user feeds.  This refactor introduces a new object which is
solely concerned with calculating scores to add to an article base score.

With this commit, we can introduce A/B testing by changing passing
different config values to `ArticleScoreCalculatorForUser.new`.

My suspicion is that for some of this, we might be able to better
leverage the database via select statements and SQL sums.  However, that
is presently outside of what I'm prepared to tackle.
2021-10-27 04:45:53 -04:00
Ben Halpern
472c3d2922
Fix and refactor hide user content (#12307) 2021-01-18 11:08:23 -05:00
Ben Halpern
0ed408a409
Fix feed order for basic (#10717)
* Fix feed order for basic

* Fix spec
2020-10-07 11:26:32 -04:00
Ben Halpern
f87e9eace1
[deploy] Add feed_strategy config (#10245)
* Add feed_strategy config

* Add configs spec

* Fix specs

* Fix field test scenario

* Linting

* A couple small changes

* Rename Optimized and objects

* Add proper namespace

* Fix codeclimate

* Add docs

* Update docs/technical-overview/readme.md
2020-10-06 17:36:27 -04:00