* move initializeSettings to webpack + add tests
* add initializeSettings to InstantClick change block
* dont use classes, use modules
---------
Co-authored-by: PJ <pj@forem.com>
* 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
* 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
* 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>
* 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
* 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
* 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
* Suggested follows copy changes
* See if this makes codecov happier?
* Still trying to appease codecov
---------
Co-authored-by: Ben Halpern <bendhalpern@gmail.com>
* 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
* 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
* 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>
* 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
* 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
* 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