docbrown/app/services
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 Display analytics up to yesterday instead of today (#17064) 2022-04-04 15:17:32 -04:00
articles Refresh audience segment for 'active' user (#19470) 2023-05-19 14:16:07 +02:00
audit Adding :internal auditing for admin/spaces#update (#17010) 2022-03-25 14:25:13 -04:00
authentication Routine rubocop fixes (#19254) 2023-03-24 14:37:44 +03:00
badges Expand Badges::AwardYearlyClub to include year 8 (#18959) 2023-01-16 08:51:01 -05:00
broadcasts/welcome_notification Round Robin Notifications Refactor (#19026) 2023-02-01 15:21:36 +02:00
color Color tokens (#16107) 2022-01-21 07:41:03 +01:00
credits Routine rubocop fixes (#19254) 2023-03-24 14:37:44 +03:00
discover Add Forem Discover registration worker and service (#14865) 2021-10-01 10:27:31 -04:00
edge_cache Routine rubocop fixes (#19254) 2023-03-24 14:37:44 +03:00
error_messages Add a contact email address to the /admin/customization/config (#16497) 2022-02-15 17:37:08 +02:00
exporter Fix app/services' ruby 2.7 kwargs warnings (#13177) 2021-04-01 18:40:50 -04:00
fastly_config
feeds Routine rubocop fixes (#19254) 2023-03-24 14:37:44 +03:00
follows Fix bug: Unable to unfollow topics (#19637) 2023-06-29 09:54:10 +02:00
giphy
github Routine rubocop fixes (#19254) 2023-03-24 14:37:44 +03:00
homepage Extracting duplicate logic (#16035) 2022-01-10 15:19:04 -05:00
html Fix mangled github image embed (#19455) 2023-05-17 17:09:47 -04:00
images Add Cloudflare to Images::Optimizer options (proof of concept) (#19574) 2023-06-21 09:42:06 -04:00
listings More listings refactoring (#16343) 2022-02-23 13:44:30 +07:00
loggers Rubocop fixes (#15892) 2021-12-28 09:11:41 -06:00
mailchimp Remove sustaining member newsletter, and its settings (#17514) 2022-04-29 11:47:12 -05:00
markdown_processor Ensure rendering parity on DisplayAd, Comment, & Article (#19091) 2023-04-07 09:30:17 -04:00
mentions Routine rubocop fixes (#19254) 2023-03-24 14:37:44 +03:00
moderator Clear trusted cache in rolify callback (#19275) 2023-04-03 14:45:00 +02:00
notification_subscriptions Subscribe to Comment Functionality (#19555) 2023-07-10 17:11:46 +02:00
notifications notify mod on new user articles (#19478) 2023-05-23 10:51:46 -04:00
organizations Routine rubocop fixes (#19254) 2023-03-24 14:37:44 +03:00
payments app/services i18n (#16189) 2022-01-20 09:25:25 -05:00
podcasts Routine rubocop fixes (#19254) 2023-03-24 14:37:44 +03:00
profile_fields Refactor profile refreshing (#14643) 2021-09-13 12:15:04 -04:00
push_notifications Have specs run without Redis and refactor ConsumerApp and Device (#13647) 2021-05-07 08:03:16 +02:00
re_captcha Spelling fixes to live code (#15670) 2021-12-06 12:11:25 +02:00
search Organization Search Filtering (#19430) 2023-05-08 14:58:25 -05:00
segmented_users Manual Audience Segments API write endpoints (#19476) 2023-05-25 20:37:18 +01:00
settings Update onboarding suggested tag logic (#19477) 2023-05-23 17:22:27 +02:00
slack Routine rubocop fixes (#19254) 2023-03-24 14:37:44 +03:00
spam Adding configurations to tighten spam handling (#18195) 2022-08-01 11:21:34 -04:00
tag_moderators Clear trusted cache in rolify callback (#19275) 2023-04-03 14:45:00 +02:00
twitter_client Match error class using case instead of if/elsif/else (#16952) 2022-03-21 15:34:49 -05:00
user_subscriptions app/services i18n (#16189) 2022-01-20 09:25:25 -05:00
users Allows super-admin the ability to remove the role from themselves (#19621) 2023-06-26 09:11:33 -04:00
analytics_service.rb Frontend for multiple reactions (v1) (#18808) 2023-01-23 16:00:50 +01:00
application_service.rb
article_api_index_service.rb Remove featured number usage from articles (#18510) 2022-09-28 08:59:03 -06:00
article_with_video_creation_service.rb app/services i18n (#16189) 2022-01-20 09:25:25 -05:00
bulk_sql_delete.rb Remove txn from with_statement_timeout block (#15088) 2021-10-15 14:53:35 -04:00
calculate_reaction_points.rb Refactor reaction categories as abstract class collection (#18540) 2022-11-01 10:50:37 +01:00
comment_creator.rb Routine rubocop fixes (#19254) 2023-03-24 14:37:44 +03:00
content_renderer.rb Ensure rendering parity on DisplayAd, Comment, & Article (#19091) 2023-04-07 09:30:17 -04:00
display_ad_event_rollup.rb Rollup service to compact DisplayAdEvent records (#18508) 2022-10-19 16:21:47 +02:00
email_digest.rb Use new UserSetting and UserNotificationSettings and Ignore Related User Table Fields (#14121) 2021-07-08 09:31:34 -05:00
email_digest_article_collector.rb Extracting a not_authored_by scope (#16123) 2022-01-17 15:20:49 -05:00
feature_flag.rb Extract article markdown rendering to service (#18754) 2022-12-14 15:30:26 +01:00
flare_tag.rb [Search 2.0] Homepage query (#13339) 2021-04-21 12:41:24 +02:00
instrumentation.rb Bump ddtrace from 0.54.2 to 1.0.0 (#17662) 2022-05-18 15:46:49 -04:00
markdown_processor.rb Ensure rendering parity on DisplayAd, Comment, & Article (#19091) 2023-04-07 09:30:17 -04:00
medium_article_retrieval_service.rb Routine rubocop fixes (#19254) 2023-03-24 14:37:44 +03:00
notifications.rb
open_graph.rb Send user agent in open graph fetch so we don't block our own requests (#19462) 2023-05-17 15:49:35 -04:00
rate_limit_checker.rb Routine rubocop fixes (#19254) 2023-03-24 14:37:44 +03:00
reaction_handler.rb Fix comment moderation's UI bugs (#19554) 2023-06-23 09:56:24 -04:00
tag_adjustment_creation_service.rb
tag_adjustment_update_service.rb