Commit graph

3470 commits

Author SHA1 Message Date
Fernando Valverde
b2444d032d
/organizations api docs (#19055)
* /organizations api docs

* Remove Listings support
2023-02-03 15:12:03 -06:00
Fernando Valverde
c6419d7300
/tags api docs (#19048)
* /tags api docs

* Merge main
2023-02-03 14:11:38 -06:00
Fernando Valverde
bb7e193b3e
/videos api docs (#19049)
* /videos api docs

* Merge main
2023-02-03 10:22:57 -06:00
Fernando Valverde
13288c5626
API V1 Users docs (#19046)
* /users/me api docs

* Updated api_v1.json

* Missing users api docs
2023-02-03 05:43:48 -06:00
Joshua Wehner
fd7021b001
Pages API: create, update, and delete (#19009)
* Pages API pt 1 (read/get/index+show)

* Update spec/requests/api/v1/docs/pages_spec.rb

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

* Update spec/requests/api/v1/docs/pages_spec.rb

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

* API Key not required for index & show

* API Feature flag has long since been removed

* Page schema

* Fix spec broken by merge

* Temporary bugfix: slug uniqueness not working for Page

* Pages API endpoints for create, update, and destroy

* Fix swagger error

---------

Co-authored-by: Ridhwana <Ridhwana.Khan16@gmail.com>
2023-02-02 17:24:11 +01:00
Ridhwana
686976ced8
Round Robin Notifications Refactor (#19026)
* chore: rubocop

* feat: rename the worker in accordance to our guidelines and to be more verbose

* refactor: move the NotificationsModeration service to be a users query, and move the constants out to new files

* refactor: removed subscribed_to_mod_roundrobin_notifications? which was only being used once in a test

* refactor: remove the aliass from the user method and add them to notification_setting + update references
2023-02-01 15:21:36 +02:00
Mac Siri
59f6118e92
Update Users::ProfileImageGenerator (#19040)
* Update Users::ProfileImageGenerator

* Update other spec
2023-02-01 06:12:26 -05:00
Mac Siri
b77c1ea2e6
Change rake spec setup (#19012) 2023-01-30 10:51:38 -05:00
Ridhwana
2da1b45c32
Move a portion of the Display Ads tests alongside the query (#19017)
* Remove jQuery

* Added jquery back to videos

* Removed jquery code

* Nit fix

* Revert incorrect code

* Updated jquery code to javascript

* Removed jquery from comments

* refactor: move the spec to test the query

---------

Co-authored-by: rt4914 <rajattalesra4914@gmail.com>
Co-authored-by: Rajat Talesra <rajat@forem.com>
2023-01-30 10:57:34 +02:00
Mac Siri
8e76bc046b
Refactor CreatorSettingsForm & spec (#19011) 2023-01-27 08:39:07 -05:00
Joshua Wehner
909fd7f103
Try having sync_reactions_count as a background job (#18991)
* Try having sync_reactable as a background job

* Update test

* Fix flakey test (order should not matter)
2023-01-27 12:58:13 +01:00
Ridhwana
9ba3df4453
Round Robin Notification Tweaks (#18995)
* Remove jQuery

* Added jquery back to videos

* feat: increase the available moderator count

* Removed jquery code

* Nit fix

* Revert incorrect code

* Updated jquery code to javascript

* Removed jquery from comments

* feat: updates the last_reacted_at value when saving a creation

* feat: update the query for available moderators

* spec: write a test for the available moderators

* fic: update the reaction spec with current time

* fix: add last_reacted_at to the send_spec

* fix: add last_reacted_at to the user

* chore: move the queries around

* fix: change timecop block

* fix: update the last_reacted_at for the user

* chore: try to fix timecop

* Update app/services/notifications/moderation.rb

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

* feat: update the tests

Co-authored-by: rt4914 <rajattalesra4914@gmail.com>
Co-authored-by: Rajat Talesra <rajat@forem.com>
Co-authored-by: Mac Siri <mac@forem.com>
2023-01-26 19:31:45 +02:00
Mac Siri
ec3971a387
Create FindsBin spec (#18992) 2023-01-26 10:46:18 -05:00
Fernando Valverde
db821a806f
/comments API docs (#18983)
* file

* Comments API
2023-01-25 12:06:43 -06:00
Joshua Wehner
7f41dae631
Pages API: Read (get index+show) (#18970)
* Pages API pt 1 (read/get/index+show)

* Update spec/requests/api/v1/docs/pages_spec.rb

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

* Update spec/requests/api/v1/docs/pages_spec.rb

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

* API Key not required for index & show

* API Feature flag has long since been removed

* Page schema

* Fix spec broken by merge

Co-authored-by: Ridhwana <Ridhwana.Khan16@gmail.com>
2023-01-25 17:15:27 +01:00
Anna Buianova
6524406d1d
Fixed redundant article and comment markdown parsing (#18989)
* Fixed redundant article and comment markdown parsing

* Removed useless comments

* Fixed ContentRenderer specs
2023-01-25 13:56:43 +03:00
Fernando Valverde
8c62f9d6b3
Add the missing API docs for /articles (#18848)
* Progress on more articles API docs

* Some progress

* Broken update article doc spec but some progress

* Fix articles put rswag spec

* Fix spec

* Add missing specs

* Apply PR review feedback
2023-01-24 13:44:29 -06:00
Mac Siri
0a5f1c12f7
Fix broken specs (#18993) 2023-01-23 23:05:42 -05:00
Lawrence
0ac9852663
[API v1 docs] Followed Tags (#18952)
* Followed Tags swag docs

* Update spec/requests/api/v1/docs/followed_tags_spec.rb

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

* Add to swagger helper

* minor tweaks

* more cleanup

* syntax change

* name change

* User doesn't have to be an admin

* Update spec/requests/api/v1/docs/followed_tags_spec.rb

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

* Update spec/requests/api/v1/docs/followed_tags_spec.rb

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

* update v1 json structure

* Update spec/swagger_helper.rb

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

* Update spec/requests/api/v1/docs/followed_tags_spec.rb

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

* re-generate swagger file

* Update spec/requests/api/v1/docs/followed_tags_spec.rb

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

* regenerated swagger file

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Ridhwana <Ridhwana.Khan16@gmail.com>
2023-01-23 13:28:36 -06:00
Joshua Wehner
30c0485507
Frontend for multiple reactions (v1) (#18808)
* Remove extraneous comment (see 9361d2 and 5c18f8)

* Flexible, multiple reaction types

* Fix reaction counts

* Re-use svg for active state for now

* Update yml, update spec

* Possible temp fix for failing tests

* Colorize reaction icon svgs

* Reaction engagement above post title

* Index reactions engagements (for logged-out)

* Maybe readinglist is special

* Try using crayons' dropdown as a drawer?

* readinglist isn't really public now

* feat: update the styles for the reaction drawer

* Grey background highlight, turn off border/shadow

* Read our feature flag docs, saw this was recommended

* Missed fifth emoji: party/tada

* Fix JS test errors

* Update test with tada

* Suppress flashing engagements when no public reactions

* Liberate jump-to-comments from unicorn replacement

* 'Add reaction' on tooltip

* Don't show reaction emoji on index unless it's been used

* rubocop

* Update heart+ total count when toggling

* Do not include 'readinglist' in drawer/public counts

* Fix semi-public readinglist so that icon is badged for current user

* Tweak heart-plus svg

* Style tweak: border on active reaction

* Show reacted icon on drawer trigger for 1.5 sec

* Tweak styles for engagements bar

* Style tweaks for multiple engagements (#index)

* Trying to get size working through crayons/inline_svg

* Sparkle hearts

* Restore unicorn

* Make heart-plus-active work when user has an active reaction

* Try 'hoverdown' a dropdown that activates with hover

* Long touch?

* Tap *outside* the drawer to close

* Mobile reaction drawer is also supposed to be columns

* More reaction count cleanup

* Final emoticons maybe?

* Fix reaction bug when feature disabled

* Remove readinglist from public reaction counts

* Update specs for new reaction categories

* Shuffle makes specs flaky

* Order does not matter

* rubocop

* Update to preserve readinglist analytics

* Shuffle makes specs flaky

* Fix flickering images, remove icon highlight for now

* Don't update total for readinglist

* reactions_by_user_id

* Try renaming this observer function

* Try unid ids for SVGs

* Remove local test file

* Simplistic test for the unique svg transform

* Fix javascript for current SVG

* Signifcant string literals in this case, rubocop

* Use the right expected output

Co-authored-by: Ridhwana <ridhwana.khan16@gmail.com>
2023-01-23 16:00:50 +01:00
Ridhwana
03bee374d2
[API v1 docs] Followers (#18965) 2023-01-20 15:03:39 +02:00
Fernando Valverde
c24e227f55
Extract Organization#conditionally_update_articles to worker (#18956)
* Extract conditionally_update_articles to worker

* Split to individual articles on workergits

* Fix some failed specs

* Fix another spec
2023-01-18 11:58:57 -06:00
Ridhwana
bf88b1e125
[API v1 docs] Profile Images by Username (#18951) 2023-01-13 17:35:47 +02:00
Anna Buianova
7d053471f8
Rubocop fixes in spec/requests (#18946)
* Rubocop fixes in spec/requests

* Fixed spec/requests/api/v0/articles_spec.rb

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

Co-authored-by: Ridhwana <Ridhwana.Khan16@gmail.com>
2023-01-12 19:10:16 +03:00
Anna Buianova
1cb759021d
Extract comments rendering (#18904)
* Started using ContentRenderer for comments

* Enabled consistent rendering for comments in specs
2023-01-11 13:24:58 +03:00
Anna Buianova
a2d26df17b
[API V1 docs] Podcast Episodes (#18908)
* Podcast episodes api swagger docs (start)

* Podcast Episodes api swagger docs

* Fixed wording

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

* Fixed wording

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

* Removed commented code

Co-authored-by: Ridhwana <Ridhwana.Khan16@gmail.com>
2023-01-10 15:01:22 +03:00
Rajat Talesra
26c72096ba
Remove bootstrap classes : collapse hide show (#18917)
* Removed bootstrap from listing_categories, listings, navigation_links

* Removed not-used bootstrap classes from admin/tags

* Removed bootstrap from admin/settings

* Fix collapse glitch in profile-fields

* Feedback partial progress

* Feedback partial progress

* Removed form-control

* Replaced card with crayons-card

* Fixed profile field UI

* Removed collapse hide and show classes

* Removed collapse hide and show classes

* Removed collapse hide and show classes

* Nit height fix

* Nit width fix

* Updated tests
2023-01-06 21:25:49 +05:30
Mac Siri
b887b91be2
Update shoulda-matchers to 5.3 (#18905) 2023-01-05 13:21:38 -05:00
Gabriel Quaresma
575852f940
feat: update organization slug max limit (#18911) 2023-01-04 21:13:34 +02:00
Joshua Wehner
0e25b1413e
Update DisplayAd API to allow setting tag_list (#18891) 2023-01-04 13:59:20 +01:00
Ridhwana
73335f3a56
[API V1 docs] Reading List (#18888)
* feat: add the docs spec file fro readinglist

* feat: add the api_v1.json file
2022-12-22 13:26:31 +02:00
Joshua Wehner
cb292a464c
Try sanitizing user-agent during embed validation (#18857) 2022-12-21 15:32:31 +01:00
Mac Siri
e9c3f828c3
Remove redundant cache purge request (#18832) 2022-12-20 14:58:21 -05:00
Ridhwana
6cb97eeb01
Async Hamburger Menu Implementation + Caching Optimizations (#18818) 2022-12-20 20:00:08 +02:00
Mac Siri
f13a1ec0c2
Actually get buildpulse to work with rspec and jest (#18859)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2022-12-19 14:31:29 -05:00
Fernando Valverde
9fa52753c1
Remove community wellness badge rollout logic (#17639) 2022-12-19 11:48:31 -06:00
Joshua Wehner
be63f48d76
Extract article markdown rendering to service (#18754)
* Beginning, needs cleanup & tests

* Minor refactor/cleanup

* Wondering if this factory ever worked?

* Minor tweak for blank body processing

* Better error handling for ContentRenderer

* Added some tests around ContentRenderer error conditions

* This test seems fine?

* Mocking internal dependencies

* Use new extraction for has_frontmatter?

* FeatureFlag :consistent_rendering

* Try to enable per-actor feature flag
2022-12-14 15:30:26 +01:00
Lawrence
33295ac58c
Update messaging to be Bio (#18798)
* Update messaging to be Bio

* Update app/validators/profile_validator.rb

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

* Update app/validators/profile_validator.rb

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

* Update app/validators/profile_validator.rb

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

* Update app/validators/profile_validator.rb

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

* Update app/validators/profile_validator.rb

Co-authored-by: Joshua Wehner <joshua@forem.com>

* adding rails translation to profile

* implement base for record error

* fix spec

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Joshua Wehner <joshua@forem.com>
2022-12-09 13:15:46 -06:00
Fernando Valverde
3170c06077
Fix connect account bug from settings (#18824)
* Fix connect account bug from settings

* Adds a controller concern test for after_sign_in_path_for

* Styling tweaks

* Merge uri query_values and only ignore i=i param

* remove unused stored_location_for and rename path var

* Reintroduce stored_location_for :p

* Reorder path origin priority
2022-12-09 09:58:04 -06:00
Mac Siri
b5fbab0e31
Update ArticleFetchedFeed to use slack workflow (#18801) 2022-12-09 10:46:20 -05:00
Fernando Valverde
ef854eac77
v1 articles me + published + unpublished dics (#18810) 2022-12-08 10:38:25 -06:00
Rajat Talesra
8f90d1b378
Remove “Shield” icon in nav for Trusted Users - except admins and tag-moderators (#18791)
* Removed shield icon - conditionally

* Updated tests

* Reverted trusted-status code

* Updated code for shield icon

* Nit optimisation

* Updated tests

* Updated tests

* Nit fixes

* Nit fixes

* Trying to fix line-length issue

* Revert this space in next commit

* Fake commit to restarst CI

* Re-enabled rubocop

* Nit fix
2022-12-07 15:40:44 +05:30
Joshua Wehner
a06ab31416
DisplayAd API: Write endpoints (#18736)
* Try a create endpoint

* Try an update endpoint for display_ads

* Try a delete endpoint for display_ads (unpublish)

* Unpublish

* Permit tags as well

* Update docs for DisplayAd tags via API/swagger
2022-12-05 11:12:24 +01:00
Fernando Valverde
6b920acd2c
Remove Vault Secrets page from admin interface (#18795) 2022-12-02 10:03:39 -06:00
Fernando Valverde
99f04b9119
GET /articles/me/all (#18797) 2022-12-02 08:28:16 -06:00
Josh Puetz
b4a4d59581
Document a v0 endpoint in v1 (#18493)
Co-authored-by: Fernando Valverde <fernando@fdo.cr>
2022-12-01 06:39:42 -06:00
Anna Buianova
985b44af5f
Fixed problematic Article specs related to unpublishing (#18793)
* Fixed problematic Article specs related to unpublishing

* Modify unpublishing scheduling test
2022-12-01 10:24:29 +03:00
Rachael Wright-Munn
038c889432
Raise a clearer error message when the user tries to comment on a draft post (#18588)
* Raise a clearer error message when the user tries to comment on a draft post.

* Apply suggestions from code review

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

Co-authored-by: Fernando Valverde <fernando@fdo.cr>
Co-authored-by: Ridhwana <Ridhwana.Khan16@gmail.com>
2022-11-23 09:01:30 -06:00
Rajat Talesra
888c6b93bf
Organisation profile page redesign (#18717)
* Partial redesign org page

* Removed div

* Team members design fixed

* Nit fixes

* Nit fixes

* Nit fixes
2022-11-21 21:33:44 +05:30
Joshua Wehner
7c82d128ff
DisplayAd API: Read endpoints (#18726)
* DisplayAd API: Read endpoints

* Updated swagger docs for display_ads read endpoints

* Update swagger with type_of

* Remove extraneous comment

* Restrict authentication to strictly api_key
2022-11-21 09:31:01 +01:00