docbrown/app/assets/javascripts/utilities
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
..
browserStoreCache.js Fixes some lint issues (#3786) 2019-08-22 15:59:13 -04:00
buildArticleHTML.js Fix profile_image bug in org search (#19444) 2023-05-09 17:54:22 +02:00
buildCommentFormHTML.js.erb Remove loading-ellipsis.svg and related code (#19569) 2023-06-01 10:41:53 -04:00
buildCommentHTML.js.erb Try fixing comment like count bugs (#18438) 2022-09-12 10:12:46 +02:00
checkUserLoggedIn.js Replace querySelector and getElementsByTagName when selecting for head and body (#8315) 2020-06-08 20:08:40 -04:00
dynamicallyLoadScript.js Ran prettier on *.js, *.jsx and *.md files. (#11586) 2020-11-23 20:45:50 -05:00
getCsrfToken.js amend csrf token retries (#16714) 2022-02-28 15:05:13 +00:00
getCurrentPage.js Fixes some lint issues (#3786) 2019-08-22 15:59:13 -04:00
getImageForLink.js Fixes some lint issues (#3786) 2019-08-22 15:59:13 -04:00
insertAfter.js Fixes some lint issues (#3786) 2019-08-22 15:59:13 -04:00
isTouchDevice.js Frontend for multiple reactions (v1) (#18808) 2023-01-23 16:00:50 +01:00
localDateTime.js Fix inconsistent published date of Article and Comment (#18412) 2022-09-09 14:12:15 -06:00
localStorageTest.js Fixes some lint issues (#3786) 2019-08-22 15:59:13 -04:00
preventDefaultAction.js Fixes some lint issues (#3786) 2019-08-22 15:59:13 -04:00
sendFetch.js Subscribe to Comment Functionality (#19555) 2023-07-10 17:11:46 +02:00
sendHapticMessage.js Fixed some lint issues (#3782) 2019-08-21 10:44:23 -04:00
showLoginModal.js Add tracking for the registration flow - "Clicked on Create Account" (#18459) 2022-09-22 16:03:49 +02:00
slideSidebar.js add skip link to tag page (#13485) 2021-04-23 16:10:28 +01:00
timeAgo.js Ran prettier on *.js, *.jsx and *.md files. (#11586) 2020-11-23 20:45:50 -05:00
userData.js Refactored userData while working on hompage makeover. (#5916) [deploy] 2020-02-06 11:18:52 -08:00
watchForLongTouch.js Mobile tap issue fix (#19121) 2023-02-16 00:38:02 +05:30