* Sort comments in articles page
* Clickable area in sort comments article is now more approriate
* Comments subtitle is now responsive in articles page
* Consider comments sort order for cache in articles page
* On selecting sort option the refreshed page lands to comments section
* Revise system specs for viewing a comment
* Add system specs for viewing comment date
* Add conditional to SetTimeZone middleware
* Revise comment_date partial
* Refactor viewing a comment system specs
* Add more system specs for viewing a comment
* Fix format of comment date with short year
* Fix edited comment date
* Fix comment date when posting new comments
* feat: add a migration that creates a display_to column on the display_ads table
* feat: add an enum for display_to
* feat/WIP: add rough draft of the field to the UI and permit it in the controller
* feat: take into account on whether an ad needs to be shown on logged in or out or both + update cache keys on sign in
* fix: if a user is not signed in then we want to display all and logged out
* fix: display_for spec in model
* feat: add some tests for display_to
* feat: style the label
* feat: show the display_to on the index page
* feat: add a seed for e2e
* chore: force true
* feat: create a migration to add the display ad name column to the tanle
* feat: add a display ad name to the interface
* feat: add a display ad name after create
* feat: whoops the migration file
* feat: add a DUS to update previous Display Ads names
* fix: test
* refactor: update the name after_save
* fix: add name to params
* add ENV["API_PER_PAGE_LIMIT"]
* cast to int
* add private_constant PER_PAGE_MAX
* use 1000 int
* typo
* use reduced count for ListingsController
* typo
* set max/default in ArticleApiIndexService
* update initializer in ArticleApiIndexService
* Update app/controllers/concerns/api/articles_controller.rb
Co-authored-by: Fernando Valverde <fernando@visualcosita.com>
* Apply suggestions from code review
Co-authored-by: Fernando Valverde <fernando@visualcosita.com>
* update API docs
Co-authored-by: Fernando Valverde <fernando@visualcosita.com>
* Try an idempotentish reaction create API
* Add tests for create API endpoint
* Try -> ReactionHandler
* Fix existing tests first
* Tests for .toggle; fix broken handle_existing
* Use the Handler
* Tweak http status for reaction create
* Use the category reader
Co-authored-by: Ridhwana <Ridhwana.Khan16@gmail.com>
Co-authored-by: Ridhwana <Ridhwana.Khan16@gmail.com>
* Don't change published_at for articles that have already been published (even if unpublished later)
* Removed unused code related to changing published_at
* Added specs for updating published_from_feed articles, fixed specs
* Removed old validation
* Added specs for article validation published_from_feed
* Added and reorganized specs for the Article model (setting published_at)
* Remove the commented code, added a spec
* Added specs for unpublishing
* Removed unused update_published_at from article attributes spec
* Fixed nullifying published_at seconds when republishing from rich editor
* Adds a DUS to backfill community_emoji for Forems that have one
* Adds a DUS spec to test backfilling community names
* update the script adn the tests to allow us to change the community name
* feat: add a stub for the community name
* feat: generate a later timestamp so that it doesnt cause confusion
* chcek if the emoji already appears in the community name
* feat: remove community emoji from displaying on the UI
* refactor:remove the else if completely
Co-authored-by: Ridhwana <ridhwana.khan16@gmail.com>
* Extract reaction create from controller to service
* Success is having no errors
* Confirm http status successful
* V1 API endpoint for Create Reaction
* Actually reset cache count
* Tweak JSON response
* Reaction create -> toggle
* Try rswagger docs for reaction toggle
* Extract reaction create from controller to service
* Success is having no errors
* Confirm http status successful
* rename var to be moreclear
* feat: existing reaction param
* refactor: reaction services
* fix: the mod actions need to be run irrespective of whether we have an existing reaction or not
* refactor: notifications and use the sink_articles
* refactor: rename destroy_previous_mod_reactions to be more accurately named
* chore: move methods further up
* refactor: returning destroy does not make sense
* chore: re-order some methods
* chore: remove comment
Co-authored-by: Joshua Wehner <joshua@forem.com>