docbrown/app/controllers
Lawrence 0c93bde6c2
Subscribe to Comment Functionality (#19555)
* Move save over and add button labels

* comment notification design and functionality

* controller error handling

* add ternery operator for background class

* minor cleanup

* add proper styling toggles

* tests and mobile spec

* add for all buttons

* add article as a param

* comment is not required on article preview

* update policy spec

* add test for coverage

* add proper button titles

* use the last user comment as comment id

* add better error handling and remove multiple fetch calls in js

* copy change to threads

* update copy, fix multiple fetch calls, add observer for loading more notifications

* update spec

* add rspecs

* more test specs

* fix test specs

* subscribe button text tests

* add export

* optimistically update ui function tests

* button initialize test

* check for comment ancestry

* add feature flag block

* some cleanup

* update logic and specs

* oops

* rubocop issues

* change config names

* change config names

* fix spec

* add one more conditional

* check for comments

* service-object the toggler

* separate routes

* continual refactoring

* refine spec tests

* clean up policy

* Adjust js and view files to match be params

* some service object refactoring

* separate endpoints on client-side

* broken spec

* service specs

* policy spec fixes

* remove action param

* remove action param from spec

* minor updates

* trigger build

* update to post

* Services don't need permitted params

* Notifications continue to be a mess, decorator specs to follow

* Not toggling now

* This doesn't really belong here

* Fix tests after moving

* Streamline front-end

* There could be errors?

* polymorphic_name is a class thing

* ☠️ json_data in notification views

* Use feature_flag helper to get current_user

* Cannot derive current subscription status from notification, only from subscription

* Default is subscribe to all article comments

* Sync up matching unsubscribe, make subscribe idempotent-ish

* Temporarily comment-out button jest tests to see if I can unstick CI

* Stop trying to detect potential subscribe-to-comment

* Stop trying to detect potential subscribe-to-comment

* Minor spec refactoring

* Add specs for article notification decoration

* NotificationDecorator specs are rather long

* Rubocop likes it?

* Minor spec refactoring

* Doesn't need to stay pending

* Add spec for subscription finder

* Expand Subscribe service specs

* YAGNI, but I don't like hard-coded config

* Refactor Unsubscribe service specs

* nobody expects the infinite scroll

* This *might* work, except for feature flag

* Ancestry can be quite deep actually

* Rubocop

* Update subscribe button for subscribe-to-thread

* Jest tests are just tests

* hasAttribute != getAttribute

* Test knows **nothing** about window size

* Tests have been lying about mobileLabel this whole time

* Make payload/endpoint testable

* Is Jest actually happy???

* Still cleaning up jest/eslint

* Temporarily comment-out cypress tests pending feature flag

* Thanks, Rubocop, what would we do without you

* Preserve round-trip for 'top-level' and 'only-author' subscriptions

* Update specs

* Move save button icon

* Update test with better config param

* Try feature flag specific to cypress env

* Tell cypress to wait for (un)subscribing to work

---------

Co-authored-by: Lawrence S <lawrence@forem.com>
Co-authored-by: Joshua Wehner <joshua@forem.com>
2023-07-10 17:11:46 +02:00
..
admin Rename Admin::DisplayAds controller to Billboards (#19687) 2023-07-07 08:11:35 -04:00
api Add ability to mark billboard (display_ad) as "priority" (boolean) (#19599) 2023-06-12 16:28:15 -04:00
concerns Follow-ups for suggested organizations follows during onboarding (#19619) 2023-06-29 11:49:01 +02:00
field_test Introducing a quick and dirty fix for abtests/admin (#17982) 2022-06-24 09:26:46 -04:00
incoming_webhooks Remove sustaining member newsletter, and its settings (#17514) 2022-04-29 11:47:12 -05:00
notifications
stories Sort organization members and tag moderators by badge count (#19582) 2023-06-09 15:30:46 +01:00
users Refactoring onboarding (#19525) 2023-05-25 10:03:12 +02:00
api_secrets_controller.rb
application_controller.rb Subscribe to Comment Functionality (#19555) 2023-07-10 17:11:46 +02:00
application_metal_controller.rb
article_approvals_controller.rb Refactor :moderation_routes? method to use correct policies (#18183) 2022-07-25 07:58:41 -04:00
articles_controller.rb Consistent rendering on preview: comments and articles (#19361) 2023-04-27 14:08:15 +03:00
async_info_controller.rb Update user_data cache key (#19101) 2023-02-15 14:11:39 -05:00
badges_controller.rb
collections_controller.rb
comments_controller.rb Consistent rendering on preview: comments and articles (#19361) 2023-04-27 14:08:15 +03:00
confirmations_controller.rb Fix email confirmation logic when registering via Omniauth (#17878) 2022-06-23 16:26:26 -04:00
credits_controller.rb
dashboards_controller.rb Show Series counts on all Dashboard Tabs (#17513) 2022-04-29 11:58:06 -04:00
deep_links_controller.rb
devices_controller.rb
discussion_locks_controller.rb
display_ad_events_controller.rb Throttle display ad event per unit rather than globally (#18697) 2022-11-14 16:30:52 -05:00
display_ads_controller.rb Refactor the home feed + add user tag filtering on in-feed billboards (#19600) 2023-07-06 16:47:08 +02:00
email_authorizations_controller.rb
email_subscriptions_controller.rb
feedback_messages_controller.rb Update FeedbackMessagesController#create feedback-response-sent-at cache key (#19287) 2023-04-05 13:05:12 -04:00
followings_controller.rb
follows_controller.rb Fix bug: Unable to unfollow topics (#19637) 2023-06-29 09:54:10 +02:00
ga_events_controller.rb Prefer remote_ip in GaEventsController (#19074) 2023-02-06 18:38:00 -05:00
github_repos_controller.rb
image_uploads_controller.rb
invitations_controller.rb Remove name from invitation flow (#17438) 2022-05-03 09:33:12 +01:00
liquid_embeds_controller.rb
liquid_tags_controller.rb
listings_controller.rb
moderations_controller.rb Redeploying the Flag/Unflag User functionality (#18235) 2022-07-28 09:03:37 -04:00
notification_subscriptions_controller.rb Subscribe to Comment Functionality (#19555) 2023-07-10 17:11:46 +02:00
notifications_controller.rb
omniauth_callbacks_controller.rb Fix email confirmation logic when registering via Omniauth (#17878) 2022-06-23 16:26:26 -04:00
onboardings_controller.rb Follow-ups for suggested organizations follows during onboarding (#19619) 2023-06-29 11:49:01 +02:00
open_search_controller.rb
organizations_controller.rb Organisation members page to show all users (#19611) 2023-06-28 12:35:15 +05:30
page_views_controller.rb
pages_controller.rb Rename Admin::DisplayAds controller to Billboards (#19687) 2023-07-07 08:11:35 -04:00
passwords_controller.rb Rubocop fixes (#18461) 2022-09-16 15:25:48 +03:00
podcast_episodes_controller.rb
podcasts_controller.rb
poll_skips_controller.rb
poll_votes_controller.rb
pro_accounts_controller.rb
profile_field_groups_controller.rb
profile_pins_controller.rb
profile_preview_cards_controller.rb
profiles_controller.rb Remove brand_color2 from users_settings (#18473) 2022-09-21 11:21:29 -06:00
rating_votes_controller.rb
reactions_controller.rb Rename cache-key in ReactionsController (#19368) 2023-04-27 15:26:57 +01:00
reading_list_items_controller.rb
registrations_controller.rb Update Users::ProfileImageGenerator (#19040) 2023-02-01 06:12:26 -05:00
response_templates_controller.rb Routine rubocop fixes (#19254) 2023-03-24 14:37:44 +03:00
search_controller.rb Organization Search Filtering (#19430) 2023-05-08 14:58:25 -05:00
service_worker_controller.rb
sidebars_controller.rb
sitemaps_controller.rb
social_previews_controller.rb Remove social_preview views (except articles) (#18523) 2022-10-11 12:28:55 +02:00
stories_controller.rb Organisation members page to show all users (#19611) 2023-06-28 12:35:15 +05:30
stripe_active_cards_controller.rb
tag_adjustments_controller.rb
tags_controller.rb Refactoring onboarding (#19525) 2023-05-25 10:03:12 +02:00
user_blocks_controller.rb
user_subscriptions_controller.rb
users_controller.rb Add Edit Profile Image option to Onboarding (#19589) 2023-06-23 16:08:27 +05:30
video_states_controller.rb
videos_controller.rb Routine rubocop fixes (#19254) 2023-03-24 14:37:44 +03:00