docbrown/app/helpers
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
..
admin Add Data (User Details, Status, etc.) to the Member Index View Columns (#17033) 2022-04-06 11:48:25 -06:00
admin_helper.rb Refactoring AdminMenu and Menu towards classes (#16847) 2022-03-21 13:31:20 -04:00
application_helper.rb Narrowing when we apply "hidden" by policy attributes (#17143) 2022-04-06 13:57:01 -04:00
articles_helper.rb app/helpers i18n (#16003) 2022-01-13 11:46:32 -05:00
authentication_helper.rb Remove Creator Onboarding Feature Flags from Codebase (#15982) 2022-01-31 11:30:43 -07:00
broadcasts_helper.rb Add ahoy + welcome notification tracking (#8758) [deploy] 2020-06-18 13:40:14 -07:00
comments_helper.rb app/helpers i18n (#16003) 2022-01-13 11:46:32 -05:00
crayons_helper.rb Removing yard doc generation warnings (#17090) 2022-04-04 15:03:22 -04:00
date_helper.rb Add I18n date format example (#14973) 2021-10-08 15:08:56 -04:00
display_ad_helper.rb Rubocop fixes (#14868) 2021-09-30 13:22:09 -04:00
feedback_messages_helper.rb app/helpers i18n (#16003) 2022-01-13 11:46:32 -05:00
listing_helper.rb Replace listings tag component (#16855) 2022-03-30 16:51:40 +01:00
notifications_helper.rb ✂✂✂ Remove Connect (#14734) 2021-11-18 08:21:00 -06:00
organization_helper.rb app/helpers i18n (#16003) 2022-01-13 11:46:32 -05:00
profile_helper.rb [Small Wins] Show character limits for profile inputs (#15255) 2021-11-05 09:11:42 -04:00
rate_limit_checker_helper.rb app/helpers i18n (#16003) 2022-01-13 11:46:32 -05:00
settings_helper.rb "Reply to" and "From" Email addresses for SMTP Configurations (#16499) 2022-02-16 16:14:54 +02:00
social_image_helper.rb Fix Ruby 2.7 kwargs' warnings & misc spec warnings (#13256) 2021-04-06 16:57:59 -04:00
social_link_helper.rb app/helpers i18n (#16003) 2022-01-13 11:46:32 -05:00