Commit graph

1483 commits

Author SHA1 Message Date
Ben Halpern
f72f6bb1c7
Feed experiment for 10-31-2022 (#18670) 2022-11-02 09:00:59 -04:00
Rajat Talesra
f458823523
Badges design fixes as suggested by Anuj (#18667)
* Main page design changes

* Changed modal to use own close icon

* Badge main page all designs done

* Design changes

* Badges design fixes

* Nit fix
2022-11-02 16:37:38 +05:30
Joshua Wehner
3f26694976
Refactor reaction categories as abstract class collection (#18540)
* Try a ReactionCategory abstract 'model'

* Use ReactionCategory

* Lookup category, pre-reaction

* Lookup category > constant

* Category can sometimes be nil?

* Try something friendlier for code reloading

* Refactor: extract point calculation out of Reaction

* Reaction Category can have color

* Rename reaction points service to follow convention

* method signature changed as well, calculate -> call

* Fix typo, leading comment, and rename data structures for clarity
2022-11-01 10:50:37 +01:00
Ben Halpern
d66dbe5e72
Feed experiment for 10-25-2022 (#18628)
* Feed experiment for 10-25-2022

* Add winner to field_test config
2022-10-25 16:16:28 -04:00
Fernando Valverde
2517a4dac9
Remove rack attack throttle for admin users in API requests (#18612)
* remove rack attack throttle for admin users

* Add tests

* Optimize cache admin secrets for 24h with invalidation when needed

* Make ApiSecret callback only execute on create
2022-10-25 09:26:38 -06:00
Rajat Talesra
926d9f2125
Show org stats on organisation page (#18618)
* Add org details

* Added org stat test

* Nit fix
2022-10-25 20:27:54 +05:30
Anna Buianova
f7a93aabbb
Remove html variants tracking (#18594)
* Removed code related to tracking html_variants

* Remove code related to HtmlVariant#find_for_test

* Remove spec for HtmlVariant#success_rate
2022-10-21 14:57:20 +03:00
Fernando Valverde
d14d882b13
Make reason for adjustment optional in moderator tag adjustment (#18606)
* Makes reason for adjustment optional for mod tag adjustments

* Makes reason for adjustment in notification conditional on adjustment reason

* Fix cypress element lookup by placeholder text
2022-10-20 09:54:52 -06:00
Ben Halpern
950a090c22
Feed experiment for 10-18-2022 (#18600) 2022-10-19 10:43:52 -04:00
Joshua Wehner
1fcafbbd41
Rollup service to compact DisplayAdEvent records (#18508)
* Restore DisplayAdEvents.counts_for

* Try a rollup service for DisplayAdEvent

* Schedule daily rollup worker for one month prior

* Refactor aggregator

* More testing for rollup

* Add test for rollup attribute fidelity

* DisplayAd success_rate based on counts_for
2022-10-19 16:21:47 +02:00
yheuhtozr
2ccc577b79
Fix recent missing or unsynchronized i18n (#18563)
* add missing i18n

* replace old keys

* new badges UI update

* comment sort options missing i18n

* one fr key forgot to rename
2022-10-18 11:39:59 -06:00
Fernando Valverde
9ab6edb0b8
Opt in settings for Ahoy Tracking (#18575)
* Opt in settings for Ahoy Tracking

* Typo tweak
2022-10-17 10:11:27 -06:00
Ben Halpern
ef63738454
Feed experiment for 10-11-2022 (#18566) 2022-10-11 08:56:49 -06:00
Joshua Wehner
201f4d998a
Try hiding low-quality comments (#18513)
* Try hiding low-quality comments

* Message indicating when negative comments are being hidden

* Adjust comment show count for logged-out visitors

* Remove unusued comments_to_show_count from article decorator

* Remove unusued comments_to_show_count from podcast episode decorator

* Add test for hidden negative comment

* Update spec/system/articles/user_visits_an_article_spec.rb

Co-authored-by: Fernando Valverde <fernando@fdo.cr>

* Don't create twice; do test logged-in and -out

* Comment caching needs to account for signed-in status

Co-authored-by: Fernando Valverde <fernando@fdo.cr>
2022-10-11 14:15:40 +02:00
Joshua Wehner
f97b5de96e
Remove social_preview views (except articles) (#18523)
* Remove social_preview views (except articles)

* Remove unreachable controller actions
2022-10-11 12:28:55 +02:00
Ben Halpern
f70bc2b0b8
Add internal tool to preview feed configs (#18544)
* Add internal tool to preview feed configs

* Update app/services/articles/feeds/variant_query.rb
2022-10-06 07:48:44 -04:00
Ben Halpern
42efb86dca
Feed experiment for 10-04-2022 (#18533) 2022-10-05 06:41:51 -04:00
Ridhwana
36f5d168d8
✂️✂️✂️ Part 2: Remove Sponsorship (#18522)
* feat: remove initializeSponsorshipVisibility and related code

* feat: remove sponsorships from sidebar

* feat: remove sponsorships from the admin - route, controller, view, spec

* feat: remove the admin menu item

* feat: remove the i8n for admin sponsors controller

* feat: sponsorship decorator was not being used anywhere

* feat: sponsorship slack messenger was not being used anywhere

* feat: remove the sponsorship_headline that gets configures on the admin

* feat: remove the /sponsors page

* feat: remove renedring of single_sponsor partial and associated partials

* feat: remove the navigation link rake task for sponsors

* feat: remove sponsorship from tags

* feat: remove i8n constants used

* remove sponsor references in text to the privacy page

* feat: remove the sponsorship detail from the organization page

* feat: remove the sponsors css that was used for app/views/pages/sponsors.html.erb

* feat: remove the sponsorship i8n that was used in the slack messengers

* feat: swap out the decorators to use Article as an example

* feat: remove spec to show sponsors on home page

* feat: update the specs to use Article Decorator instead of the Sponsorship Decorator

* fix: use direct and not all

* fix: remove tests for tag sponsorship

* fix: remove organization sponsorship test

* feat: remove more i8n

* remove unused css from app/views/organizations/_sidebar_additional.html.erb

* feat: remove sponsorship relationship from tag and organization

* remove seed

* feat: remove all Sponsor related specs

* feat: remove model, associated i8n and specs

* feat: remove sponsor from navbar

* feat: add a guard clause if we're unable to constantinize the purchase_type

* feat; remove sponsorship related tests

* feat: remove sponsorship relationship

* feat: remov especs related to sponsorship

* feat: remove tag sponsorship validation

* feat: remove the sponsorship factory
2022-10-04 19:02:44 +02:00
Ridhwana
9361d2426f
✂️✂️✂️ Part 1: Remove Sponsorship (#18512)
* feat: remove initializeSponsorshipVisibility and related code

* feat: remove sponsorships from sidebar

* feat: remove sponsorships from the admin - route, controller, view, spec

* feat: remove the admin menu item

* feat: remove the i8n for admin sponsors controller

* feat: sponsorship decorator was not being used anywhere

* feat: sponsorship slack messenger was not being used anywhere

* feat: remove the sponsorship_headline that gets configures on the admin

* feat: remove the /sponsors page

* feat: remove renedring of single_sponsor partial and associated partials

* feat: remove the navigation link rake task for sponsors

* feat: remove sponsorship from tags

* feat: remove i8n constants used

* remove sponsor references in text to the privacy page

* feat: remove the sponsorship detail from the organization page

* feat: remove the sponsors css that was used for app/views/pages/sponsors.html.erb

* feat: remove the sponsorship i8n that was used in the slack messengers

* feat: swap out the decorators to use Article as an example

* feat: remove spec to show sponsors on home page

* feat: update the specs to use Article Decorator instead of the Sponsorship Decorator

* fix: use direct and not all

* fix: remove tests for tag sponsorship

* fix: remove organization sponsorship test

* feat: remove more i8n
2022-10-03 16:26:32 +02:00
Ben Halpern
cd5c86c760
Feed experiment for 09-26-2022 (#18501)
* Feed experiment for 09-26-2022

* Fix variant

* Add proper tests
2022-09-27 08:48:15 -06:00
Josh Puetz
519632cffb
Jump to comments button (#18457)
Co-authored-by: Fernando Valverde <fernando@visualcosita.com>
2022-09-22 08:58:20 -05:00
Ben Halpern
828d568443
Feed experiment for 09-20-2022 (#18475)
* Feed experiment for 09-20-2022

* Fix yaml indentation

* Fix typo in config
2022-09-21 12:19:38 -04:00
Josh Puetz
55c716da6e
Feed experiment for 09-15-2022 (#18463) 2022-09-16 11:27:42 -05:00
Anna Buianova
455399bdba
Rubocop fixes (#18461)
* Rubocop fixes

* Fixed most Capybara/SpecificMatcher violations

* Moved flash notice texts to locales
2022-09-16 15:25:48 +03:00
VISHAL DEEPAK
b84fa1da08
Sort comments reopen (#18349)
* Sort comments in articles page

* Clickable area in sort comments article is now more approriate

* Comments subtitle is now responsive in articles page

* Consider comments sort order for cache in articles page

* On selecting sort option the refreshed page lands to comments section
2022-09-13 11:37:48 -06:00
Rajat Talesra
5559067e34
Revert "Revert "Entire profile badge redesign" & "Badges page redesign" (#18446)" (#18447)
This reverts commit d7f70eb85b.
2022-09-13 22:06:37 +05:30
Rajat Talesra
d7f70eb85b
Revert "Entire profile badge redesign" & "Badges page redesign" (#18446)
Co-authored-by: Mac Siri <krairit.siri@gmail.com>
2022-09-13 11:39:46 -04:00
Rajat Talesra
f1176900f0
Badges page redesign (#18419)
* Badges homepage redesign

* badges.scss

* Attempt at solving badge ci check

* Added badge prompt

* Merged with main

* Removed /badge/.. related code

* Revert removing badge page

* Fixed Safari design issue

* Removed not-requried css property

* Trying to remove /badge/

* Updated profile badges

* Fixed userprofile badge

* Accessibility changes + removed failed tests

* Tests passed
2022-09-13 03:07:59 +05:30
Mac Siri
0e43c915d9
Silence parser warnings (#18429) 2022-09-09 11:28:43 -04:00
Josh Puetz
abbb4d2015
Feed experiment for 09-07-2022 (#18437) 2022-09-09 08:17:00 -05:00
Mac Siri
2413ece281
Use remote_ip in Rack::Attack (2nd attempt) (#18409) 2022-09-06 10:06:29 -04:00
Mac Siri
0ea60867d4
Revert all Rack::Attack changes (#18407) 2022-08-31 18:11:56 -04:00
Mac Siri
05f0e72c24
Simplify Rack::Attack (#18403) 2022-08-31 16:58:34 -04:00
Mac Siri
560bff9403
Move rack_attack.rb (#18402) 2022-08-31 14:28:26 -04:00
Mac Siri
9c0fc6b918
Use remote_ip in Rack::Attack (#18397) 2022-08-31 10:50:26 -04:00
Josh Puetz
9ac1d11960
Feed experiment for week of Aug 29, 2022 (#18395) 2022-08-31 09:28:27 -05:00
Joshua Wehner
2ff67bda24
Try an idempotentish reaction create API (#18377)
* Try an idempotentish reaction create API

* Add tests for create API endpoint

* Try -> ReactionHandler

* Fix existing tests first

* Tests for .toggle; fix broken handle_existing

* Use the Handler

* Tweak http status for reaction create

* Use the category reader

Co-authored-by: Ridhwana <Ridhwana.Khan16@gmail.com>

Co-authored-by: Ridhwana <Ridhwana.Khan16@gmail.com>
2022-08-30 16:43:18 +02:00
Rajat Talesra
f482e60581
Removed unused brand color field from Profile (#18370)
* Minimal changes for removing brand-color-2

* Removed brand color 2 only for profile

* Updated test
2022-08-30 16:48:48 +05:30
Josh Puetz
6bb523f480
Feed experiment for 08-23-2022 (#18371) 2022-08-26 10:30:01 -05:00
Ridhwana
7f25a25fe1
Update the error message when a user with role "comment_suspended" tries to comment (#18367) 2022-08-26 10:23:52 -05:00
Joshua Wehner
b6efce21fe
API for Reactions: Create endpoint (#18355)
* Extract reaction create from controller to service

* Success is having no errors

* Confirm http status successful

* V1 API endpoint for Create Reaction

* Actually reset cache count

* Tweak JSON response

* Reaction create -> toggle

* Try rswagger docs for reaction toggle
2022-08-24 17:02:34 +02:00
Fernando Valverde
808149a424
Remove api_v1 feature flag (#18213) 2022-08-23 16:00:08 -04:00
Dmitrii Faiazov
c642cadfc9
Сleared up the message when a comment is hidden (#18199)
* Fix message understanding when a comment is hidden and add i18n

* Fix naming
2022-08-15 10:53:20 -06:00
Suzanne Aitchison
fd690982cf
Hide like text if no likes on comment (#18322)
* set label to empty if no likes

* update spec

* fix styling issues when text is removed

* fix missed test text
2022-08-12 15:19:53 +01:00
Joshua Wehner
cf11b020e5
Feed experiment for 2022-08-01 (#18269)
Co-authored-by: Josh Puetz <hi@joshpuetz.com>
2022-08-04 11:06:58 -04:00
Jhonatan Hidalgo
d4b71dd89b
Change all tooltip texts on heart/like reactions to like (#18135)
* Change all tooltip text on heart/like reactions icons

All texts of like reactions were changed to 'Like' instead of 'Heart' as well as the style used to display these tooltips.

Some tooltip styles have been changed to maintain consistency in the style between new 'Like' reaction tooltip style

* Add button accessible name

* Append new Like tooltip hasn't been added

Append the missing tooltips and refactored the code. The related E2E test has been updated

* Remove unnecessary tooltips

the new non-required tooltips that were aggregated were deleted

* Fix error code

* Refactoring code

* Adjust hover media queries
2022-08-03 12:44:36 +01:00
Jhonatan Hidalgo
998d39cd4c
Focus comment box when entering by "comments" button from home feed (#18132) 2022-07-28 14:17:46 -05:00
Arit Developer
450af1cd45
Redeploying the Flag/Unflag User functionality (#18235)
* building again

* still building

* still building

* stuck

* Suzanne Holmes on the case

* make report content a button not a link

* revert to link

* add tests

* revert changes made trying to get ModCenter to work

* hide nonworking actions_panel btns in Mod Center

* nudge Travis

* incorporate PR comments

Co-authored-by: Suzanne Aitchison <suzanne@forem.com>
2022-07-28 09:03:37 -04:00
Arit Developer
3fa350c7f2
Revert "Relocate and Refactor "Flag User" Action (#18182)" (#18232)
This reverts commit 8f544ab6ed.
2022-07-27 12:10:22 -04:00
Arit Developer
8f544ab6ed
Relocate and Refactor "Flag User" Action (#18182)
* building again

* still building

* still building

* stuck

* Suzanne Holmes on the case

* make report content a button not a link

* revert to link

* add tests

* revert changes made trying to get ModCenter to work

* hide nonworking actions_panel btns in Mod Center

* nudge Travis

* incorporate PR comments

Co-authored-by: Suzanne Aitchison <suzanne@forem.com>
2022-07-27 10:47:17 -04:00