Commit graph

7119 commits

Author SHA1 Message Date
PJ
5933f294e9
Follow all suggested users by default when onboarding (#19435) 2023-05-09 17:04:10 +01:00
Ben Halpern
d8ac9e27fb
Fix profile_image bug in org search (#19444) 2023-05-09 17:54:22 +02:00
Joshua Wehner
3097781882
Try to catch unhandled exception (#19360) 2023-05-09 11:10:29 -04:00
Ben Halpern
4d7fcb7359
Quick fix to pagination in /stories/feed (#19423)
* Quick fix to pagination in /stories/feed

* Fix whitespace

* Update app/services/articles/feeds/variant_query.rb

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

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Mac Siri <mac@forem.com>
2023-05-09 09:52:03 -03:00
Rajat Talesra
2554828db8
Design fixes for home feed comments (#19437)
* Design fixes for feed comments

* Nit fix

* Nit fixes

* Nit fix

* Nit fix

* Nit fix
2023-05-09 12:12:52 +05:30
Dhanujha R
857dd285d5
Remove Dark and Light Nav Logo Image from Organization (#19309) 2023-05-08 17:01:03 -04:00
Robert Chang
9c834b4fd8
Rename cache-key in UserDecorator (#19401) 2023-05-08 16:25:52 -04:00
Lawrence
2da9b9a0af
Organization Search Filtering (#19430)
* add org fitlering init logic

* further styling of the org block

* add tests and fix sort by error

* serializer spec

* org slug instead of twitter

* add utility CSS
2023-05-08 14:58:25 -05:00
Ben Halpern
314f9eed56
Fix blockquote and image edge cases in comment previews (#19428) 2023-05-05 15:16:35 +05:30
PJ
eadbc94ca5
Round Robin notifications design refresh (#19420)
* update visual design

* add comment user to mod notification

* fix request spec
2023-05-04 18:13:14 +01:00
Ben Halpern
0e46079321
Hotfix: proper darkmode gray, and image inclusion fix (#19427) 2023-05-04 09:48:31 -04:00
Ben Halpern
cb2c200404
Implement low-hanging-fruit feed card comment frontend tweaks (#19416) 2023-05-04 08:29:32 -04:00
Robert Chang
3ff06eee6e
Fixed display of CoC/Terms in/onboarding (#19402) 2023-05-02 10:02:53 +02:00
Ben Halpern
bbcd1ed3da
Limit ApiSearchQuery results to index minimum score (#19407) 2023-05-01 17:49:09 -04:00
Joshua Wehner
8cf417e4a1
Maintain contrast for onboarding follower button (#19384) 2023-05-01 12:41:46 -04:00
Rajat Talesra
80f5591c1f
Changed Add Moderator position for better UX (#19346) 2023-05-01 14:13:48 +05:30
Rajat Talesra
321db95e31
Add more visibility and control into the Admin Article page (#19345)
* Basic thumbsup, thumbsdown and vomit

* Refined UI of flags and vomits

* If check

* Optimised code and added a method in article.rb

* Removed public keyword

* Nit fixes
2023-05-01 13:37:01 +05:30
Lawrence
93a70815b3
TimeFixer Initializer Migration (#19268)
* init

* remove from asset pipeline and add tests

* add utc date conversion test

* try removing last tests

* add some more tests

* add tests for more coverage

* add yet more tests

* separate descibe statments

* add dt test back

* more test cleanup

* include pack js files

* add jest back

* Include /packs/ in code coverage metric

* derp

* revert jest

* reformat some of the test accordingly

* try e2e

* fix cypress test

---------

Co-authored-by: Mac Siri <mac@forem.com>
Co-authored-by: Mac Siri <krairit.siri@gmail.com>
2023-04-27 20:54:39 -05:00
Ridhwana
e67454fa53
Preparation of endpoint and files required for ChatGPT Plugin (#19394)
* feat: add the ./wellknown/ai-plugin.json file

* feat: add a logo

* feat: firts attempt at open_api file with endpoint we thought we'd use

* feat: add a search action to teh articles controller that build up teh appropriate json

* feat: add a query param to the article index

* feat: add some chatgpt endpoints and file paths to CORS

* feat: update the openapi yml file to reflect the article search endpoint

* fix: use the correct concept

* feat: replace the logo

* feat: update the ai-json file

* feat: update the openapi file

* feat: update the api and it's params

* feat: update the search query

* fix: ordering

* feat: cors debug

* fix: logic with markdown

* chore: fix test

* spec: article

* spec: article

* spec: article

* Update public/.well-known/ai-plugin.json

* Update public/openapi.yml

---------

Co-authored-by: Ben Halpern <bendhalpern@gmail.com>
2023-04-27 16:51:24 -04:00
PJ
1a548a41d2
Bullet and access policy fix for HtmlVariant admin page (#19391)
* revert html variants admin page queries

* update specs to test which variants are returned
2023-04-27 18:24:14 +01:00
Robert Chang
8b1a825397
Rename cache-key in ReactionsController (#19368)
* Update ReactionsController#cached_user_public_comment_actions cache_key

* Change cached_user_public_comment_reactions main key naming
2023-04-27 15:26:57 +01:00
Anna Buianova
2c759ca4dc
Consistent rendering on preview: comments and articles (#19361)
* Consistent rendering for previews (Articles, Comments)

* Rubocop fix

* Added preview comments specs when consistent rendering disabled

* Added specs for preview articles and comments + a couple of fixes
2023-04-27 14:08:15 +03:00
Ben Halpern
7bcd34c45d
Fix commentpreview instantclick issue (#19393) 2023-04-26 11:38:43 -04:00
Joshua Wehner
7a9d71666f
Refactor for_display to pass article instead of params (#19376)
* Refactor for_display to pass article instead of params

* Refactor: use options in FilteredAdsQuery, deconstruct article in DisplayAd.for_display

* Typo

* Restore applicable comments
2023-04-26 16:57:10 +02:00
Ben Halpern
793c6b75b6
Improve visual consistency in some embeds (#19390)
Co-authored-by: Ridhwana <Ridhwana.Khan16@gmail.com>
2023-04-26 09:55:31 -04:00
Joshua Wehner
de5da78815
Tweak 'last step' random sampling to favor new ads (#19389) 2023-04-26 13:55:03 +02:00
PJ
800ff397e0
Migrate initializeArticleDate and initializeArticleReactions to Webpack (#19377)
* feat: tests for series list on article page

* feat: test for jump to comments button (needs fix)

* feat: tests for reaction drawer on article page

* feat: test for full date on hover??

* feat: add full date on hover tests for all pages with publish dates

* fixed jumping to comments test

* move initialisers to packs

* fix coverage issues

* fix flaky login modal spec

* switch back to using onclick instead of addEventListener
2023-04-25 18:33:43 +01:00
Lawrence
d2bcb55365
Date Time Helper Initializer Migration to PAck (#19381)
* migration init

* remove date initializer
2023-04-25 09:58:27 -05:00
Joshua Wehner
dc1ab81401
Allow DisplayAd to target users via audience segmentation (#19284)
* Trying some models for audience segmentation

* AudienceSegment basics

* Attach AudienceSegment to DisplayAd

* Possibly use a DUS to populate AudienceSegments

* Add to display ad form UI

* Add to display ad API

* Refresh strategy for audience segments

* Add user_id to async ads query

* Maybe :testing -> :manual, for no-refresh segment

* Test & tweak segment refresh

* Testing audience_segment#refresh logic

* Coverage: testing human_readable

* Scope segment refresh to recently active users

* Tweak logic for when to refresh

* Tweak experience levels to match SettingsHelper

* Test for front-end logic

* Fix test, hope this helps coverage?

* Better test names

* One worker for all, many workers for each, perform_bulk

* Fix audience segment UI, needs to use id, not enum

* cron/schedule should RefreshAll

* Singular id in RefreshWorker
2023-04-25 08:41:10 -04:00
Anna Buianova
025cbeb35a
Removed tracking 'comments section viewable' ahoy event (#19354)
* Removed tracking 'comments section viewable' ahoy event

* Returned focus on comments when there is an anchor
2023-04-21 13:31:37 +03:00
Ben Halpern
0f495f2952
Fix link liquid tag for org posts (#19365) 2023-04-20 14:56:27 -04:00
Robert Chang
4f2640981d
Rename cache-key in TaggedArticlesController (#19322)
Co-authored-by: Mac Siri <mac@forem.com>
2023-04-20 11:44:26 -04:00
Ben Halpern
32f4bd76f2
Unify liquid embed styles without modifying markup (#19348) 2023-04-20 10:20:34 -04:00
Anna Buianova
6698c1dc28
Set flash[:error] when markdown has invalid liquid tags on comment update (#19353)
* Added a spec for invalid gist (ContentRenderer)

* Added flash errors when comment validation fails
2023-04-20 15:48:30 +03:00
Duke Greene
692795407f
Migrate dashboard initializers to packs (#19327)
* add dashboard sort initializer and tests within packs folder

* run dashboard sort initializer in base.jsx spinup and on InstantClick change

* remove assets/javascripts' dashboard sort initialization and comment out original file

* fully remove original dashboard sort initializer file

* export both functions within initializeDashboardSort

* refactor import of selectNavigation function within CategoryLinksMobile
2023-04-18 18:09:33 -04:00
Joshua Wehner
8c03359330
Restore marking notifications as read via InstantClick (#19339)
* Restore marking notifications as read via InstantClick

* Update app/javascript/packs/baseInitializers.js

---------

Co-authored-by: Ben Halpern <bendhalpern@gmail.com>
2023-04-17 15:05:12 -04:00
Rajat Talesra
55bf506dfb
Added link to org name in community billboards (#19331)
* Added link to org name in community billboards

* Nit fix
2023-04-17 12:28:30 -04:00
fille du chaos
bef1c4a1e0
Migrate initializeDrawerSliders and initializeHeroBannerClose to Webpack (#19324)
* feat: tests for tag page sidebar drawers on mobile

* feat: tests for hero area/banner on home feed

* refactor: move ui interaction initialisers to packs

* remove old filter select implementation
2023-04-17 10:55:02 +01:00
Ben Halpern
886e170e2f
Fix typo in tag mod email (#19333) 2023-04-15 21:44:16 +02:00
Lawrence
56e10f1306
Notifications Initializer Migration to Pack tag (#19124)
Co-authored-by: Ridhwana <Ridhwana.Khan16@gmail.com>
Co-authored-by: Lawrence S <lboogie@Lawrences-Air.attlocal.net>
Co-authored-by: Rajat Talesra <rajat@forem.com>
2023-04-14 17:50:07 -04:00
Lawrence
51b1cc212b
Update Tag Mod Email (#19329)
* update text file

* feat: update the text

* feat: update the html

* fix: Hey, username

* feat; just use @tag consistently instead of tag.name

---------

Co-authored-by: Ridhwana <ridhwana.khan16@gmail.com>
2023-04-14 15:59:40 +02:00
Ridhwana
4e9c5479c1
Billboard Dropdown style updates (#19318)
* changes to the divider

* chore: update the flag icon

* chore: add a consistent width and height to all the icons in the dropdown

* chore: move widtha dn height closer to definition

* feat: make the border 1pm

* feat: add a margin to thehr

* add margin all round for hr

* chore: same 8px for all around
2023-04-14 11:01:52 +02:00
Ben Halpern
51a2292fbd
Fix display ad event race condition (#19326)
* Mitigate race condition for async loaded billboard

* Put observeDisplayAds in billboard.js
2023-04-13 18:30:46 -04:00
Ridhwana
940c67a904
Load post_sidebar billboard asynchronously (#19317)
* feat: add a route to the async_info for display ads

* feat: load the billboard asyncronously

* feat: move the methods to the display_ads controller

* feat: handle params better

* feat: cache control headers

* feat: test fastly caching headers on display ads

* fix: surrogate key test

* feat: use safe navigation operator to handle cases where there is no article id

* fix: article id present then find the article

* feat: add a response test

* Fragment caching

* feat: update the article decorator

* feat: update cache keys for fragment

* feat: remove an empty line

* feat: add article id

* feat: bust cache

* feat: setup dropdown for billboard

* chore: add chunk to same line

* feat: add to safe params for caching

* Update app/controllers/display_ads_controller.rb

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

* feat: remove the cache deletion

* feat: update the routes to follow a new scope

* feat: update the cache params

* feat: get and replace all ads on the article page

* feat: do not go into the if statement if there is no async url property so that the ad fails gracefully

* chore: remove duplicate pack

* Update app/views/articles/show.html.erb

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

* Update app/views/articles/_sticky_nav.html.erb

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

* chore: add other params

* feat: allows adding placeholder content in the ad if need be

---------

Co-authored-by: Joshua Wehner <joshua@forem.com>
2023-04-13 19:23:27 +02:00
Ben Halpern
3b22dada38
Fix image width for feed location (#19321)
* Fix image width for feed location

* Fix typo
2023-04-12 15:06:19 -04:00
Ridhwana
6e7957f1c0
Change DisplayAds's fastly header (#19323) 2023-04-12 13:55:26 -04:00
Ridhwana
0771a5cd2e
Load post_comments billboard asynchronously (#19285)
* feat: add a route to the async_info for display ads

* feat: load the billboard asyncronously

* feat: move the methods to the display_ads controller

* feat: handle params better

* feat: cache control headers

* feat: test fastly caching headers on display ads

* fix: surrogate key test

* feat: use safe navigation operator to handle cases where there is no article id

* fix: article id present then find the article

* feat: add a response test

* Fragment caching

* feat: update the article decorator

* feat: update cache keys for fragment

* feat: remove an empty line

* feat: add article id

* feat: bust cache

* feat: setup dropdown for billboard

* chore: add chunk to same line

* feat: add to safe params for caching

* Update app/controllers/display_ads_controller.rb

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

* feat: remove the cache deletion

* feat: update the routes to follow a new scope

* feat: update the cache params

---------

Co-authored-by: Joshua Wehner <joshua@forem.com>
2023-04-12 18:15:15 +02:00
Robert Chang
0b3289797f
Rename cache-key on User#cached_following_podcasts_ids (#19300) 2023-04-12 09:57:03 -04:00
Rajat Talesra
fc28dfaae5
Support for new ad placement locations on home page feed (#19299)
* Basic implementation of all 3 ad placements

* UI fixes

* Dropdown bug fix

* Optimised code

* Updated tests

* Updated tes

* EOF added

* Improved a11y

* Nit fix
2023-04-12 18:47:29 +05:30
Joshua Wehner
5188ca8138
Cleanup multiple reactions feature flag (#19257)
* Update notifications_helper

* Update notification decorator

* Removed old notifications views

* Remove flag check from _actions partial

* Remove feature flag from views

* Remove flag from model

* Update logic in reaction drawer button

* Missed this somehow

* Update app/assets/javascripts/initializers/initializeArticleReactions.js

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

* Update these tests to multiple reactions

* Adjust logged-out test to account for multiple reactions

* Removed unused

* Try to boost coverage

---------

Co-authored-by: Ridhwana <Ridhwana.Khan16@gmail.com>
2023-04-07 17:14:10 +02:00