* 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 display ad variables and constants
* Renamed display_ads associations
* Fixed variable name in display ads
* Renamed display_ads variables in views
* Fixed admin billboard view spec
* Fixed variable name in FilteredAdsQuery
* add migrations
* add countries gem?
* first pass at location model
* specs ✨
* add location to filtered ads query
* feature flag and nicer errors
* cosmetic fixes
* more tweaks (remove unnecessary index, add initializer)
* 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 logic in the user profile
* feat: remove use case for banished user
* feat: update has_no_content? to has_no_accessible_content? and write a test
* spec: write more tests
* refactor: rename variable
* refactor: small tweaks
---------
Co-authored-by: Philip How <philip.j.how@gmail.com>
* render left sidebar billboards ('display ads') asynchronously
* remove request spec expectations for ads that are now rendered async
* don't set up path helper for old name style
* refactor from global to imported observeDisplayAds call
* revert refactor attempt, bad export syntax, may fast follow
* api v1 endpoint for creating an organization
* address failing specs, regenerate swagger docs
* remove old comment in destroy now that woreker call takes third argument
* refactor our services for profile images into images folder
* define api routes and create controllers, sketch out index and create actions
* add api v1 organizations CRUD spec and docs spec, need to run swagger
* swagger dry run on admin organizations routes, typo fix in api.rb
* flesh out specs and sketch out admin actions
* move actions out of concerns/include pattern and into v1 inline
* remove private constant call
* add v1 accept header to doc spec, fix syntax in a before block
* update controllers to address failing specs
* simplify controller and clarify route config
* flesh out tests for errors
* fix long line
* add missing commas
* return username show route to v0 concern controller
* create separate show route and action name, remove nesting from create/update params requirement
* clean up syntax in controller params and update show path in specs; move routes
* fix up syntax in params permit
* create organization in index spec
* one more syntax tweak for org params
* refactoring to one show route that handles username or id
* tweak spec syntax to expect the right array
* tweak controller and specs, simplify routing to show
* remove create route, action, and specs from this branch
* add clarifying comment in show controller action
* add explicit not found return to show route
* fix controller formatting causing 404 errors
* remove comment, update specs
* remove commment and fix id show response and specs
* fix show route and request spec for username param
* update unauthorized user specs to use put for now instead of post, regenerate swagger docs
* adjust update 422 spec to break org validity
* fix admin update spec, rerun swagger
* reorganiza controller actions, update specs, ensure authorized update and delete
* improve spec, handle finding one org more gracefully, delete via worker
* copy routes into api namespace instead of moving them from general namespace
* update param in v0 show route to fit more general naming
* regenerate v1 swagger docs
* use profile image url getter in update controller response
* update swagger docs and remove unneeded comment from org' model
* configure organizations destroy action for super admins only (for now)
* 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
* Try to mitigate flaky spec by clearing mock space
* Fix for flaky article published spec
* Rubocop
* Tidy up the specs a bit, update the comment
* Modernize article factory (thanks, rubocop)
* Update update spec to use factory
* Use PublishWorker instead of callback
* nth_published_at -> from_newish_author
* Separate published/unpublished specs
* published_at is correct if unchanged
* Add spec for scheduled post
* Subscribing to notifications should bust caches
* Unsubscribing to notifications should bust caches
* 'Normal' subscription toggle should also bust caches
* Cache busting can work with object or identifier
* Delete cached notification views for article and comment
* Simplify guard clauses
* And update the test expectation
* 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>