Commit graph

12053 commits

Author SHA1 Message Date
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
Fernando Valverde
2ca01b0c9a
Minor margin added + different anchor in link (#18450) 2022-09-15 08:57:30 -06: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
Ridhwana
162ddb81e2
Fix the profile page of other users (#18443)
* fix: lonely div

* chore: whitespace
2022-09-13 17:12:31 +05:30
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
Rajat Talesra
01513bae69
Remove mode banner (#18441) 2022-09-12 22:20:13 +05:30
Joshua Wehner
2b24167fba
Try fixing comment like count bugs (#18438)
* Try fixing comment like count bugs

* Tests for the CommentCreator
2022-09-12 10:12:46 +02:00
thejwuscript
fea90d2e84
Fix inconsistent published date of Article and Comment (#18412)
* Revise system specs for viewing a comment

* Add system specs for viewing comment date

* Add conditional to SetTimeZone middleware

* Revise comment_date partial

* Refactor viewing a comment system specs

* Add more system specs for viewing a comment

* Fix format of comment date with short year

* Fix edited comment date

* Fix comment date when posting new comments
2022-09-09 14:12:15 -06:00
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
Joshua Wehner
892ad01264
Restrict Reactions API to admins (#18424)
* Restrict Reactions API to admins

* Also update API docs spec

* Removed unneeded pundit_user
2022-09-08 17:56:42 +02:00
depfu[bot]
154f154006
[ruby] Update all development Bundler dependencies (2022-09-05) (#18422)
Co-authored-by: depfu[bot] <23717796+depfu[bot]@users.noreply.github.com>
2022-09-08 11:48:07 -04:00
depfu[bot]
0daa3d230c
[ruby] Update octokit: 5.2.0 → 5.4.0 (minor) (#18426)
Co-authored-by: depfu[bot] <23717796+depfu[bot]@users.noreply.github.com>
2022-09-08 11:47:31 -04:00
depfu[bot]
ac9d4c5b7f
[ruby] Update strong_migrations: 1.2.0 → 1.3.0 (minor) (#18431)
Co-authored-by: depfu[bot] <23717796+depfu[bot]@users.noreply.github.com>
2022-09-08 11:46:58 -04:00
depfu[bot]
411d6146aa
[ruby] Update blazer: 2.6.4 → 2.6.5 (patch) (#18435)
Co-authored-by: depfu[bot] <23717796+depfu[bot]@users.noreply.github.com>
2022-09-08 11:46:42 -04:00
Mac Siri
a71f5bacb4
Add STATEMENT_TIMEOUT to .travis.yml (#18436) 2022-09-08 11:36:50 -04:00
Ridhwana
172dfef4bf
Add logged-in vs. logged-out targeting option for Display Ads #18390 (#18400)
* feat: add a migration that creates a display_to column on the display_ads table

* feat: add an enum for display_to

* feat/WIP: add rough draft of the field to the UI and permit it in the controller

* feat: take into account on whether an ad needs to be shown on logged in or out or both + update cache keys on sign in

* fix: if a user is not signed in then we want to display all and logged out

* fix: display_for spec in model

* feat: add some tests for display_to

* feat: style the label

* feat: show the display_to on the index page

* feat: add a seed for e2e

* chore: force true
2022-09-07 17:21:27 +02:00
depfu[bot]
d37834b0e1
Update sidekiq to version 6.5.6 (#18423)
Co-authored-by: depfu[bot] <23717796+depfu[bot]@users.noreply.github.com>
2022-09-06 15:16:40 -06:00
depfu[bot]
9a60bb847b
[ruby] Update recaptcha: 5.10.0 → 5.12.1 (minor) (#18417)
Co-authored-by: depfu[bot] <23717796+depfu[bot]@users.noreply.github.com>
2022-09-06 13:53:17 -04:00
Fernando Valverde
3ab05aafcc
Fix most propTypes in Onboarding components (#18416) 2022-09-06 10:02:10 -06:00
Mac Siri
2413ece281
Use remote_ip in Rack::Attack (2nd attempt) (#18409) 2022-09-06 10:06:29 -04:00
Fernando Valverde
1f6c53a20c
Update per_page_max in API endpoints + docs bump (#18415)
* Update per_page_max in API endpoints + docs bump

* Small tweak

* Fix spec typo
2022-09-02 14:07:19 -06:00
depfu[bot]
581a901c57
[ruby] Update flipper-active_support_cache_store: 0.25.1 → 0.25.2 (minor) (#18411)
Co-authored-by: depfu[bot] <23717796+depfu[bot]@users.noreply.github.com>
2022-09-02 14:57:54 -04:00
depfu[bot]
09d003de7e
[ruby] Update flipper-ui: 0.25.1 → 0.25.2 (minor) (#18413)
Co-authored-by: depfu[bot] <23717796+depfu[bot]@users.noreply.github.com>
2022-09-02 13:55:31 -04:00
Ridhwana
3d3e5156a3
Add "name" field to Display Ads (#18396)
* feat: create a migration to add the display ad name column to the tanle

* feat: add a display ad name to the interface

* feat: add a display ad name after create

* feat: whoops the migration file

* feat: add a DUS to update previous Display Ads names

* fix: test

* refactor: update the name after_save

* fix: add name to params
2022-09-02 16:29:33 +02:00
Andy George
fada329309
remove manual changes to autogenerated file (#18414) 2022-09-02 06:54:33 -05:00
depfu[bot]
9d839a06c3
Update flipper-active_record to version 0.25.2 (#18406)
Co-authored-by: depfu[bot] <23717796+depfu[bot]@users.noreply.github.com>
2022-09-01 13:31:45 -06:00
depfu[bot]
27d86b3e0d
[ruby] Update puma: 5.6.4 → 5.6.5 (patch) (#18404)
Co-authored-by: depfu[bot] <23717796+depfu[bot]@users.noreply.github.com>
2022-09-01 14:10:17 -05:00
depfu[bot]
2fb02764f1
[ruby] Update flipper: 0.25.1 → 0.25.2 (minor) (#18405)
Co-authored-by: depfu[bot] <23717796+depfu[bot]@users.noreply.github.com>
2022-09-01 14:08:53 -05: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
Nate Pelzel
e25a237ff0
Excluded gists from InstantClick (#18289) 2022-08-30 16:10:59 -05:00
depfu[bot]
8550ac3db1
[js] Update all Yarn dependencies (2022-08-29) (#18389)
Co-authored-by: depfu[bot] <23717796+depfu[bot]@users.noreply.github.com>
2022-08-30 15:06:27 -05:00
Andy George
be27fe74ab
Utilize ApplicationConfig["API_PER_PAGE_MAX"] (#18394)
* add ENV["API_PER_PAGE_LIMIT"]

* cast to int

* add private_constant PER_PAGE_MAX

* use 1000 int

* typo

* use reduced count for ListingsController

* typo

* set max/default in ArticleApiIndexService

* update initializer in ArticleApiIndexService

* Update app/controllers/concerns/api/articles_controller.rb

Co-authored-by: Fernando Valverde <fernando@visualcosita.com>

* Apply suggestions from code review

Co-authored-by: Fernando Valverde <fernando@visualcosita.com>

* update API docs

Co-authored-by: Fernando Valverde <fernando@visualcosita.com>
2022-08-30 13:46:39 -05:00
Julianna Tetreault
de4acd4fa5
Remove Community Emoji from Admin Config 🌱 (#16902)
* Removes all community_emoji-related code

* Removes community_emoji-related specs from codebase

* Updates communitySection.spec.js to test for member_label

* chore: merge conflicts

* feat: remove data update script

* chore: add file back

Co-authored-by: Ridhwana <ridhwana.khan16@gmail.com>
2022-08-30 17:16:58 +02: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
Anna Buianova
6ef1968377
Made published_at immutable after an article has been published once (#18384)
* Don't change published_at for articles that have already been published (even if unpublished later)

* Removed unused code related to changing published_at

* Added specs for updating published_from_feed articles, fixed specs

* Removed old validation

* Added specs for article validation published_from_feed

* Added and reorganized specs for the Article model (setting published_at)

* Remove the commented code, added a spec

* Added specs for unpublishing

* Removed unused update_published_at from article attributes spec

* Fixed nullifying published_at seconds when republishing from rich editor
2022-08-30 11:32:06 +03:00
Ridhwana
d0cac66353
Further refactoring of the Reactions Service (#18378) 2022-08-29 18:00:47 +02:00
Rajat Talesra
8fa4f8f7b0
Image uploading progress in comments editor + post editor (#18369)
* Image upload loading all cases covered

* Image upload failure added to EditorBody

* Created imageUploadHelpers file

* Minor changes

* Nit fixes

* Error fix

* Added documentation

* Added/Updated tests
2022-08-29 16:01:40 +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
Julianna Tetreault
806a5a774e
Backfill community_emoji data with a DUS 🌱 (#16896)
* Adds a DUS to backfill community_emoji for Forems that have one

* Adds a DUS spec to test backfilling community names

* update the script adn the tests to allow us to change the community name

* feat: add a stub for the community name

* feat: generate a later timestamp so that it doesnt cause confusion

* chcek if the emoji already appears in the community name

* feat: remove community emoji from displaying on the UI

* refactor:remove the else if completely

Co-authored-by: Ridhwana <ridhwana.khan16@gmail.com>
2022-08-26 16:12:46 +02: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
Ridhwana
69a08480a8
Refactor the Reactions Service (#18365)
* Extract reaction create from controller to service

* Success is having no errors

* Confirm http status successful

* rename var to be moreclear

* feat: existing reaction param

* refactor: reaction services

* fix: the mod actions need to be run irrespective of whether we have an existing reaction or not

* refactor: notifications and use the sink_articles

* refactor: rename destroy_previous_mod_reactions to be more accurately named

* chore: move methods further up

* refactor: returning destroy does not make sense

* chore: re-order some methods

* chore: remove comment

Co-authored-by: Joshua Wehner <joshua@forem.com>
2022-08-24 15:04:08 +02:00