Ben Halpern
78f9bec3e7
Allow admin to declare whether to include the badge description in message ( #20684 )
...
* Allow admin to declare whether to include the badge description in badge achievement message
* Update spec/services/badges/award_spec.rb
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
* Add proper acceptance to tests
* Tweak tests
* Switch to kwargs
* Clean up test acceptance
* Change interface
* Update spec/requests/admin/badge_achievements_spec.rb
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
* Update app/services/badges/award.rb
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
* Adjust interface
---------
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2024-02-28 11:02:58 -05:00
Mac Siri
248f0f55c0
Allow Slack::Messengers to be disabled ( #20609 )
2024-02-09 17:20:35 +00:00
Philip How
e2035e0c4a
update first post badge name ( #20613 )
2024-02-09 12:20:14 -05:00
Ben Halpern
1b083f39a4
Ensure at least 0 score for new badge award ( #20605 )
2024-02-08 17:00:10 +00:00
Philip How
55f191a5ec
Automated First Post Badge ( #20600 )
...
* award first post logic, schedule, and tests
* award first post logic, schedule, and tests
2024-02-08 10:11:40 -05:00
Anna Buianova
b43cb38d40
Remove notifications related to spammer actions (after the role is assigned) ( #20593 )
2024-02-07 17:36:19 +00:00
Ben Halpern
e26b27c7fa
New a/b test for Feb 5 (and add a variable too a hardcoded value) ( #20588 )
...
* Fix AudienceSegmentRefreshAllWorker args issue
* New a/b test for Feb 5 (and add a variable too a hardcoded value)
2024-02-05 15:46:03 +00:00
Ben Halpern
ee29318126
Add a/b test for which comments to show in feed ( #20332 )
...
* Add a/b test for which comments to show in feed
* Adjust figure
* Started at
* Move scope placement around
* Add tests for different comments_variants passed
* Fix typo
2024-01-29 12:18:50 -05:00
Ben Halpern
aab0a19011
Allow configuration to conditionally prefer Cloudflare over Cloudinary ( #20539 )
...
* Allow configuration to conditionally prefer Cloudflare over Cloudinary
* Update app/services/images/optimizer.rb
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
* Fix some lints
---------
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2024-01-19 09:45:36 -05:00
Anna Buianova
08d34d5d34
Don't show low scoring articles in timeframe feeds ( #20525 )
2024-01-15 14:14:32 +00:00
Philip How
7d47ffef78
Remove calls to trigger round robin notifications ( #20506 )
...
* remove calls to trigger round robin notifications
* remove tests
2024-01-10 13:44:57 +00:00
Anna Buianova
473594f192
Match spam role with existing suspended actions ( #20477 )
...
* Started matching spam and suspended roles
* Match spam and suspended roles in most cases
* Fixed check_suspended for unauthenticated users
2023-12-27 20:12:50 +00:00
Anna Buianova
1eeaa34e98
Added spam role ( #20434 )
...
* Added spam role
* Fixed role spec
2023-12-11 14:27:22 +00:00
Anna Buianova
3093e0207a
Refactoring Badges::AwardThumbsUp ( #20360 )
...
* Optimized Badges::AwardThumbsUp
* Reorganized Badges::AwardThumbsUp spec
2023-11-16 15:10:21 +00:00
Philip How
779701d5f6
Automatically reward thumbs-up milestone badges ( #20338 )
...
* initial work on #20111
* initial work on #20111
* fix cron
* is this a good test
* add in initial check, fix test data
* Update spec
---------
Co-authored-by: Mac Siri <krairit.siri@gmail.com>
2023-11-14 16:47:24 +00:00
Ben Halpern
64fd4e7800
Adjust VariantQuery to dynamically account for recent last_comment_at ( #20323 )
...
* Adjust VariantQuery to dynamically account for recent last_comment_at
* Adjust test line which was temporarily adjusted
2023-11-07 08:22:22 -05:00
Anna Buianova
41ab84a25d
Remove feature flag and use consistent rendering by default ( #20305 )
2023-11-03 11:42:12 -04:00
Ben Halpern
587a11d490
Adjust image optimization for billboards ( #20309 )
...
* Adjust image optimization for billboards
* Fix test typo
* Adjust default
2023-11-02 16:12:20 -04:00
Gabriel Quaresma
593d95e7a8
Feat Make tag score minimum configurable by admins ( #20233 )
...
* feat: add Settings::UserExperience.award_tag_minimum_score
* test: write new specs
* test: write a new test case
2023-11-01 17:48:25 +03:00
Anna Buianova
20e242af0d
Rubocop fixes ( #20254 )
...
* Fixed redundant alls for rubocop
* Fixed rubocop violations in spec/requests
* Fixed rubocop violations in spec/models
* Fixed Performance/MapMethodChain
* Fixed rubocop violations in spec/requests
* Revert changes to FastlyConfig::Update spec
2023-10-18 17:24:28 -04:00
Ben Halpern
8268a59ae5
Add feed event for extended page view ( #20198 )
2023-10-02 10:28:31 +07:00
Ben Halpern
c71b2b182f
Change profile image max size to 8 MB ( #20183 )
...
* Change profile image max size to 8 MB
* Stub the const for the sake of the test
2023-09-28 17:05:35 -04:00
Ben Halpern
e998e5bcac
Do not show suspended followers in aggregated siblings for notification ( #20174 )
2023-09-27 20:23:25 -04:00
Joshua Wehner
2c138d86ef
Add or remove limited role via API ( #20136 )
...
* Refactor API user suspend, make room for more roles
* Handle adding limited
* Handle remove limited
* And swagger docs
* Update & refactor roles spec
* Remove old route
* Remove old specs
2023-09-26 09:57:14 -04:00
PJ
47deeefe57
Optionally limit new users based on admin setting ( #20149 )
...
* create admin setting for new user status
* limiting on signup working 🎉
* update registration specs
* sort out OAuth registrations
2023-09-26 10:46:36 +01:00
PJ
da73343540
Skip round robin mod notifications for limited users ( #20128 )
...
* return early if user is limited
* fix worker specs
2023-09-19 15:03:20 +01:00
Ben Halpern
cadebde66f
Add feed_success_score and other count tallies ( #20106 )
...
* Add initial feed events score
* Add feed events score
* Clean up code styles
* Adjust how tests are run
* Fix conflicts
* Update app/javascript/articles/Feed.jsx
* Add additional feed events tabulation queries for more reliable eventual consistency
* Add additional feed events tabulation queries for more reliable eventual consistency
* Fix test logic
* Updates from feedback
2023-09-15 12:02:26 -04:00
PJ
95ca9d37c5
Record feed events for public reactions ( #20079 )
...
* create feed event on feed reaction
* move feed event creation to feed event model
* tiny whoops
* fix failing specs
* slightly less flaky e2e spec (maybe)
* tiny fixes (couldn't resist)
2023-09-12 08:36:10 -04:00
Anna Buianova
aa5cb535fa
Add languages to User model ( #20059 )
2023-09-11 11:44:19 -04:00
PJ
3f7d1fbc1a
Create feed impression and click events ( #20043 )
...
* getting started: model setup
* basic controller action & spec
* somewhat working click events
* pick up on impressions
* there was an attempt at batching without duplicates
* (better) bulk upsert service
* fix specs?
* touch up feed events JS
* end-to-end specs??
* workers wip
* fix failing user delete spec
2023-09-11 13:32:36 +01:00
Ben Halpern
ed853f7e1e
Fix "register" bugs in invitations ( #20071 )
...
* Fix registered bugs in invitations
* Update spec/requests/api/v0/admin/users_spec.rb
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
* Move to v1 spec
---------
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-09-08 17:00:37 -04:00
Ben Halpern
02db638d9d
Remove cache headers from sidebars controller ( #20002 )
...
* Remove cache headers from sidebars controller
* Remove cache bust logic for sidebar
2023-08-29 13:42:10 -04:00
Joshua Wehner
d227e1d285
Suppressing articles negative-follow tags from appearing in the "relevant" feed ( #19948 )
...
* Try suppressing all negative-follow tags
* userData isn't always available
* Bolster test coverage for tag filter scenarios
* Antitags for the non-basic 'strategy'
* Rename antitags -> hidden_tags
* Rename 'anti_tags' -> 'hidden_tags' as well
* Use userData.followed_tags to derive hidden_tags
2023-08-28 10:11:20 -04:00
Rajat Talesra
5ef0f43636
Added limited role ( #19969 )
...
* Added limited role
* Nit fix
* Updated tetss
* Added spec tests
* Attempt at 100% code coverage
* Rollback DB migration
* Revert timestamp
2023-08-25 14:41:17 +05:30
Ben Halpern
98c92bcde2
Fix never_imagga for imgproxy ( #19997 )
2023-08-24 19:00:23 -04:00
Anna Buianova
fc034e41cd
Renamed display ads to billboards in tests descriptions ( #19973 )
2023-08-24 23:42:13 +03:00
Ben Halpern
1463d8c98a
Do not crop with imagga if never_imagga is passed ( #19975 )
...
* Do not crop with imagga if never_imagga is passed
* Clean up code styles
2023-08-22 11:52:02 -04:00
Ben Halpern
ec7adf56fe
Allow admins to set cover image height configs ( #19936 )
...
* Initial basic work
* Bulk of related work, including find/replace on the inputs
* Adjust some tests
* Adjust some specs
* Fix a few more tests
* Clean up tests
* Adjust tests
* Test fiddle
* Adjust crop back to be a param
* Update tests
* Set proper defaults
* Fix some styling
* Adjust enrichment logic and tests
* Adjust form JS
* Update test snapshot
* Clean up formatting
* Fix spec name
* Adjust some css and defaults
* Adjust translation for image provider options
* Switch from fill to fill-down
* Proper fallback image
* Fix tests
* Update app/services/images/optimizer.rb
Co-authored-by: Mac Siri <mac@forem.com>
---------
Co-authored-by: Mac Siri <mac@forem.com>
2023-08-21 13:25:16 -04:00
Joshua Wehner
c5731ac91a
FeatureFlag.enabled_for_user(_id) ( #19929 )
...
* FeatureFlag can work with user_id
* Use the new methods
* No thank you, rubocop
* Some tests would be nice
* Try to appease codecov
---------
Co-authored-by: Ben Halpern <bendhalpern@gmail.com>
2023-08-15 12:02:44 -04:00
Ben Halpern
33b11f1eac
Use direct relative path to access assets in minimagick ( #19933 )
...
* Use direct relative path to access assets in minimagick
* Skip Hairtrigger spec
* Add a test to get more coverage
2023-08-15 09:36:16 -04:00
Anna Buianova
9c9663a5b5
Renamed display_ads to billboards: variables and descriptions in tests ( #19920 )
...
* Renamed display ad variables and descriptions in tests
* Renamed api docs display_ads => billboards
* Updated billboard cypress seeds
* Fixed api billboards specs
* Update db/schema.rb
Co-authored-by: Duke Greene <dukegreene@gmail.com>
---------
Co-authored-by: Ben Halpern <bendhalpern@gmail.com>
Co-authored-by: Duke Greene <dukegreene@gmail.com>
2023-08-11 15:00:07 -04:00
Ben Halpern
c9af090af0
Prefer Minimagick for social image generation ( #19826 )
...
* Prefer Minimagick for social image generation
* Update app/services/images/generate_social_image_magickally.rb
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
* Update app/services/images/generate_social_image_magickally.rb
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
* Update app/services/images/generate_social_image_magickally.rb
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
* Reformat main file
* Fix user tests
* Finish up tests
* Update app/services/images/generate_social_image_magickally.rb
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
* Update app/services/images/generate_social_image_magickally.rb
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
* Update app/services/images/generate_social_image_magickally.rb
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
* Update app/services/images/generate_social_image_magickally.rb
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
* Update app/services/images/generate_social_image_magickally.rb
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
* Update app/services/images/generate_social_image_magickally.rb
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
* Change asset path syntax
* Update app/services/images/generate_social_image_magickally.rb
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
* Update app/services/images/generate_social_image_magickally.rb
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
* Update app/services/images/generate_social_image_magickally.rb
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
* Update app/services/images/generate_social_image_magickally.rb
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
* Refactor magickally file
* Update spec/services/images/generate_social_image_magickally_spec.rb
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
* Update spec/services/images/generate_social_image_magickally_spec.rb
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
* Fix style issues
* Remove pure black
* Test color swap
* Update spec/services/images/generate_social_image_magickally_spec.rb
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
* Update spec/services/images/generate_social_image_magickally_spec.rb
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
* Update spec/services/images/generate_social_image_magickally_spec.rb
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
* Update spec/services/images/generate_social_image_magickally_spec.rb
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
* Update spec/services/images/generate_social_image_magickally_spec.rb
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
* Update spec/services/images/generate_social_image_magickally_spec.rb
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
* Update spec/services/images/generate_social_image_magickally_spec.rb
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
* Add more test coverage to service
* Update spec/services/images/generate_social_image_magickally_spec.rb
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
* Fix doubled spec name
* Update spec/services/images/generate_social_image_magickally_spec.rb
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
* Update spec/services/images/generate_social_image_magickally_spec.rb
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
* Update spec/services/images/generate_social_image_magickally_spec.rb
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
* Update spec/services/images/generate_social_image_magickally_spec.rb
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
* Update spec/services/images/generate_social_image_magickally_spec.rb
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
* Update spec/services/images/generate_social_image_magickally_spec.rb
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
* Add upload spec
* Update spec/services/images/generate_social_image_magickally_spec.rb
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
* Update spec/services/images/generate_social_image_magickally_spec.rb
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
* Swap out magickally in social image worker
* Add test stub and rescue
* Update spec/rails_helper.rb
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
* Fix regex
* Add cache busting and error logging
* Update app/services/images/generate_social_image_magickally.rb
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
* Fix style issues
* Add more test coverage
* Add feature flag
---------
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-08-11 08:22:06 -04:00
Mac Siri
1c351bf22c
BanishUser also destroy organization ( #19911 )
2023-08-10 08:26:45 -04:00
Joshua Wehner
8bb007396c
Remove unused freezeScrolling ( #19808 )
...
* Remove unused freezeScrolling
* chore: try see if this helps to skip the flakey test that wasn't being skipped
* chore: try see if this helps to skip the flakey test that wasn't being skipped
* oops: revert the gemfile changes
---------
Co-authored-by: Mai Irie <mai@forem.com>
Co-authored-by: Mac Siri <mac@forem.com>
Co-authored-by: Ridhwana <ridhwana.khan16@gmail.com>
2023-08-03 18:47:15 +02:00
Anna Buianova
ffb560c2a7
Rename DisplayAdEvent to BillboardEvent ( #19833 )
2023-07-26 13:57:02 -04:00
Anna Buianova
3474911d25
Rubocop fixes in spec/services ( #19844 )
2023-07-26 10:33:37 -04:00
Anna Buianova
963eea8126
Aliased DisplayAdEvent.display_ad_id to billboard_id ( #19805 )
...
* Aliased DisplayAdEvent.display_ad_id to billboard_id
* Allow :display_ad_id instead of :billboard_id for billboard_events in case of cache
2023-07-24 17:54:39 +03:00
Anna Buianova
e659dbfc00
Renamed display_ad_events variables and associations ( #19788 )
...
* Renamed stuff related to display_ad_events (except the model)
* Updated user billboard_events association spec
* Fixed display_ad_event factory
2023-07-21 14:59:28 +03:00
Duke Greene
9a6f04bd37
api v1 endpoint for creating an organization ( #19778 )
...
* api v1 endpoint for creating an organization
* address failing specs, regenerate swagger docs
* remove old comment in destroy now that woreker call takes third argument
* refactor our services for profile images into images folder
2023-07-21 07:43:56 -04:00
Ben Halpern
8335a37315
Language detection with CLD3 ( #19756 )
...
* Language detection with CLD3 POC
* Update spec/models/article_spec.rb
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
* Update spec/models/article_spec.rb
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
* Update spec/models/article_spec.rb
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
* Update spec/models/article_spec.rb
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
* Update spec/models/article_spec.rb
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
* Update spec/models/article_spec.rb
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
* Update app/models/article.rb
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
* Clean up tests
* Clean up tests
* Move language detection to service
* rubocop
* Update app/services/languages/detection.rb
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
* More linting cleanup
* Remove allow_any_instance_of
* Update tests to better exercise different paths
* Fix flaky spec
* Update spec/services/languages/detection_spec.rb
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
* Update spec/models/article_spec.rb
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
* Update spec/models/article_spec.rb
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
* Update spec/models/article_spec.rb
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
* Update spec/models/article_spec.rb
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
* Update spec/services/languages/detection_spec.rb
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
* Update spec/services/languages/detection_spec.rb
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
* Update spec/services/languages/detection_spec.rb
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
* Update spec/services/languages/detection_spec.rb
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
---------
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-07-17 08:57:20 -04:00