* feat: step 1 - add the buttons to the html template
* refactor: renamed the class to be prepended with js-
* feat: add the js-tag-card class to the entire tag-card div
* feat: add the relevant data elements and tag-id to the tag-card div
* feat: add the required data elements for the top level js-tag-card
* feat: use @tag instead of tag
* refactor: rename the tag pack file
* refactor: rename the Tag file component
* feat: add a snackzone so that the snackbar can be added there
* feat: remove the follow-actions-button and the hide-actions-button from the tag pages so that it doesn't conflict with the 'followButtons' pack whne we need to add it
* spec: update the specs for tags
* chore: follow-action-button renamed to follow-tag-button and hide-action-button to hide-tag-button
* refactor: js-classes
* chore: add some comments
---------
Co-authored-by: Ben Halpern <bendhalpern@gmail.com>
* Private forem signup issue fix
* Minor design fixes
* Added click on logo
* Reset password design
* UX fix
* Updated dynamic contact
* Padding fix and test fix
* Complete translations
* Skipped flay test 'should show Feature Post button on an unfeatured post'
* comment out flaky specs and add commments for exploration/refactor context
* comment out only the specs which call reload for now
* use it.skip rather than commenting out
* add new org button in settings
* add support for mobile view
* remove varible for new org check
* fix design suggestions
* fix org settings test
* remove the settings for test since this text does not exists in user settings
* remove un-used copy
* Update class name
Co-authored-by: Ridhwana <Ridhwana.Khan16@gmail.com>
* Fix follow user spec
* fix the rspec test case
---------
Co-authored-by: Ridhwana <Ridhwana.Khan16@gmail.com>
* use instance setting for enabled target geolocations
* add validation for enabled geolocations setting
* a start on the UI?
* backend tweaks for UI
* proper crack at autocomplete component
* fix region targeting toggle
* e2e spec
* logic and markup to display tag adjustment history on article mod panel
* add tag adjustment reason to markup
* add specs for article's tag adjustment association and ordered tag adjustments
* style tag adjustment history
* sketch out cypress test for visible tag moderation history
* tweak spacing and sizing of adjustment history heading
* adjust cypress tests, tag adjustments still coming back empty in spec
* get past first cypress snag by waiting for request and reloading
* add spec for viewing multiple tag adjustments in a post history
* restore defer: true in actions panel js packs call
* add e2e tests for remaining mod views with tag adjustment UI
* getting started: model setup
* basic controller action & spec
* somewhat working click events
* pick up on impressions
* there was an attempt at batching without duplicates
* (better) bulk upsert service
* fix specs?
* touch up feed events JS
* end-to-end specs??
* workers wip
* fix failing user delete spec
* feat: add an error modal for the dashboard page tags
* spec: add the tests for the tags dashboard pages
* spec: add the tests for the hiding tags dashboard pages
* feat: add snackbars to /tags
* chore: update the props for the component"
* feat: update snackbar for following
* feat: add tests for snackbars
* feat: add error handling and show error on snackbar
* chore: tweaks to syntax
* refactor: abstract out the details
* fix: check for null explicitly
* refactor: use hidden instead of assigning a var
* feat: update the logic for hiding adn unhidng a tag on /tags
* feat: update the logic for hiding and unhidng a tag on /dashboard/following_tags|hidden_tags
* spec: update the tests for the /tags dashboard
* spec: removes the nav item count spec
* Try suppressing all negative-follow tags
* userData isn't always available
* Bolster test coverage for tag filter scenarios
* Antitags for the non-basic 'strategy'
* Rename antitags -> hidden_tags
* Rename 'anti_tags' -> 'hidden_tags' as well
* Use userData.followed_tags to derive hidden_tags
* feat: remove updated weights
* feat: click on following on the following tags page
* feat: add and listen for the following button click
* fix: dropdowns
* feat: handle hide button click
* feat: update the nav link for following tags
* feat: handel the 'unhide button' on the hidden tags page
* feat: add the styling for the buttons
* feat: add localization
* feat: remove the brand from the card
* feat: add some styling to the page
* feat: init scrolling
* chore: update the name of the file
* feat: abstract out the comment fetch code
* fix: close the attribute
* feta: make some adjustments to where the tag adn the follow show up
* rename class from plural to singular
* feat: updae the comment
* feat: add a mutation observer to initialize the dropdown
* test: follow_craete
* chore: remove irrelevant test
* feat: update the cypress seeds
* feat: update the cypress seeds
* spec: write soem initial tests for the following tags page
* spec: update the unfollow cypress spec
* spec: update the hide cypress spec
* spec: update the posts published spec
* note to add test for pagination
* spec: hidden tags page
* feat: remove aria pressed attributes
* fix: ordering by explicit points gets the page params confused and returns the incorrect and not all results on pagination
* fix: use explicit points
* feat: remove the message at the top of the following and hidden tags page
* chore: remove comment and rather add it to the PR itself
* refactor: do all the actions on success
* feat: refactor the dashboard tag file
* refactor: only show the tagId and followId dataset attributes on the dashboard__tag__container
* feat: disconnect the observer
* chore: add some documentation
* feat: add fr localization
* chore: empty line
* fix: update the dashboardTags page to first declare the observer"
"
"
* fix: update the rails test
* Empty commit
* fix: because I added more tags, the dropdown was longre and covering the body of the editor hence it could not find the text, so I've escaped after selecting my tags
* Basic add remove functionality with few tests
* Updated cypress test and added more unit tests
* Rename display ads vars in the views (#19877)
* Renamed display_ads vars to billboards
* Rename local vars in the feed view
* Renamed display-ad in the comment
Co-authored-by: Rajat Talesra <rajattalesra4914@gmail.com>
* Renamed variables in the views
---------
Co-authored-by: Rajat Talesra <rajattalesra4914@gmail.com>
* Update js-routes to version 2.2.7 (#19883)
Co-authored-by: depfu[bot] <23717796+depfu[bot]@users.noreply.github.com>
* add field for billboard target geolocations, with unit and e2e tests (#19855)
Co-authored-by: depfu[bot] <23717796+depfu[bot]@users.noreply.github.com>
Co-authored-by: Duke Greene <dukegreene@gmail.com>
Co-authored-by: PJ <pj@forem.com>
Co-authored-by: Anna Buianova <lightallloy@gmail.com>
Co-authored-by: Mac Siri <mac@forem.com>
Co-authored-by: zhangted <tedcbook@gmail.com>
Co-authored-by: Josh Klar <jklar@forem.com>
* Added autocomplete value off (#19882)
* Bust cache of organization page when new member is added (#19861)
* Remove unused freezeScrolling (#19808)
* Remove unused freezeScrolling
* chore: try see if this helps to skip the flakey test that wasn't being skipped
* chore: try see if this helps to skip the flakey test that wasn't being skipped
* oops: revert the gemfile changes
---------
Co-authored-by: Mai Irie <mai@forem.com>
Co-authored-by: Mac Siri <mac@forem.com>
Co-authored-by: Ridhwana <ridhwana.khan16@gmail.com>
* ci: Allow workflow_dispatch runs to log in to GHCR. (#19885)
* ci: Fix base image builder... the right way... (#19889)
* Update postcss to version 8.4.27 (#19888)
Co-authored-by: depfu[bot] <23717796+depfu[bot]@users.noreply.github.com>
* Replace uses of toBeDefined with toExist (#19862)
* Replaced toBeDefined with toExist
* Revert db changes
* Rename display ads to billboards: css and js code (#19887)
* Renamed js vars/css names
* Renamed display_ads to billboards in js functions, variables, components
* [ruby] Update sidekiq-unique-jobs 7.1.29 → 7.1.30 (patch) (#19902)
Co-authored-by: depfu[bot] <23717796+depfu[bot]@users.noreply.github.com>
* Update oj to version 3.15.1 (#19901)
Co-authored-by: depfu[bot] <23717796+depfu[bot]@users.noreply.github.com>
* Updated failing cypress test
* Removed commented code
* Attempt at fixing tests
* Fixed failing tests
* Added more tests
* Basic color and design changes part -1
* Disable/Enable buttons correctly
* Various design updates in Tag adjustement mod UI
* I18N and documentation
* Updated mod panel
* Fixed mod related cypress tests
* Minor design fixes
* Dark mode designs
* Test update
* Mod UI with some bugs
* Updated/simplified code fully-working
* Updated tests
* Added more tests
* Accessibility improvements
* hr line code fix
* Close mod icon bug fix
* Nit fixes
* Design fixes as suggested by Anuj.
* Design fixes
* Dark mode file usage
* Design fixes
* Nit fixes
---------
Co-authored-by: Anna Buianova <lightallloy@gmail.com>
Co-authored-by: depfu[bot] <23717796+depfu[bot]@users.noreply.github.com>
Co-authored-by: Duke Greene <dukegreene@gmail.com>
Co-authored-by: PJ <pj@forem.com>
Co-authored-by: Mac Siri <mac@forem.com>
Co-authored-by: zhangted <tedcbook@gmail.com>
Co-authored-by: Josh Klar <jklar@forem.com>
Co-authored-by: Joshua Wehner <joshua@forem.com>
Co-authored-by: Mai Irie <mai@forem.com>
Co-authored-by: Ridhwana <ridhwana.khan16@gmail.com>
* Renamed display ad variables and descriptions in tests
* Renamed api docs display_ads => billboards
* Updated billboard cypress seeds
* Fixed api billboards specs
* Update db/schema.rb
Co-authored-by: Duke Greene <dukegreene@gmail.com>
---------
Co-authored-by: Ben Halpern <bendhalpern@gmail.com>
Co-authored-by: Duke Greene <dukegreene@gmail.com>
* Renamed locale keys and ui language display_ads => billboards
* Revert locale and role name for display ad roles
* Revert locales related to locales to DisplayAd
* Fixed billboards cypress test
* use HTTP_CLIENT_GEO in billboards show action
* limit targeting to signed in users
* re-add cypress test
* simplify billboards request spec
* fix header problems hopefully?
* whoops
* Squash filleduchaos/caching-billboards-by-location
* export ISO 3166-2 regions
* wip
* remove ISO 3166-2 regions
* finally, a VCL config that...works?
* update billboard controller & specs
* fix specs
* clean up and document VCL some more
* remove vcl_init sub
* remove billboard fragment caching
* feat: remove the top card color branding
* feat: update the heading
* feat: remove the rotation on the badge
* feat: remove rotation and justify-between the badge
* feat: add number_with_delimiter to the tag count
* feat: change the follow button to be 'primary'
* feat: add a flex column so that the buttons row sticks to the card bottom
* feat: add the posts to the right hand side on the header
* refactor: move the styles to teh css page
* feat: spacing
* fix: tests
* fix: test
* Exclude Page from ReservedWords checks (#19853)
* 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>
* Renamed leftover @hero_display_ad => @hero_billboard (#19874)
* Reorganize devDependencies & revert strong_migrations (#19870)
* ruby: Upgrade to v3.1.4 (pt. 1, base image only) (#19871)
In #19776 we discovered that basing both the base container *and* the
app container off of `.ruby-version` causes a chicken-and-egg problem
wherein upgrading Ruby versions requires a few stop-and-gos. Let's make
those stops reviewable as separate chunks instead: use a new
`.ruby-version-next` for building base images, not the `.ruby-version`,
thus allowing GitHub Actions to fire off an automated build (which, when
complete, we can take the SHA sum from and use it to open a second PR
updating the app image to use it, and `.ruby-version` can be updated to
match `.ruby-version-next`).
* feat: add the bullet unused_eager_loading query
* feta: update the seeds
* feat: add a smaller gap and make the grid-col 4 on large screens
* feat: do not let the button take the height of the container
* sway the search with the following tags
* feat: keep the description at font size 14px
* tweak elements to ensure an ideal card height of 195px
---------
Co-authored-by: Mac Siri <mac@forem.com>
Co-authored-by: zhangted <tedcbook@gmail.com>
Co-authored-by: PJ <pj@forem.com>
Co-authored-by: Anna Buianova <lightallloy@gmail.com>
Co-authored-by: Josh Klar <jklar@forem.com>
Co-authored-by: Duke Greene <dukegreene@gmail.com>
* refactor: make verifyAndDismissFlashMessage to be more general
* feat: update the shared admin utility
* refactor: manageCredits
* refactor: manageOrganizations
* refactor: manageRoles
* refactor: manageUserOptions
* feat: remove adminUtilities
* chore: update the path name
* Bulk Assign Roles UI
* Renaming roles to role
* Added role to multiple users without using note.
* Role note added
* Role blank key fix
* Removed roles
* typo fix
* AuditLog Added
* Optimising code
* Good standing role issue
* Good standing role issue fix
* Minor PR changes based on review
* Added cypress tests
* Added spec tests for BulkAssignRole
* Minor fixes
* 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
* Created separate comments page
* Optimised code for single comment and multiple comments
* Indifual comments poage added
* Minor header change
* Created show method
* Full implementation with eager loading error
* Temporarily suppress Bullet from Admin::CommentsController
* Minor fixes
* Minor fixes
* Added table
* Added french translations
* Added reaction stats / summary
* Tests added fore empty comments
* Added seed data and few more tests
* Updated test
* Added model tests for comment and article
* Nit test fix
* Applied changes as per PJ's review
---------
Co-authored-by: Joshua Wehner <joshua@forem.com>
* Skips scheduled posts in featured post count
* Allows removing super_admin role
* adds namespace resolution op
* Adds pundit policy
* Adds rspec for role policy
* Fixes test cases and minor refactoring
* Removes dead code
---------
Co-authored-by: Lawrence <lawrence@forem.com>
* 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
* 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