Commit graph

1329 commits

Author SHA1 Message Date
zhangted
beb2800959
move initializeSettings to webpack (#19737)
* move initializeSettings to webpack + add tests

* add initializeSettings to InstantClick change block

* dont use classes, use modules

---------

Co-authored-by: PJ <pj@forem.com>
2023-08-01 13:09:50 +01:00
PJ
9754d14182
Fix intermittently broken reaction images on home feed (#19779)
* move reaction icons to base layout

* fix reactions count specs??

* also fix article specs
2023-07-27 19:48:07 +01:00
Duke Greene
cf7847fadb
remove onboarding background image, use gradient based on brand color (#19815)
* remove background image, rename prop to refer to color, pass primary brand color

* create helper method, send calculated gradient values into frontend props

* test new helper method and refine how color is darkened
2023-07-27 07:27:21 -04:00
Jeferson S. Brito
012e625c7c
Add Preact root fragment implementation replacement for replaceNode (#19673)
* feat: add preat-root-fragment implementation of replaceNode

* refact: replace render third argument with root fragment

* chore: reorder preact root imports

* fix: root createRootFragment implementation

* chore: fix base.jsx import order

* fix: add specs for preact-root-fragment

* fix: test ci audit issues

* fix: add insert/append methods specs for root-fragment
2023-07-25 10:11:41 -04:00
Ridhwana
03905ce9cf
fix: move the setup dropdown to the callback because ot exists at that point (#19803) 2023-07-24 10:56:35 -04:00
Anna Buianova
963eea8126
Aliased DisplayAdEvent.display_ad_id to billboard_id (#19805)
* Aliased DisplayAdEvent.display_ad_id to billboard_id

* Allow :display_ad_id instead of :billboard_id for billboard_events in case of cache
2023-07-24 17:54:39 +03:00
Joshua Wehner
1f202c6a9a
Try to fix scrolling bug (#19801) 2023-07-21 09:42:50 -04:00
Anna Buianova
e659dbfc00
Renamed display_ad_events variables and associations (#19788)
* Renamed stuff related to display_ad_events (except the model)

* Updated user billboard_events association spec

* Fixed display_ad_event factory
2023-07-21 14:59:28 +03:00
Anna Buianova
fbd2ca0453
Rename DisplayAdEventsController to BillboardEventsController (#19771) 2023-07-19 08:51:22 -04:00
Ridhwana
77148d8687
fix: lint rule https://github.com/facebook/react/issues/14920 (#19748) 2023-07-17 12:37:32 +02:00
Ridhwana
272aea6127
Allow admins to delete an organization (#19699)
* feat: update the layout for organizations

* feat: update the layout for an organization

* feat: organization logos are square

* feat: change the text on the org visit button

* feat: initialize the dropdown menu

* feat: trigger the  modal

* feat: update the text in the model

* feat: tweak wording

* WIP/feat: hook up a route with an action that calls an organization delete worker.

* feat: redirect after showing the notice

* feat: update the authorization required to be super admin

* feat: add the notice to localization

* spec: integration test

* spec: fix

* spec: delete worker

* chore: update the link

* feat: add safe navigation

* feat: make sure that we show an error if the organization has credits

* fix: error message for modal unspent credits

* feat add the spec for the helper

* fix: remove rspec preface

* fix: small fixes to tests and I18n

* fix: updated the number of orgs

* feat: update the message

* feat: update the message

* chore: remove inclusion of helper

* feat: change the name of the parameter

* chore: newline
2023-07-17 12:09:24 +02:00
depfu[bot]
730f976c08
[js] Update preact 10.12.1 → 10.15.1 (minor) (#19716)
Co-authored-by: depfu[bot] <23717796+depfu[bot]@users.noreply.github.com>
Co-authored-by: PJ <pj@forem.com>
2023-07-12 16:24:19 -04:00
Anna Buianova
7c1721675c
Rename DisplayAdsController to BillboardsController (#19738) 2023-07-12 09:42:46 -04:00
Lawrence
0c93bde6c2
Subscribe to Comment Functionality (#19555)
* Move save over and add button labels

* comment notification design and functionality

* controller error handling

* add ternery operator for background class

* minor cleanup

* add proper styling toggles

* tests and mobile spec

* add for all buttons

* add article as a param

* comment is not required on article preview

* update policy spec

* add test for coverage

* add proper button titles

* use the last user comment as comment id

* add better error handling and remove multiple fetch calls in js

* copy change to threads

* update copy, fix multiple fetch calls, add observer for loading more notifications

* update spec

* add rspecs

* more test specs

* fix test specs

* subscribe button text tests

* add export

* optimistically update ui function tests

* button initialize test

* check for comment ancestry

* add feature flag block

* some cleanup

* update logic and specs

* oops

* rubocop issues

* change config names

* change config names

* fix spec

* add one more conditional

* check for comments

* service-object the toggler

* separate routes

* continual refactoring

* refine spec tests

* clean up policy

* Adjust js and view files to match be params

* some service object refactoring

* separate endpoints on client-side

* broken spec

* service specs

* policy spec fixes

* remove action param

* remove action param from spec

* minor updates

* trigger build

* update to post

* Services don't need permitted params

* Notifications continue to be a mess, decorator specs to follow

* Not toggling now

* This doesn't really belong here

* Fix tests after moving

* Streamline front-end

* There could be errors?

* polymorphic_name is a class thing

* ☠️ json_data in notification views

* Use feature_flag helper to get current_user

* Cannot derive current subscription status from notification, only from subscription

* Default is subscribe to all article comments

* Sync up matching unsubscribe, make subscribe idempotent-ish

* Temporarily comment-out button jest tests to see if I can unstick CI

* Stop trying to detect potential subscribe-to-comment

* Stop trying to detect potential subscribe-to-comment

* Minor spec refactoring

* Add specs for article notification decoration

* NotificationDecorator specs are rather long

* Rubocop likes it?

* Minor spec refactoring

* Doesn't need to stay pending

* Add spec for subscription finder

* Expand Subscribe service specs

* YAGNI, but I don't like hard-coded config

* Refactor Unsubscribe service specs

* nobody expects the infinite scroll

* This *might* work, except for feature flag

* Ancestry can be quite deep actually

* Rubocop

* Update subscribe button for subscribe-to-thread

* Jest tests are just tests

* hasAttribute != getAttribute

* Test knows **nothing** about window size

* Tests have been lying about mobileLabel this whole time

* Make payload/endpoint testable

* Is Jest actually happy???

* Still cleaning up jest/eslint

* Temporarily comment-out cypress tests pending feature flag

* Thanks, Rubocop, what would we do without you

* Preserve round-trip for 'top-level' and 'only-author' subscriptions

* Update specs

* Move save button icon

* Update test with better config param

* Try feature flag specific to cypress env

* Tell cypress to wait for (un)subscribing to work

---------

Co-authored-by: Lawrence S <lawrence@forem.com>
Co-authored-by: Joshua Wehner <joshua@forem.com>
2023-07-10 17:11:46 +02:00
zhangted
5fe3a04287
fix scroll when popstate from a full screen code block (#19674) 2023-07-07 15:54:24 -04:00
Kireeti
982d629fdf
Change Onboarding's button styling (#19654)
Co-authored-by: PJ <pj@forem.com>
2023-07-07 12:46:46 -04:00
Anna Buianova
8cc6f37a2d
Rename Admin::DisplayAds controller to Billboards (#19687) 2023-07-07 08:11:35 -04:00
Ridhwana
ccacf0bc3a
Refactor the home feed + add user tag filtering on in-feed billboards (#19600)
* feat: fix of there is no article

* feat: set the feed order in a data structure rather than in a view

* feat: update yarn.lock

* feat: push the items to the array

* feat: update feed to only show billboards if we have the correct length of items in the feed

* fix: organizedFeedItems.legth

* feat: rename 'featured' to 'image'

* feat: rename 'featured' to 'image'

* feat: rename 'featured' to 'image'

* feat: add some utilities for the feed that we can use in the FeedTest

* feat/WIP: the setup for the feed tests and a first working test

* test: imageItem

* fix: the podcasts can be passed through as an array of objects in the feedItems so that they can be grouped in one card

* feat: remove podcastEpisode state and the attribute in the object

* fix: check that the items exist before trying to slice them

* feat: setup the userdata and the podcast data in the test

* whoops - commit the podcast episodes

* feat: write soem more tests for the feed and including the podcasts

* feat: add some more tests

* feat: add more billboards tests to chcek the order of stuff

* feat: set the timeframe not empty

* feat: update the logic for organizaed feed by inserting the last on first

* doc: jsdoc for functions

* refactor: break the code up into smaller functions

* refactor: make the code more readable and easier to follow

* refactor: pull function out into a utlity

* feat: add specs to utility

* feat: chcek if pinned post

* test the latest timeframe correctly

* chore: update var name

* move the podcast items out of the object clause

* feat: update text

* feat: add a pack file that duplicates initializeDisplayAdVisibility

* feat: create callbacks that will help us to determine when the feed has been rendered so that we can observe the dsplay ads accordingly

* chore: rename to billboards instead of display ad

* feat: abstract out a function that will work for any tagged resource and also limit the article tags within a scope of the article_id

* feat: update the spec for the previous changes

* feat: write tests for the user_tags

* feat: add user_tags to for_display adn the query

* feat: add user_tags to the endpoint where we query the tags to send it through to for_display

* feat: pass through the suer tags to the async request

* feat: update the user_tags fiter query + tests

* feat: update the admin view to show targeted tags on the new feed option billboards too

* feat: add tests for targeted tags field on admin

* refactor: consolidate all of the options into one

* feat: move comment close to attribute

* feat: use a helper method

* feat: include helper on ads query

* feat: move the query from the frontend to live on the backend

* feat: first pass at some error handling whilst maintaining the order of the items

* test: for feed error

* feat: abstract out some code

* update the feed items for errors

* chore: comment

* feat: update the variable names

* feat: update honeybadger message

* feat: update the name of the variable

* refactor: do not conflate the duty of the untagged_ads

* refactor: rename the variables + add note for clarity

* fix: update var
2023-07-06 16:47:08 +02:00
Ridhwana
8003691b37
Restructure the way we render the feed + add billboard locations on signed in feed (#19652)
* feat: fix of there is no article

* feat: set the feed order in a data structure rather than in a view

* feat: update yarn.lock

* feat: push the items to the array

* feat: update feed to only show billboards if we have the correct length of items in the feed

* fix: organizedFeedItems.legth

* feat: rename 'featured' to 'image'

* feat: rename 'featured' to 'image'

* feat: rename 'featured' to 'image'

* feat: add some utilities for the feed that we can use in the FeedTest

* feat/WIP: the setup for the feed tests and a first working test

* test: imageItem

* fix: the podcasts can be passed through as an array of objects in the feedItems so that they can be grouped in one card

* feat: remove podcastEpisode state and the attribute in the object

* fix: check that the items exist before trying to slice them

* feat: setup the userdata and the podcast data in the test

* whoops - commit the podcast episodes

* feat: write soem more tests for the feed and including the podcasts

* feat: add some more tests

* feat: add more billboards tests to chcek the order of stuff

* feat: set the timeframe not empty

* feat: update the logic for organizaed feed by inserting the last on first

* doc: jsdoc for functions

* refactor: break the code up into smaller functions

* refactor: make the code more readable and easier to follow

* refactor: pull function out into a utlity

* feat: add specs to utility

* feat: chcek if pinned post

* test the latest timeframe correctly

* chore: update var name

* move the podcast items out of the object clause

* feat: update text

* feat: add a pack file that duplicates initializeDisplayAdVisibility

* feat: create callbacks that will help us to determine when the feed has been rendered so that we can observe the dsplay ads accordingly

* chore: rename to billboards instead of display ad

* feat: first pass at some error handling whilst maintaining the order of the items

* test: for feed error

* feat: abstract out some code

* update the feed items for errors

* chore: comment

* feat: update the variable names

* feat: update honeybadger message
2023-07-03 15:00:44 +02:00
Joshua Wehner
55b4e74a5a
Fix bug: Unable to unfollow topics (#19637)
* Fix bug: Unable to unfollow topics

* Rubocop

* Appease audit?
2023-06-29 09:54:10 +02:00
Joshua Wehner
c1b31da6af
Spinner during onboarding follow suggestions (#19622) 2023-06-28 11:25:44 +02:00
Ben Halpern
923f66174d
Add accidentally-removed observeDisplayAds line (#19631) 2023-06-23 18:49:17 -04:00
PJ
90780fd97a
Fix comment moderation's UI bugs (#19554) 2023-06-23 09:56:24 -04:00
Joshua Wehner
900f42d224
Try to stop eslint complaining about destructuring (#19629) 2023-06-23 08:51:17 -04:00
Rajat Talesra
67ff8d4efb
Add Edit Profile Image option to Onboarding (#19589)
* Basic implementation

* Nit fix

* Using existing profile update api

* API call working

* Basic full implementation

* Nit fixes in design

* UI changes

* Image upload limit set

* Removed drag & drop

* Image size issue fix

* Minor naming fixes

* Removed native mobile code

* Nit fix

* Added few tests

* Added test

* Added test

* Added image upload error

* Added validateFileInput test failure case

* Updated code to test fix

* Revert db changes

* Minor design fixes

* Minor updated test

* Added validateFileInputs test temporarily

* Added processImageUpload test temporarily

* Aded files count test

* Minor warning fixes

* Updated placeholder text

* Added tests for TextInput and TextArea

* Removed un-required test file

* Removed un-required code

* Minor code cleaning
2023-06-23 16:08:27 +05:30
Mac Siri
35a2f8b026
Add Error handling to billboards.js (#19566) 2023-06-22 10:20:34 -04:00
Joshua Wehner
a4419a249a
Suggested follows copy changes (#19596)
* Suggested follows copy changes

* See if this makes codecov happier?

* Still trying to appease codecov

---------

Co-authored-by: Ben Halpern <bendhalpern@gmail.com>
2023-06-21 09:40:39 +02:00
Rajat Talesra
150199e0d2
Add more visibility and control around reactions/flags into the Admin USERS page (#19558)
* Basic implementation without dropdown

* Dropdown functionality

* Partial i18n

* Nit fixes

* Nit fixes

* Flag count fix

* I18n fr.yml

* Nit design fix

* added external div to article_item

* added external div to article_item

* Code merge of article_item and individual_article

* Minor bug fix

* Extacted more common code

* Nit fix

* Optimised code

* Optimised code

* Ni fix

* Test fix

* Minor suggested changes applied

* Nit fix

* Nit fix
2023-06-15 22:08:45 +05:30
Mac Siri
165f0bbf1f
Revert "Restructure the way we render the feed + add billboard locati… (#19610) 2023-06-14 14:27:58 -04:00
Ridhwana
b98dbd4035
Restructure the way we render the feed + add billboard locations on signed in feed (#19533)
* feat: fix of there is no article

* feat: set the feed order in a data structure rather than in a view

* feat: update yarn.lock

* feat: push the items to the array

* feat: update feed to only show billboards if we have the correct length of items in the feed

* fix: organizedFeedItems.legth

* feat: rename 'featured' to 'image'

* feat: rename 'featured' to 'image'

* feat: rename 'featured' to 'image'

* feat: add some utilities for the feed that we can use in the FeedTest

* feat/WIP: the setup for the feed tests and a first working test

* test: imageItem

* fix: the podcasts can be passed through as an array of objects in the feedItems so that they can be grouped in one card

* feat: remove podcastEpisode state and the attribute in the object

* fix: check that the items exist before trying to slice them

* feat: setup the userdata and the podcast data in the test

* whoops - commit the podcast episodes

* feat: write soem more tests for the feed and including the podcasts

* feat: add some more tests

* feat: add more billboards tests to chcek the order of stuff

* feat: set the timeframe not empty

* feat: update the logic for organizaed feed by inserting the last on first

* doc: jsdoc for functions

* refactor: break the code up into smaller functions

* refactor: make the code more readable and easier to follow

* refactor: pull function out into a utlity

* feat: add specs to utility

* feat: chcek if pinned post

* test the latest timeframe correctly

* chore: update var name

* move the podcast items out of the object clause

* feat: update text

* feat: add a pack file that duplicates initializeDisplayAdVisibility

* feat: create callbacks that will help us to determine when the feed has been rendered so that we can observe the dsplay ads accordingly

* chore: rename to billboards instead of display ad
2023-06-14 12:29:56 -05:00
Joshua Wehner
c2a131e43d
Add organizations to onboarding follow suggestions (#19564)
* Prepare: relocate user suggestions

* Prepare: relocate users suggestion service -> query

* Organization query for orgs with above-average scores

* Rubocop

* Limit to last 3 weeks

* Tweak recent scope, limit to 5 orgs

* Onboarding routes are also always JSON

* Divide by zero makes NaN means

* Add Orgs suggester into suggestions

* Rubocop

* select distinct orgs

* Fix for weird edge-case with bad local data

* Include type_identifier in JSON payload

* Update follows API to allow org_ids as input

* Update onboarding front-end to distinguish users/orgs

* Fix: i18n issues

* Fix: type_identifier in json output

* Fix: distinct is weird

* Fix: JS linter

* Continue tweaking front-end

* Audit import order

* Cleanup @todo note

* Try renaming controller action

* Move Article average calculation to postgres and fix math

* Refactor decorated type_identifier

* Refactor SuggestProminent, return more orgs, fix spec math

* Use FeatureFlag for organization suggestions

* This might fix the jest
2023-06-09 10:32:03 +02:00
Ben Halpern
4ffe7b0fab
Remove loading-ellipsis.svg and related code (#19569) 2023-06-01 10:41:53 -04:00
Ben Halpern
2fe2c6c6bb
Patch: Fix too-long code in comment previews via appropriate truncation (#19540)
* Fix too-long code in comment previews

* Update app/javascript/articles/components/CommentListItem.jsx

---------

Co-authored-by: Ridhwana <Ridhwana.Khan16@gmail.com>
2023-05-30 10:02:09 -04:00
Rajat Talesra
bbb9fd2e1e
Add more visibility to admins (part-2) (#19375)
* 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

* Section for flags and quality details

* Basic vomit item

* Quality item UI

* Separated code into partials

* UI changes and empty state added

* With correct implementation

* Fixed showing reaction items in all cases

* Dropdown visible

* Enabled click listerners and call functions for dropdown-button clicks

* Empty state UI fixed

* Tabs and divider UI

* Mark as valid/invalid conditions

* Nit fixes

* Logical fixes

* Added comments

* Partial item status update fix

* Reload page feature fixed

* Removed snackbar

* I18n strings

* Bug fix

* I18n strings

* Nit fixes

* Added date

* Added view details button

* Added view details test

* Sample test

* Test fixes

* Added tests for new article

* Flagged item tests added

* Added more tests

* Nit fix

* Suggested design changes

* Nit design fixes

* Tests with cy.intercept

* Nit fixes

* Nit fixes

* Hero Billboard Placement (#19467)

* init

* add option to swagger docs

* in_house validation

* filtered ad quesry changes

* styling and prioritizing home hero banner over campaign banner

* rubocop

* typo

* broken spec

* more spec fixes

* found the spec break culprit

* derp

* Update app/views/shared/_display_ad.html.erb

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

* Update app/controllers/stories_controller.rb

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

* remove immediate return

* styling feedback and moving banner to articles index

* remove nil

* updated styling

* add signed in bool

* add feature flag

* remove feature flag data scripts

---------

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

* Fix typo / erroneous word in Admin Section (#19488)

* Typo fixes

* Update admin_menu.rb

* Minor background and shadow change (#19501)

* Refresh audience segment for 'active' user (#19470)

* Refresh an individual user's segmentation

* Refresh segment if creating a published article

* Quick refactor

* Refresh segment if update publishing

* Quick refactor

* Refresh segment if update user settings

* Refresh segments after user update + role change

* Using latest_article_updated_at

* Sidekiq uses JSON for arguments, needs basic types

* Fix test issues with last_updated_at and sidekiq params

* Tests update continues

* Consolidate dependencies

* Method names acknowledging manual exclusive

* Fix test name copypasta

* Rubocop

* Try to clarify Creator#series

* Try to avoid naming predicate

* Remove erroneously included helper

* Improve onboarding “suggested tags” page design (#19475)

* Onboarding tags

* Logical design issue fixes

* Posts count added

* Checkbox design fixes

* Optimised css

* Nit fixes

* Test case added

* Reduced data

* Nit fix

* Added more tests

* Nit fix

* Tests updatedt

* Update @honeybadger-io/js to version 5.4.1 (#19479)

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

* Update sidekiq-cron to version 1.10.1 (#19473)

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

* Update nokogiri to version 1.15.0 (#19495)

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

* use tabindex instead of disabled to get proper keyboard nav on /onboarding tags (#19513)

* Add billboard to safe param list in Fastly vcl (#19515)

* Removed static article id from setup

* All tests passing

* Nit fixes

* Nit fixes

* Fixed tests with Joshua's help

* Added trusted user related tests

* Fixed few tests

* Added intercept and wait

* Removed tab and enter key

* Updated comment

* Updated tests

---------

Co-authored-by: Lawrence <lawrence@forem.com>
Co-authored-by: Ridhwana <Ridhwana.Khan16@gmail.com>
Co-authored-by: Peter Frank <peter.kim.frank@gmail.com>
Co-authored-by: Joshua Wehner <joshua@forem.com>
Co-authored-by: depfu[bot] <23717796+depfu[bot]@users.noreply.github.com>
Co-authored-by: Ben Halpern <bendhalpern@gmail.com>
2023-05-26 19:15:12 +05:30
Joshua Wehner
862cd54dc7
Refactoring onboarding (#19525)
* Quick refactor onboardings controller(s)

* Quick refactor onboardings controller(s), pt2

* Quick refactor onboardings controller(s), pt3

* Quick refactor onboardings controller(s), pt4

* Quick refactor onboardings controller(s), pt5

* Add test for checkboxes
2023-05-25 10:03:12 +02:00
Ben Halpern
45a44a797f
use tabindex instead of disabled to get proper keyboard nav on /onboarding tags (#19513) 2023-05-22 17:27:19 +05:30
Rajat Talesra
a441358f01
Improve onboarding “suggested tags” page design (#19475)
* Onboarding tags

* Logical design issue fixes

* Posts count added

* Checkbox design fixes

* Optimised css

* Nit fixes

* Test case added

* Reduced data

* Nit fix

* Added more tests

* Nit fix

* Tests updatedt
2023-05-19 23:46:24 +05:30
Ben Halpern
8b24e4c255
Quick fix: Remove double title from mod center item ✂️ (#19482)
* Remove double title from mod center item

* Minor css tweak
2023-05-18 11:22:57 -04:00
PJ
5933f294e9
Follow all suggested users by default when onboarding (#19435) 2023-05-09 17:04:10 +01:00
Joshua Wehner
3097781882
Try to catch unhandled exception (#19360) 2023-05-09 11:10:29 -04: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
Joshua Wehner
8cf417e4a1
Maintain contrast for onboarding follower button (#19384) 2023-05-01 12:41:46 -04:00
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
Ben Halpern
7bcd34c45d
Fix commentpreview instantclick issue (#19393) 2023-04-26 11:38:43 -04: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
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