Commit graph

1142 commits

Author SHA1 Message Date
Ben Halpern
f8df0e550c
New Digest field test (#20939) 2024-05-10 18:05:44 -04:00
Ben Halpern
55701f4303
Fix Twitter/X consistency (#20918)
* Fix Twitter/X consistency

* Adjust tests

* Adjust test regex
2024-05-03 12:24:06 -04:00
Ben Halpern
1cc59e08e0
Include cached user in select (#20913)
* Include cached user in select

* Add tags
2024-05-02 06:33:14 -04:00
Philip How
2129ae145b
Update style for new reply email (#20861)
* update style for new reply email

* Truncate and sanitize comment

* rubocop

* fix links, fix stop send when no content
2024-04-19 08:56:16 -04:00
Ben Halpern
9b15329110
Adjust digest rate if recent clicks tracked (#20838)
* Adjust digest rate if recent clicks tracked

* Fix issues

* Fix issues

* Fix issues

* Fiddle with tests

* Fix syntax

* Fiddle with tests

* Fiddle with tests

* Fiddle with tests

* Fiddle with tests

* Fiddle with tests

* Fiddle with tests

* Fiddle with tests

* Remove .env.test symlink (#20839)

* Update the mdx vscode extension (#20840)

* Update @cypress/code-coverage to version 3.12.30 (#20803)

Co-authored-by: depfu[bot] <23717796+depfu[bot]@users.noreply.github.com>
Co-authored-by: Mac Siri <mac@forem.com>

* Update ruby VSCode extensions for debugging (#20816)

The 'rebornix.Ruby' extension is deprecated. I replaced with the
'Shopify.ruby-lsp' extension since VSCode's Ruby docs pointed
users to ruby-lsp, see https://code.visualstudio.com/docs/languages/ruby.

* Update esbuild to version 0.19.12 (#20841)

Co-authored-by: depfu[bot] <23717796+depfu[bot]@users.noreply.github.com>

* Update eslint to version 8.57.0 (#20853)

Co-authored-by: depfu[bot] <23717796+depfu[bot]@users.noreply.github.com>

* fix: remove listings option from views/dashboards/_actions_mobile.html.erb (#20849)

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

* Update eslint-import-resolver-webpack to version 0.13.8 (#20854)

Co-authored-by: depfu[bot] <23717796+depfu[bot]@users.noreply.github.com>

* add timestamp to users roles table (#20844)

* Update eslint-plugin-import to version 2.29.1 (#20855)

Co-authored-by: depfu[bot] <23717796+depfu[bot]@users.noreply.github.com>

* Adjust tests to account for clicks

* Adjust tests to account for clicks

---------

Co-authored-by: Mac Siri <mac@forem.com>
Co-authored-by: Meredith <meredith.edwards1771@gmail.com>
Co-authored-by: depfu[bot] <23717796+depfu[bot]@users.noreply.github.com>
Co-authored-by: Gabriel Quaresma <j.quaresmasantos_98@hotmail.com>
Co-authored-by: Philip How <philip.j.how@gmail.com>
2024-04-10 10:39:15 -04:00
Ben Halpern
09705dab68
Declare winner in digest count test (#20810) 2024-03-28 14:41:55 -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
Anna Buianova
ed1b4045d3
Auto confirm flag reactions when spam role is assigned (#20797)
* Auto confirm flag reactions when spam role is assigned

* Renamed method according to its point

---------

Co-authored-by: Mac Siri <mac@forem.com>
2024-03-27 13:03:41 +00:00
Mac Siri
7988af1628
Update PageViewRollup (#20785)
* Make sure time is beginning of day

* Use correct initial time
2024-03-21 22:37:33 +00:00
Anna Buianova
1008f0af7d
Automatically resolve spam reports when the offending user is marked as spam (#20781)
* Start resolving spam reports automatically after assigning spam role

* Specs for resolving spam reports + async resolving
2024-03-21 17:31:43 +00:00
Ben Halpern
c3c8b5f9c4
Small efficiency adjustments (#20782) 2024-03-21 10:42:37 -04:00
Ben Halpern
c01964b03a
Ensure string in field test (#20777) 2024-03-19 17:44:57 -04:00
Ben Halpern
3b62ff1945
Finish Digest subject test and start count test (#20773)
* Finish Digest subject test and start count test

* Proper user

* Style tweak
2024-03-19 16:10:41 -04:00
Mac Siri
092ee4a425
Implement PageViewRollup (#20670)
* Refactor

* Create PageViewRollup WIP

* Create PageViewRollupWorker and specs

* Add spec WIP

* Write spec

* Refactor

* Add spec

* Prevent retry

* Update baseline date

* Improve specs

* Update ATTRIBUTES_

* Update spec again
2024-03-18 20:33:12 +00:00
Ben Halpern
0d4f7c7e19
Add new simple a/b test for Digest subject and adjust config and design details (#20754)
* Adjust Digest Email design and configuration

* Adjust some tests

* Update tests

* More adjustments to markup and tests

* More adjustments to markup and tests

* Digest email feature flag

* Test title variants
2024-03-11 13:02:19 -04:00
Kim Emmanuel
04fb62a6f5
ignore code blocks when checking markdown for XSS (#20641)
Code blocks are rendered as raw strings and therefore don´t need to be
checked for XSS. Checking them for XSS disallow users to write articles about
XSS in markdown, for example.

Co-authored-by: Mac Siri <mac@forem.com>
2024-03-07 21:03:39 +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
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
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
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
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
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
Anna Buianova
08d34d5d34
Don't show low scoring articles in timeframe feeds (#20525) 2024-01-15 14:14:32 +00:00
Ben Halpern
1c25171cc6
Do not vacate tags if parameter not passed via API (#20513) 2024-01-11 16:25:21 -05:00
Ben Halpern
04d4b2340d
Add downstream score effects from spam role (#20498)
* Add downstream score effects from spam role

* Move async score calc down low

* Add tests

* Add stub

* Fix typo

* No need for guard

* No need for guard
2024-01-08 16:25:28 +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
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
Philip How
dde1b10ba6
Add 24 weeks to Community Wellness streak (#20396)
* add 24 as week option

* Fix flaky spec

---------

Co-authored-by: Mac Siri <krairit.siri@gmail.com>
2023-11-28 21:50:04 +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
e7fc1bb0ce
Add article id and geolocation info to billboard events (#20329)
* Add article id and geolocation info to billboard events

* Confirm destroyed in rollup
2023-11-09 12:43:23 -05: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
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
a14a1e9e7a
Accept published_at in Article API (#20235) 2023-10-11 09:12:35 -04:00
Ben Halpern
044fe88230
Follow on adjustments to flag counts (#20207) 2023-10-02 17:23:37 +07:00
Ben Halpern
f811f17830
Fix irrelevant flag numbers (#20204)
* Fix irrelevent numbers in admin display

* Remove unused possible_spam_users_count

* Fix tab styles
2023-10-02 15:01:50 +07:00
Ben Halpern
8268a59ae5
Add feed event for extended page view (#20198) 2023-10-02 10:28:31 +07:00
Ben Halpern
c5201ca888
Remove dead code associated with old roles (#20175)
* Remove dead code associated with old roles

* Remove test references

* Removed from seeds

* Removed unused roles from locales

---------

Co-authored-by: lightalloy <lightallloy@gmail.com>
2023-10-01 09:33:25 +07: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
Joshua Wehner
6a48b486ca
Onboarding: custom newsletter opt-in settings (#20114)
* Settings can process markdown into html

* Update Settings with new onboarding settings

* Async render onboarding newsletter step

* Tweak onboarding design

* Fix broken spec

* Better rendered component test

* Tweaks to match design

* Try to tweak design

* Try having a default state

* Tweak placeholder content

* Better await componentDidMount

* Continue to tweak the design

* ContentRenderer#process should always return Result

* Try more clarity in the partial

* Rubocop
2023-09-26 06:34:19 -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