* feat: remove updated weights
* feat: click on following on the following tags page
* feat: add and listen for the following button click
* fix: dropdowns
* feat: handle hide button click
* feat: update the nav link for following tags
* feat: handel the 'unhide button' on the hidden tags page
* feat: add the styling for the buttons
* feat: add localization
* feat: remove the brand from the card
* feat: add some styling to the page
* feat: init scrolling
* chore: update the name of the file
* feat: abstract out the comment fetch code
* fix: close the attribute
* feta: make some adjustments to where the tag adn the follow show up
* rename class from plural to singular
* feat: updae the comment
* feat: add a mutation observer to initialize the dropdown
* test: follow_craete
* chore: remove irrelevant test
* feat: update the cypress seeds
* feat: update the cypress seeds
* spec: write soem initial tests for the following tags page
* spec: update the unfollow cypress spec
* spec: update the hide cypress spec
* spec: update the posts published spec
* note to add test for pagination
* spec: hidden tags page
* feat: remove aria pressed attributes
* fix: ordering by explicit points gets the page params confused and returns the incorrect and not all results on pagination
* fix: use explicit points
* feat: remove the message at the top of the following and hidden tags page
* chore: remove comment and rather add it to the PR itself
* refactor: do all the actions on success
* feat: refactor the dashboard tag file
* refactor: only show the tagId and followId dataset attributes on the dashboard__tag__container
* feat: disconnect the observer
* chore: add some documentation
* feat: add fr localization
* chore: empty line
* fix: update the dashboardTags page to first declare the observer"
"
"
* fix: update the rails test
* Empty commit
* fix: because I added more tags, the dropdown was longre and covering the body of the editor hence it could not find the text, so I've escaped after selecting my tags
* Downcase `followable_type` to fix wrong follows creation bug
* Use `follow_button` helper
* Remove puts statement
* Revert use of follow_button helper
* Remove downcase of followable_type from helper
* Refactor switch case for better consistency
* Add e2e test for follow organization from article page functionality
* Split cypress `it` block into two
* Add additional test to following organizations from dashboard
* Remove downcasing of followable_type for decorated objects
* Fix failing follow back spec
* Force capitalize `followable_type` param
Co-authored-by: Mac Siri <krairit.siri@gmail.com>
* Update app/controllers/follows_controller.rb
Co-authored-by: Mac Siri <krairit.siri@gmail.com>
* manually delete cache key on unfollow
* add cypress test
* move deletecached into own service
* rename and tidy up
* Update cypress/integration/profileFlows/followUser.spec.js
Co-authored-by: Jacob Herrington <jacobherringtondeveloper@gmail.com>
Co-authored-by: Jacob Herrington <jacobherringtondeveloper@gmail.com>
* This change abstracts the DatadogStatsClient into a ForemStatsClient.
The purpose of this abstraction is to set the foundation for a subsequent PR that will allow one to use New Relic for recording Forem stats, instead of Datadog, if there is a New Relic configuration found.
This specific change creates an abstraction layer that can be built upon, without changing any actual default behavior. All specs still pass.
* Use delegate instead of explicit methods.
* Delegate instead of explicit methods.
* Fix the error.
* Refactor according to the suggestions in the comments.
* Ooops. Stats work better when all of the code is committed.
* Removing the alias of count to increment since that was done in error.
* Replace follows#update with follows#bulk_update
* Allow follows#bulk_update to receive multiple follows and remove follows#update
* Add FollowPolicy#bulk_update? and remove update?
* Combine save button into one in following_tag.html
* Rename follows_update_spec to follows_bulk_update_spec and update
* Update buildTagsHTML to conform to the view
* Allow scrolls down dashboard test to update multiple tag values
* Includes follower and followable in follows#bulk_update
* Mark and pass changed field.
* fix typo in html
* Update follows in transaction
* Extract js script to another file and update view
* Rename disableUnchangedButton.js to dashboardTagsDisableUnchangedButtons.js
* Rate limit daily user follows to 500 per day
Return an error in `POST /follows` JSON response when a user tries to follow more than 500 accounts in a single day.
Other Changes:
- Add a spec for follows#create.
* Turn daily account follow limit into an env var
* Avoid executing today follow count query when possible
user.following_users_count is a counter cache on how many users the person is already following, so if it's less than the limit we don't need to run the query and can just return it instead.
* Simplify today follow count query
Stop needlessly checking into the future, only check from the beginning of the day until now.
* Raise account follow limit error if followable_id count is over limit
Other changes:
- Always return JSON, the `respond_to` block from before was unnecessary since this endpoint always returns JSON.
- Rescue `DailyFollowAccountLimitReached` on the method and remove begin block, since the error can be raised from two places in the same method.
* Index created_at on users table
* Make adding created_at index on users table happen concurrently
* Rename DAILY_ACCOUNT_FOLLOW_LIMIT to RATE_LIMIT_FOLLOW_COUNT_DAILY
* Add RATE_LIMIT_FOLLOW_COUNT_DAILY to Envfile
* Move RATE_LIMIT_FOLLOW_COUNT_DAILY from env var to ApplicationConfig
* Allow users to follow podcasts
* Only display podcasts user follows
* Add main_color_hex to factory
* Fix podcast test and modify styles
* Fix tests
* Remove weird test
* Add point weights for tag follows
* Adjust num articles to initially show up on home page
* Fix schema.rb
* Adjust follow policy spec
* Adjust dashboard styling for follow points form
* Add basic Honeycomb initializers
* Add some basic instrumentation, capture basic IDs
* Correctly alphabetize Gemfile, embed env in dataset names
* Actually reorder Gemfile because I can read
* Add custom tracing instrumentation to RssReader
* Improve timing/tracing info in RssReader
* Even make sure Errors show up in trace if possible
* Make sure we capture this as Rails traffic
* Swap in dev/test Libhoney::Clients as appropriate
* Move context-snagging bits into lib/instrumentation.rb
* Merging Gemfile lines seems to be my Achilles heel
* Move follow and reaction aggregation into Notification model to avoid re-compute
* Ugh. Fixing schema
* Update tests
* Skip some tests in notifications_spec
* Add new columns to notifications table
* Remove stream from notifications and add new methods
* Turn off moderation comment notifications
* Add notifiable_type index to migration
* Stop creation of Stream-based notification model instances
* Add notification model create hooks
* Add badge achievement notification creation hook
* Fix some specs
* Add missing @ symbol
* Fix for tests and rename a few things
* forgot to uncomment code sigh
* Add comment for public controllers
* Add block policy and specs
* Add policy for authorizing dashboard
* Add follow policy and specs
* Refactor a tiny bit
* Prevent banned users from following anything
* Add a note for email sub controller about auth
* Add image upload policies
* Add policy for github repos
* Fix typo and use correct github repo variable
* Fix image uploader and use regular params
* Add authenticate_user before action back in
* Rename test
* Update slack bot message formatting and fix reported URL
* Remove email blank onboarding redirect
* Add authorization specs for video upload
* Add registration spec
* Remove skip before actions for signup complete
* Use new param for abuse reports
* Remove else because it never runs
* Add more dashboard request specs
* Use let with no bang in case there are errors