Commit graph

25 commits

Author SHA1 Message Date
Suzanne Aitchison
5fd1f94e85
Add comment notification test to Cypress, including a11y improvements to notification page (#15842)
* changes to accessible names on notification comment box, cypress specs

* add reply to comment test, delete old specs

* tweak to seeds
2021-12-21 15:42:13 +00:00
Angel Barros
bb8b32bdf2
Zappat0n/add rate limit model everywhere 11500 (#14609)
* Create showModalAfterError function

* Show modal when comments rate limit is reached

* Show modal when article reaction rate limit is reached

* Show modal when follow user rate limit is reached

* Show form error when listing creation rate limit is reached

* Show form error when feedback messages rate limit is reached

* Rename functions for listings rate limit checks

* Show modal when notifications reaction rate limit is reached

* Show modal when picture upload rate limit reached

* Show modal for reactable objects when rate limit reached

* Add and modify tests

* empty commit

* Match modal messages to tests

* Fix error updating Modals

Co-authored-by: Dan Uber <dan@forem.com>
2021-09-23 10:49:19 +01:00
ludwiczakpawel
5d3691bcc5
Notifications redesign (#11084)
* notifications

* fix

* .

* REVERT

* .

* drop ccss

* REVERT

* specs

* drop colons

* fixse

* fix

* spec 1

* eh

* Fix notification specs

Co-authored-by: Molly Struve <mollylbs@gmail.com>
2020-10-29 20:38:17 +01:00
Lisa Sy
54c071856e
[deploy] Update top-header for logged-out user (#9874)
* Create first start at desktop top header updates

* Update mobile styling of top header

* Stylize sign in widget card

* Update nav menu and top bar

* Changes based on user being logged-in or not

* Uses user_signed_in? on top nav bar

* Fix lingering old cloudinary helper method

* Trigger CI

* Fixes specs

* Adds redirect_using_referer_spec, fixes other specs & cleanup

* Adds nav-menu.scss to layouts/_styles.html.erb for inline & small edit in referer check

* Remove logged-out styles to make it more uniform with logged in

* Remove nav-menu.scss file

* cleanup markup and JS a little

* Fixes FB auth specs to new login links

* Makes sure unauthenticated /new redirects back to editor

* CI fix Sing in with -> Continue with

* Update db/schema.rb

* Update db/schema.rb

* Update db/schema.rb

Co-authored-by: Fernando Valverde <fdov88@gmail.com>
Co-authored-by: ludwiczakpawel <ludwiczakpawel@gmail.com>
Co-authored-by: Ben Halpern <bendhalpern@gmail.com>
2020-08-31 18:12:22 -04:00
Nick Taylor
322628c4ef
[deploy] Fixed remaining lint issues in the frontend. (#9093) 2020-07-03 08:00:25 -05:00
ludwiczakpawel
e17cbd3efb
NOT MERGE Add tabs to Crayons and to the notifications page (#7737)
* tabs

* frontned

* notifications tabs

* ntofiications

* .

* doc

* names instead of slugs

* flare tag line height

* .

* js
2020-05-14 11:38:57 +02:00
Lisa Sy
9de59c4107
Update sidebar filter menu on Notifications (#7394) 2020-04-27 12:17:20 -04:00
Ben Halpern
2d978696c4
[deploy] Small connect js fixes (#7350) 2020-04-16 20:06:32 -04:00
Ben Halpern
b0a95cdcd7
[deploy] Small design and functionality touches to /connect (#7234)
* Small design and functionality touches to /connect

* Small fixes

* Fix test

* Fix test
2020-04-11 10:56:52 -04:00
Ben Halpern
46b80329a9
Make notification hide correctly on click (#6895) [deploy] 2020-03-26 16:33:37 -04:00
Ben Halpern
1e34a2d8f9
Move navbar rendering JS inline (#5141) [deploy] 2019-12-16 14:48:02 -05:00
rhymes
80e6cf4801 Notifications: increase efficiency and fix pagination offset issue (#3986)
* Increase efficiency and fix pagination offset issue

Right now we filter recently aggregated notifications at runtime, which worked before when there was no pagination, but now filtering is not a good idea combined with offset pagination because it throws off the calculations.

The filtering should be done in the SQL query before paginating, which is what we've switched to. I added a bunch of scopes to make the code clearer as well.

To avoid nesting tags I've also updated the HTML and the JS logic to insert it in the right place.

* Add explanation for hiding the load more button for new users
2019-09-10 09:43:45 -04:00
rhymes
f7d6874956 Paginate notifications (#3948)
* Use offset instead of page and explain things

* Make load more button work

* Add tests for admin view

* Restore the previous logged out behavior

* Modernize initNotifications.js

* Revert "Modernize initNotifications.js"

This reverts commit 4a112b797d7911c4ab63ad0c0a07111b4e7abe25.

* Fix elements presence errors

* Change load-more-button to only appear if 7 or more posts (and some notification copy adjustments)
2019-09-07 11:54:30 -04:00
rhymes
158c398df4 Remove unused timeString statements (#2568) [ci skip] 2019-04-26 12:42:49 -04:00
Glenn Carremans
281330fe16 Fix linting issues in app/views/articles (#1848) 2019-02-28 17:23:06 -05:00
Andy Zhao
5ace9a5fc9 Organization Notifications (#1762)
* Add spec for org reaction notification

* Add organization_id to notifications

* Add validations for user and org IDs

* Move comment json_data out of loop

* Use actual column names instead

* Add organization filters

* Remove extra text-align

* Add organization filtering

* Refactor to reduce complexity

* Add receiver argument to handle orgs

* Add has_many notifications for orgs

* Add follow notifications for orgs

* Add comment notifications for orgs

* Rename some tests for specificity

* Add mark org notifications as read functionality

* Add radix to parseInt

* Define json_data outside of loop

* Notify org followers of a new post as well

* Move test to proper location

* Add test for aggregated method

* Make send org reaction notification more readable

* Test the rest of the notification model

* Refactor tag adjustment spec

* Fix extra html
2019-02-25 14:25:37 -08:00
Ben Halpern
bbbfe6af51
Add haptic feedback where it was missing (#1367) 2018-12-19 16:24:12 -05:00
Ben Halpern
73b1616bb5
Fix notification pagination reaction issue (#1181) 2018-11-22 12:48:54 -05:00
Ben Halpern
eccee11106
Initial basic paginionation-ish for notifications (#1175) 2018-11-21 20:03:56 -05:00
Ben Halpern
5ee5c931fc
Fix small details in notification results and add filtering (#1166)
* Fix small details in notification results and add filtering

* Adjust filter styling

* Fix filtering

* Add reaction render to comments
2018-11-20 18:00:11 -05:00
Ben Halpern
b2d46fed65
Lessen amount of notifications queried slightly to improve performance (#1159)
* Lessen amount of notifications queried slightly to improve performance

* Guard for last_user_reaction
2018-11-19 20:36:35 -05:00
Jonny Buchanan
34efec4b5d Stop using the Fake Notifications Dark Pattern (#288) 2018-08-08 18:31:35 -04:00
Ben Halpern
ab85216621
Update chat and modify article score calc indexing (#395) 2018-06-06 16:08:12 -04:00
Andy Zhao
f0b3e65ca4 Verify CSRF token for reads_controller (#184) 2018-04-06 08:35:57 -07:00
Mac Siri
301c6080e3 Initial commit 2018-02-28 16:11:08 -05:00