Commit graph

2058 commits

Author SHA1 Message Date
Philip How
3ceb9a178a
Allow some badges to be awarded multiple times (#20876)
* Add migration, update badgeachievements model and admin view to set flag on badges

* Show multiple badges on profile

* update factory

* badge model validation

* safe navigation to badge?

* add null: false to migratrion
2024-04-23 16:33:43 -04:00
Philip How
0d873a4554
Show "Resend Confirmation email" option on users profile when email not confirmed (#20831)
* Show reconfirmation option on users profile

* spec
2024-04-03 09:53:53 -04:00
Philip How
a0b68a6956
Ensure article score recalculation for all vomit status changes (#20813) 2024-04-02 08:17:54 -04:00
Ben Halpern
b6fa936e36
Customize ahoy email to track clicks async without redirect (#20809)
* Initial controller creation

* Ahoy custom clicks initial WIP

* Add test for success and failure

* Adjust some tests

* Adjust test

* Adjust tests and some code

* Update app/views/mailers/digest_mailer/digest_email.html.erb

* Remove s/t/u from safe params

* Add simple test

* Update app/controllers/ahoy/custom_email_clicks_controller.rb

Co-authored-by: Mac Siri <mac@forem.com>

* Change to just email clicks

* Email clicks controller test

---------

Co-authored-by: Mac Siri <mac@forem.com>
2024-04-01 15:05:04 -04:00
Anna Buianova
51316c747f
Comments count according to display rules in feed (#20753)
* Move calculating comments score from worker to a service

* Display displayed comments count in feed

* Recalculating displayed comments counts on article show (if needed)

* Rubocop fixes

* Fixed lambda
2024-03-28 12:12:05 +00:00
Philip How
f6161780d9
Add test to mark profile as spam (#20800)
* add test to mark profile as spam

* rubocop

* move test
2024-03-27 17:30:32 +00:00
Philip How
b0086c9171
Add mark as spam button on user profile for admins (#20794) 2024-03-25 10:30:16 -04:00
Philip How
6b8c363487
Prioritize spam label over suspended, add to async profile check (#20790)
* Prioritize spam label over suspended, add to async profile check

* fix jest
2024-03-25 10:15:35 -04:00
Anna Buianova
7d5650c3f1
Admin access to spam comments by url (#20775)
* Admin access to spam comments by url

* Fixed spec

* Fixed view spec
2024-03-22 08:40:36 -04:00
Ben Halpern
c3c8b5f9c4
Small efficiency adjustments (#20782) 2024-03-21 10:42:37 -04:00
Ben Halpern
a30b86a025
Allow billboards to target specific pages with "fixed bottom" placement (#20748)
* Add page fixed bottom billboard

* Add page fixed bottom billboard

* Fix schema
2024-03-15 14:32:30 -04:00
Anna Buianova
53f311b059
Add tag moderators by username w/o autocomplete (#20767) 2024-03-15 14:15:51 -04:00
Philip How
57c0078bd6
Allow admins to change reputation modifier (#20766)
* Allow admins to change reputation modifier

* locale + rubocop
2024-03-15 10:46:19 -04:00
Anna Buianova
f572275c9d
Admin access for spammers profiles and articles (#20721)
* Allow admins to visit spammers profiles and articles pages

* Added spam label to user profile and articles

* Unset cache control headers when providing admin access to spam content

* Removed unused comment
2024-03-12 13:25:59 -04:00
Ben Halpern
f2968baadb
Add optional client-side dismissal SKU for closable billboards (#20716)
* Add optional client-side dismissal SKU for closable billboards

* Safe nav
2024-03-01 16:13:19 -05:00
Anna Buianova
288c9ed31f
Fix articles counts based on display rules (#20669)
* Comment counts for signed in users

* Adjust comments count for articles

* Fixed counts for signed out users, added specs for Comments::Count

* Fixed counts for signed out and added specs for Comments::Count

* Removed debug info from the view

* Removed separate count for signed out users

* Remove irrelevant specs

* Remove unused scope
2024-03-01 07:54:15 -05:00
Philip How
fe213a81fa
Add Following Tags and Reconfigure Sidebar in Mod Center (#20694)
* reconfigure mod left sidebar, adding following tags

* add localization
2024-03-01 07:35:54 -05:00
Anna Buianova
f8418a6415
Exclude articles from spammers and suspended users from /mod (#20692) 2024-02-28 17:36:56 +00:00
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
Ben Halpern
4015b346e2
Finalize 'commnts to display' a/b test (#20679) 2024-02-26 11:06:17 -05:00
Ben Halpern
f88784cc35
Add configuration for admins to specify compliant email strategies (#20663)
* Add configuration for admins to specify compliant email strategies

* Add keys for test
2024-02-21 08:27:26 -08:00
Ben Halpern
223fb9cbfb
Add a/b test for feed style on new users (#20664)
* Add a/b test for feed style on new users

* Add current_user check

* Adjust to not look for current_user right away

* Move field test to the right place
2024-02-20 15:43:28 -08:00
Ben Halpern
561bdb278c
Change value of signup in success score (#20647) 2024-02-18 10:30:59 -08:00
Ben Halpern
8eb41eef8e
Record billboard signup conversions (#20629)
* Record billboard signup conversions

* Update app/models/billboard_event.rb

* Modify click tracking
2024-02-14 14:18:57 -05:00
Ben Halpern
205aee8c78
Add billboard for bottom of page with allowance to delay until after reading is finished. (#20616)
* Add delayed behavior

* Add special behavior to billboards

* Fix order for test

* Test clicking outside element when close event is present

* Update app/javascript/packs/billboardAfterRenderActions.js
2024-02-13 11:56:32 -05:00
Ben Halpern
9ba5a5fab0
Add client geo to helper method (#20608) 2024-02-08 12:51:37 -05:00
Ben Halpern
2f9769a89d
Add new sidebar billboard locations and remove legacy campaign area (#20562)
* Add new sidebar billboard locations

* Remove some specs

* Remove campaign tests

* Adjust tag-allowed billboards

* Fix up targeting functionality

* Fix sidebar third render
2024-02-08 16:55:48 +00:00
Anna Buianova
07ffb2e3be
Removed spammers from followers list (#20603)
* Remove spam and suspended users from followers list (api and dashboards)

* Fixed the api followers endpoint

* Fixed issue with follower_ids query
2024-02-08 13:57:15 +00:00
Ben Halpern
2d9c87d9d3
Add ability to view specific billboard via params in any context if it is live (#20599)
* Fix AudienceSegmentRefreshAllWorker args issue

* Add ability to view specific billboard via params if it is live

* Fix lingering

* Refactor to clean up
2024-02-07 15:11:22 -05:00
Anna Buianova
7125a62db0
Changed logic for hiding and displaying low-quality marker for comments based on their score (#20581)
* Specs for revised comments thresholds

* Changed thresholds for low quality comments

* Added specs for comments page

* Fixed /comments and related specs

* Reorganized code for comments trees

* Specs for podcasts episodes comments

* Refactored Comments::Tree

* Refactored Comments::Tree + added specs

* Made build_sort_query private
2024-02-05 09:27:24 -05: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
Anna Buianova
58bd07d729
Render 404 when root comment has low score and no children (#20560) 2024-01-26 17:21:18 +00:00
Anna Buianova
a4d9b4f0d1
Hide low score comments on user profile (#20556) 2024-01-25 16:06:50 +00:00
Ben Halpern
b763ba8544
Allow pages to have subdirectories (#20549)
* Allow pages to have subdirectories

* Add locale text
2024-01-24 16:09:29 -05:00
Philip How
7149558f34
order flags by users, then comments, then articles (#20462)
Co-authored-by: Anna Buianova <lightallloy@gmail.com>
2024-01-24 10:07:28 -05:00
Philip How
d615fcef56
Add new members filter to mod center (#20542)
* fix jest

* Update safe_params_list.vcl

---------

Co-authored-by: Ben Halpern <bendhalpern@gmail.com>
2024-01-23 16:07:45 -05:00
Ben Halpern
d86689f63d
Allow pages to render .txt requests (#20547)
* Allow pages to render .txt requests

* Adjust routes
2024-01-22 11:12:22 -05:00
Anna Buianova
947aaef7c1
Return 404 if user is a spammer (#20546) 2024-01-22 15:20:42 +00:00
Philip How
fb855c97bd
Update badge awarding language (#20516)
* update badge language files

* update admin controller

* fix tests

* no actually fix the tests

* remove 'community' from notification

* fix spec

* fix interpolations
2024-01-17 09:26:19 -05:00
Ben Halpern
5c2723a04e
Update safe params and billboard cache config (#20530) 2024-01-16 12:13:29 -05:00
Anna Buianova
08d34d5d34
Don't show low scoring articles in timeframe feeds (#20525) 2024-01-15 14:14:32 +00:00
Anna Buianova
9c7476db62
Make articles from a user with spam role inaccessible (direct access) (#20515)
* Make articles inaccessible if their author has spam role

* Improve specs a bit for showing spammer articles
2024-01-12 15:36:44 +00:00
Philip How
33fd9836be
Add CSS as pages template option (#20512)
* add css as pages option

* don't forget schema

* fix test

* add api support
2024-01-12 15:35:38 +00:00
Ben Halpern
108d753d68
Add articles clickbait_score as factor in final feed ordering (#20493)
* Add articles clickbait_score

* Add attributes

* Fix field test config
2024-01-05 09:37:53 -05:00
Ben Halpern
e376e2b887
Add cookie requirement option for billboards (#20486)
* Add cookie requirement for billboards

* Clean up tests

* Fix up tests

* Adjust tests

* Adjust tests
2024-01-03 16:33:08 +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
Philip How
8928d86982
Order same reactables together in the list (#20461) 2023-12-19 13:34:21 +00:00
Ben Halpern
f0673648c2
Add preferred_article_ids to billboards (#20437)
* Add preferred_article_ids to billboards

* Adjust query

* Refactor method

* Refactor method

* Fix input type

* Add feature flag
2023-12-18 19:20:56 +00:00
Philip How
78b42c5efd
Add trusted role via API (#20455)
* rubocop

* use has_trusted_role? in tests, not trusted? due to pesky caching issues

* swagger
2023-12-18 18:38:05 +00:00
Philip How
199a88a254
fix notes typo + correctly add event listener to correct buttons (#20459) 2023-12-18 15:07:30 +00:00