docbrown/app/javascript
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
..
.storybook Updated storybook (#18559) 2022-10-11 12:54:50 +05:30
__mocks__ Bump focus-trap from 6.7.3 to 6.8.1 (#17425) 2022-04-27 08:09:21 -06:00
actionsPanel Redeploying the Flag/Unflag User functionality (#18235) 2022-07-28 09:03:37 -04:00
admin Rename Admin::DisplayAds controller to Billboards (#19687) 2023-07-07 08:11:35 -04:00
analytics Show friendly error message on API fetch failure on stats (#17570) 2022-05-18 16:12:42 +02:00
article-form Actually get buildpulse to work with rspec and jest (#18859) 2022-12-19 14:31:29 -05:00
articles Restructure the way we render the feed + add billboard locations on signed in feed (#19652) 2023-07-03 15:00:44 +02:00
colorPickers Use the Preact ColorPicker in creator onboarding (#16731) 2022-03-03 08:22:10 +00:00
CommentSubscription Add a MultiSelect Autocomplete component to the Display Ads Page (#18560) 2022-10-26 16:24:31 +02:00
common-prop-types ✂✂✂ Remove Connect (#14734) 2021-11-18 08:21:00 -06:00
contentDisplayPolicy Accessibility improvements for hide comments modal (#15462) 2021-11-24 09:50:27 +03:00
crayons Updated story book annotations (#18562) 2022-10-11 19:43:40 +05:30
display-ad Save selected tags to the display ad model (#18633) 2022-10-27 20:22:29 +02:00
githubRepos Add a MultiSelect Autocomplete component to the Display Ads Page (#18560) 2022-10-26 16:24:31 +02:00
hooks Replace listings tag component (#16855) 2022-03-30 16:51:40 +01:00
leftSidebar Refactoring cached_followed_tags (#16175) 2022-01-24 19:53:48 -05:00
liquidTags Used preact modal for userSubscriptionLiquidTag (#18623) 2022-10-25 02:01:52 +05:30
listings Migrate dashboard initializers to packs (#19327) 2023-04-18 18:09:33 -04:00
mobile Refactor runtime to webpacker JS (#17142) 2022-04-07 15:39:38 +01:00
modCenter Quick fix: Remove double title from mod center item ✂️ (#19482) 2023-05-18 11:22:57 -04:00
onboarding Change Onboarding's button styling (#19654) 2023-07-07 12:46:46 -04:00
organization [js] Update all Yarn dependencies (2022-09-23) (#18421) 2022-09-23 15:25:03 -04:00
packs Subscribe to Comment Functionality (#19555) 2023-07-10 17:11:46 +02:00
podcasts Updated story book annotations (#18562) 2022-10-11 19:43:40 +05:30
previewCards Add author profile preview cards to feed (#14340) 2021-08-13 10:55:43 +07:00
profileDropdown Removing a JS message about connect (#16982) 2022-03-23 12:30:59 -04:00
profilePreviewCards Generator updates (#16339) 2022-01-28 12:20:30 +01:00
readingList Updated storybook (#18559) 2022-10-11 12:54:50 +05:30
responseTemplates Remove loading-ellipsis.svg and related code (#19569) 2023-06-01 10:41:53 -04:00
runtimeBanner Refactor runtime to webpacker JS (#17142) 2022-04-07 15:39:38 +01:00
Search Fix search bar disappears on mobile (#18909) 2023-01-09 10:51:40 +02:00
searchableItemList Modified the misleading comment (history was removed) (#18455) 2022-09-19 11:37:24 +03:00
shared/components Fix jest datetime tests with regex (#18347) 2022-08-17 11:12:09 -04:00
sidebar-widget Refactoring SidebarWidget and sidebarUser (#10887) 2021-02-03 17:47:54 +00:00
Snackbar Updated story book annotations (#18562) 2022-10-11 19:43:40 +05:30
topNavigation Frontend for multiple reactions (v1) (#18808) 2023-01-23 16:00:50 +01:00
utilities fix scroll when popstate from a full screen code block (#19674) 2023-07-07 15:54:24 -04:00
.eslintrc.js Add Google Analytics 4 Support (#18124) 2022-07-21 09:26:13 -05:00
netlify.toml Update storybook node version (#16106) 2022-01-14 08:00:39 -05:00
routes.js.erb [15-minute fix] Add js-routes gem (#15133) 2021-11-01 10:08:15 +07:00