* 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'
* 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
* show tag moderators in descending badge count order
* show organization users in descending badge count order
* specs & docs for find_each_respecting_scope
* Fix the org post count issue
* Add regression specs
* Move things around and sort them better
* Implement PR review
* Revert accidental changes
---------
Co-authored-by: Mac Siri <mac@forem.com>
* feat: add a route to the async_info for display ads
* feat: load the billboard asyncronously
* feat: move the methods to the display_ads controller
* feat: handle params better
* feat: cache control headers
* feat: test fastly caching headers on display ads
* fix: surrogate key test
* feat: use safe navigation operator to handle cases where there is no article id
* fix: article id present then find the article
* feat: add a response test
* Fragment caching
* feat: update the article decorator
* feat: update cache keys for fragment
* feat: remove an empty line
* feat: add article id
* feat: bust cache
* feat: setup dropdown for billboard
* chore: add chunk to same line
* feat: add to safe params for caching
* Update app/controllers/display_ads_controller.rb
Co-authored-by: Joshua Wehner <joshua@forem.com>
* feat: remove the cache deletion
* feat: update the routes to follow a new scope
* feat: update the cache params
---------
Co-authored-by: Joshua Wehner <joshua@forem.com>
* Ensure spam doesn't hit logged-out /latest
* Restore load-bearing constant
* Narrow selector avoids the new 'latest' banner
* Test scenario for signed-in low-score content
* Remove false-negative test
* Actual test for the logged-in scenario
* Signed-in users get poor quality content
* Feeds (RSS) use an entirely different query
* Pass @stories
* Update tests with new minimum score
* Basic implementation of CTA in place of Recent Comments
* Updated & Added Tests
* Nit fix
* Test fixes
* I18n strings
* Changed UI in main feed too
* Fixed tests
* Nit fix
* Initialised tracking
* Try hiding low-quality comments
* Message indicating when negative comments are being hidden
* Adjust comment show count for logged-out visitors
* Remove unusued comments_to_show_count from article decorator
* Remove unusued comments_to_show_count from podcast episode decorator
* Add test for hidden negative comment
* Update spec/system/articles/user_visits_an_article_spec.rb
Co-authored-by: Fernando Valverde <fernando@fdo.cr>
* Don't create twice; do test logged-in and -out
* Comment caching needs to account for signed-in status
Co-authored-by: Fernando Valverde <fernando@fdo.cr>
* Comment fragment link when signed out
* Optional chaining for article path
* Fix comment liquid tag rendering
* Extract signed in/out logic into helper
* Debugging specs
* Fix specs
* Use named empty anchor to link comments with id_code
* refactor: move trackEvents to a utilities folder so that it can be re-used
* feat: add a function called trackCommentClicks and use it on the articlePage
* feat: update the auth widget to take the correct properties
* feat: add create account tracking method for hamburger
* feat: add create account tracking method for sidebar left
* feat: whoops, sidebar tracking info added
* feat: add the feed card create account tracking
* feat: whoops add the id to the dom
* feat: add top nav create account tracking
* feat: create account tracking for the registration modal
* fix: callback instead of invoking + rename class
* fix: js-prepend
* feat: some showLogin event tracking
* use the tracking propert
* x - feed.jsx
* fix: oops I removed hidden
* track from the search login
* feat: add tracking for follow button
* fix: main_stories is only being called in view/articles and both are including the FollowButtons pack
* comments track
* feat: remove punc (.)
* chore: cahnge working
* chore: remove tracking-id from modal
* feat: remove ecmascript features
* refactor: rename some events
* feat: referrer page
* feat: add a secondary source for the follow buttons
* feat: remove file that is not used
* chore: rename key
* feat: use @utilities
* feat: add spec for create account clicks
* feat: add key referrer
* fix: tests
* fix: oops
* chore: add commented test
* test for tracking
* feat: update the change by 1
* feat: aggregate_failures
* feat: add data-no-instant back
* feat: try a different way of testing
* refactor: change secondary_source to referring_souce
* feat: change ahoy event test
* feat: add a version number to ahoy tracking
* feat: change the href to pathname
* feat: reply comment tracking
* fix: to be present syntax
* feat: use href instead of pathname
* chore: do not track tags and podcasts follow and remove referrer
* feat: add readinglist
* fix: remove referrer from test
* feat: fail gracefully in instances where there is no tracking data
* 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
* Allow published_at to be within 15 minutes, not 15 hours
* Fixed creating past articles in the specs
* Fixed one more spec with a past article
* Use ActiveSupport's helper instead of computation
Co-authored-by: Fernando Valverde <fernando@fdo.cr>
Co-authored-by: Fernando Valverde <fernando@fdo.cr>
* add new column with enum value
* refactor to use display_to column
* add some more specs to application_helper
* test for the backfill DUS
* fix line length
* refactor
* Article query spec for scheduled articles
* Added scheduled article badge on the user dashboard
* Added published_at field to editor options
* Accept and validate published_at from editor
* Refactor published_at validation
* Allow 1-minute difference in published_at
* Notice on an unpublished article page
* Added specs for 'Click to edit' link on scheduled article preview page
* ContextNotification model
* Articles::Publish worker
* Added specs for articles publish worker
* Schedule publish articles worker
* Added tests to check for scheduled posts in feeds
* Don't allow managing scheduled articles
* Don't send notifications for scheduled articles
* Set published_at in Articles::Updater when publishing
* Published_at value in post options
* Pass timezone and set published_at accordingly
* Limit setting published_at to the future
* Readonly published_at for articles that were already published
* Chagning published_at format in editor v1 (start)
* Changed published_at format in frontmatter, specs
* Added specs for updating published_at from frontmatter
* Fixed accepting past published_at for articles published_from_feed
* Enabled published_at validation: don't allow updating published_at for already published articles
* Validate published_at on create
* Added a spec for updating published_at for exported articles
* Fixed specs related to creating articles with past published_at
* Fixed specs related to past published_at for articles
* Added a hack so that admins would be able to update published_at
* Switch button text schedule/publish when changin publishedAt
* Fixed saving published_at with timezone
* Added a feature flag for scheduling articles
* Default text in markdown editor depends on feature flag
* Enable article editor cache again
* Fixed the default value in the markdown editor
* Fix sitemaps spec
* Removed tooltip
* Fixed articles update specs
* Added missing locales
* Fixed article create specs
* Fixed spec
* Removed commented code
* Returned enabling extensions in the schema
* Returned accidentally deleted constraint
* Make articles query spec more stable
Co-authored-by: Jeremy Friesen <jeremy.n.friesen@gmail.com>
* Removed commented code
* Removed unused code
* A clearer policy
Co-authored-by: Jeremy Friesen <jeremy.n.friesen@gmail.com>
* Use StringInquirer for article current state
* Added a note and todo to articles factory past trait
* Remove duplicated PropType
Co-authored-by: Suzanne Aitchison <suzanne@forem.com>
* Refactor query in the Articles::PublishWorker
Co-authored-by: Mac Siri <krairit.siri@gmail.com>
* Refactor articleForm.jsx
Co-authored-by: Mac Siri <krairit.siri@gmail.com>
* Removed specs that are no longer relevant
* Removed useless onKeyUp on a hidden input
* Refactored articleForm
* Hide scheduling from post options when published_at is readonly
* Run sends notifications worker every 5 minutes instead of every minute
Co-authored-by: Jeremy Friesen <jeremy.n.friesen@gmail.com>
Co-authored-by: Suzanne Aitchison <suzanne@forem.com>
Co-authored-by: Mac Siri <krairit.siri@gmail.com>
* target modal content by a classname to avoid duplicate IDs
* woops - fix missed selector
* use showWindowModal in editUser
* move add org to a partial
* move add role into a partial
* move adjust credits to a partial
* move profile modals to be re-used
* generalise approach to add organisation modal
* generalise add role modal form
* generalise adjust credits modal
* rework unpublish modal
* refactor banish user modal
* refactors
* prevent issues with duplicate ids
* fix banish form action
* make sure role management specs covered in cypress
* let hidden modal content use IDs
* rename file for clarity
* add some JSDoc notes
* cleanup some redundant changes
* one more
* woops - fixed id that contained a classname
Prior to this commit, if the Forem limitted article creation only to
admins, when a new user would sign-up their call to action was to
"Create a Post". If that new user clicked on the button, they would get
an action unauthorized error.
With this commit, the call to action for Creating a Post is hidden to
that user.
The `users/onboardings/_task_card.html.erb` is rendered as part of the
home page. The home page, due to our [EdgeCacheSafetyCheck][1], does not
allow us to access attributes of the current user (e.g. are they an
admin); which means we can't add a `if policy(Article).create` to the
HTML erb. We must instead use the [`application_policy_content_tag`][2]
as well as the [AsyncInfo][3] to help inform the
[applyApplicationPolicyToggles.js pack][4] of the conditional rendering.
Closesforem/forem#17638
Related to forem/forem-internal-eng#347
[1]:8160089f3d/app/controllers/concerns/edge_cache_safety_check.rb
[2]:8160089f3d/app/helpers/application_helper.rb (L390)
[3]:8160089f3d/app/models/async_info.rb (L52-L61)
[4]:8160089f3d/app/javascript/packs/applyApplicationPolicyToggles.js
* remove name from invite user flow
* remove name from invitation instructions
* update invitations spec
* update specs and invitation actions overflow menu name
* allow users to set name when accepting invite
* fix duplicate ID main nav
* fix duplicate ID other nav headings
* fix duplicate ID reading list count
* fix duplicate attribute class
* missing case readingCountList on feed
* missing dot in query selector
* Revert "fix duplicate ID other nav headings"
This reverts commit 4f495962c47e08f0f6c41e33e897b2db176432f5.
* use generic class 'other-nav' for tests
* pass a variable 'context' to the partial nav
* pass var 'context' to partial
* fix unwanted typo in partial sidebar
* Update app/views/admin/navigation_links/index.html.erb
Co-authored-by: Suzanne Aitchison <suzanne@forem.com>
* Update app/assets/javascripts/initializers/initializeReadingListIcons.js
Co-authored-by: Suzanne Aitchison <suzanne@forem.com>
* Update app/assets/javascripts/initializers/initializeReadingListIcons.js
Co-authored-by: Suzanne Aitchison <suzanne@forem.com>
* js-reading-list-count renaming
* use data-testid instead of generic classes for tests
* fix typo in specs
Co-authored-by: Suzanne Aitchison <suzanne@forem.com>
This test had been failing with "title can't be blank" a few times
recently. Looking for a difference between the v2 form template (in
app/views/articles) and the ArticleForm component (in
app/javascript/article-form/) showed there is an id on the js form but
not the erb/html form we respond with first.
The test had been sometimes typing the title into the text area before
the component mounts, and trying to view the article gives a
validation error rather than the expected response.