docbrown/app
Jeremy Friesen 0d0464be2f
Allowing VariantQuery for Feed Generation (#17382)
* Allowing VariantQuery for Feed Generation

Apologies for the breadth of this pull request, I had considered many
small commits, but felt that would've been more effort for the value
provided.

This commit includes the following:

- Documentation updates to the feed variant (though not the final pass)
- Renaming and adding RelevancyLevers that help differentiate
- Adding RelevancyLever#range to provide documentation
- Reducing redundent controller logic by making a
  `Articles::Feeds.feed_for` method.
- Adding some configuration validation for RelevancyLevers
- Adding constants for better clarification
- Testing unhappy paths for feed configuration
- Adjusting the module namespace of some objects
- Exposing top-level configurations for variants (along with their
  defaults)
- Creating the VariantyQuery that at present inherits from the
  `Articles::Feeds::WeightedQueryStrategy`

As implemented, we can deploy this code to production without using the
new VariantQuery.  Once we toggle on the
`:feed_uses_variant_query_feature` FeatureFlag, it will switch to using
the VariantQuery.  The VariantQuery's two variants and the
internal configuration of `Articles::Feeds::WeightedQueryStrategy`
produce the same query.

The goal of this factor is to allow for a quick on and off toggle of the
feed query; to ensure that what we introduce remains performant.

- Closes forem/forem#17272
- Closes forem/forem#17276
- Closes forem/forem#17216

In addition, I will be recording a code-walkthrough and linking that
recording to the pull request.

* Apply suggestions from code review

Co-authored-by: Mac Siri <krairit.siri@gmail.com>

Co-authored-by: Mac Siri <krairit.siri@gmail.com>
2022-04-21 11:07:09 -04:00
..
assets toggle fix for spaces (#17343) 2022-04-20 16:45:34 +02:00
controllers Allowing VariantQuery for Feed Generation (#17382) 2022-04-21 11:07:09 -04:00
decorators Profile attribute names should be unique and non-empty (#16396) 2022-04-04 12:14:02 -05:00
errors Favoring re-use of authorization error (#16992) 2022-03-24 08:16:28 -04:00
forms Using a Form Object that will persist for the Creator Settings Form (#15684) 2021-12-10 17:07:40 +02:00
helpers Limit an organizations displayed and add an overflow count (#17339) 2022-04-20 13:10:17 +02:00
javascript fix bug in search and filter indicators (#17341) 2022-04-20 17:57:57 +01:00
lib Avoid redirection by replacing with newer URL (#17320) 2022-04-18 22:12:21 -04:00
liquid_tags Revalidate embedded links that redirect (#17150) 2022-04-07 13:32:07 -04:00
mailers "Reply to" and "From" Email addresses for SMTP Configurations (#16499) 2022-02-16 16:14:54 +02:00
models Allowing VariantQuery for Feed Generation (#17382) 2022-04-21 11:07:09 -04:00
policies Encapsulating the "why we hide/show" something (#17166) 2022-04-11 13:40:16 -04:00
queries small non-views ruby i18n (#16004) 2022-01-11 10:05:18 +07:00
refinements Drop profile columns from user (#10707) 2020-12-03 08:14:38 +07:00
sanitizers Don't sanitize anchor elements with no href (#16667) 2022-02-22 11:27:38 -06:00
serializers Remove unused methods from User (#16616) 2022-02-18 09:02:17 +07:00
services Allowing VariantQuery for Feed Generation (#17382) 2022-04-21 11:07:09 -04:00
uploaders small non-views ruby i18n (#16004) 2022-01-11 10:05:18 +07:00
validators Remove the "Getting Started" Section from the Config (#16033) 2022-01-20 07:31:35 -07:00
view_objects Patching ERB rendering of the data-info JSON (#16067) 2022-01-14 08:30:49 -05:00
views fix bug in search and filter indicators (#17341) 2022-04-20 17:57:57 +01:00
workers Busting tag cache when space changes (#17384) 2022-04-20 16:37:34 -04:00