* remove IE6 XHR support
IE7 and later support XMLHttpRequest natively, and most of the rest of
the code base uses fetch() which may not work in any version of IE
Drop the conditional here in the assumption that this would only be
the first of many problems for a user with an unsupported browser.
* 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>
* 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>
* 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
* 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)
* 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