docbrown/app
Jeremy Friesen a9a5ad214b
Narrowing when we apply "hidden" by policy attributes (#17143)
Prior to this commit, we always assumed a policy based attribute would
have the "hidden" class and then we'd rely on JavaScript to toggle the
visibility.

With this approach, we are "cheating" a bit by specifically referencing
a feature flag that is the driver for the visibility behavior.

This mirrors the one-off behavior of forem/forem#16606.  Namely, when
the flag is off, we render without default hiding.  And when it's on, we
include the "hidden" attribute.

In both cases, we will still leveraged the [applyApplicationPolicyToggles.js][1]
introduced in forem/forem#17076.

An impact could be that if multiple flags are fiddling with the policy,
we could see an area disappear or wrongly remain present.  This would be
a warning to fix (the server would still enforce correct policies so
this would be a bit of a "heads up we have a mismatch in understanding
that happens to impact UI behavior").

[1]:https://github.com/forem/forem/blob/main/app/javascript/packs/applyApplicationPolicyToggles.js
2022-04-06 13:57:01 -04:00
..
assets tweak crayons layout for admin section (#17122) 2022-04-05 13:14:50 +01:00
controllers Adding copy to assist with space toggle decision (#17147) 2022-04-06 11:07:21 -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 Narrowing when we apply "hidden" by policy attributes (#17143) 2022-04-06 13:57:01 -04:00
javascript Conditional rendering of "Create Post" link (#17076) 2022-04-05 12:47:12 -04:00
lib Removing yard doc generation warnings (#17090) 2022-04-04 15:03:22 -04:00
liquid_tags Better Error Msg when Listing URL embedded and Listings are disabled (#17116) 2022-04-06 08:38:53 -04:00
mailers "Reply to" and "From" Email addresses for SMTP Configurations (#16499) 2022-02-16 16:14:54 +02:00
models Add Data (User Details, Status, etc.) to the Member Index View Columns (#17033) 2022-04-06 11:48:25 -06:00
policies Conditional rendering of "Create Post" link (#17076) 2022-04-05 12:47:12 -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 OpenGraph fallback for Embeds (merge-by-any-core) (#17001) 2022-04-04 15:31:38 -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 Narrowing when we apply "hidden" by policy attributes (#17143) 2022-04-06 13:57:01 -04:00
workers Reducing subtle duplication of effort/logic (#17078) 2022-04-01 13:32:44 -04:00