* Remove Connect
* Remove more Connect specs
* Remove a lot more Connect code
* 🚮
* It all has to go
* Explicitly add httpclient
* Update application layout
* Remove messages association from User
* Start fixing specs
* reintroduce util function and refactor references
* Remove Connect Cypress test
* Fix more specs
* Remove Connect from listings
* Ignore contact_via_connect column on listings
* Remove contact_via_connect usages
* Ignore mod_chat_channel_id on tags
* Drop Connect tables
* Remove email_connect_messages from user notification settings
* Re-add httpclient 2.8.3
This was mistakenly removed as a merge conflict
* Don't need to exclude removed chat channel file
* Remove unneeded style for chat channels
* Remove unneeded channel list prop type
* Remove chat channels index/connect-link from getPageEntries
* Re-add comment from httpclient in Gemfile
* Remove connect references from mailers
Tag Moderators no longer have a chat channel
No longer will users be notified about new messages (there won't be
any)
No longer will users be notified about channel invites (you can't
invite anyone anymore)
* Don't configure Pusher and remove PUSHER_* from .env_sample
since it's removed from gemfile, the Pusher constant will not resolve, if this is
configured in the environment variables we'll fail to boot.
Co-authored-by: Suzanne Aitchison <suzanne@forem.com>
Co-authored-by: Dan Uber <dan@forem.com>
* Refactoring and extending article spam behavior
Prior to this refactor, we were checking an Article's title for
spaminess. This change now checks the Article's title and
body_markdown.
In addition, the encapsulates the regular expression implementations in
favor of asking the Settings::RateLimit class to determine if the passed
in text is "spammy".
Furthermore, instead of having lots of inline logic within the article,
this refactor introduces a `Spam::ArticleHandler` class. This helps
tidy up the already busy Article specs by delegating the business logic
of Spam handling to it's own class.
There are further refactors for Comments and Users that would follow
this pattern, but this change is more important to get out the door.
Closes#15396
* Adding comments to clarify behavior of spam handling
* Adding missing expectation to spec
* Removes the 'Setup not complete' banner from the Creator Onboarding flow
* Chains the safe navigation operator to current_user in #creator_setup_mode?
* Replaces current_user with User.with_role(:creator) in creator_setup_mode?
* Checks for URL rather than path helper in #creator_setup_path?
* Consistently remove setup banner on the creator settings form
* Reverts changes to verify_setup_complete.rb
* Adds a setup-banner ID for removal of the gobal setup banner
* Replaces Rspec test with creatorSettings E2E test
* Wraps setup text in regex in creatorSettings.js.spec
* Moving blocked registration domains up
Prior to this commit, the field "worked" but you had to toggle email
authentication to enabled, then fill it out. You could then disable
email notification and it would work.
This builds on #15397
* Update app/views/admin/settings/forms/_authentication.html.erb
Co-authored-by: Suzanne Aitchison <suzanne@forem.com>
Co-authored-by: Suzanne Aitchison <suzanne@forem.com>
Prior to this commit, we had filtering options for email registration:
1. Specific allowed domains.
2. Implicitly allow all domains if no allowed domains specified.
With this commit, we add another option: The adminstrator may block one
or more domains from registering.
Closesforem/rfcs#281
This commit removes a handful of magic numbers and instead relies on a
constant.
This has a small impact in that the Basic feed will now return 50
articles instead of 25. However, normalizing the feed pagination window
size helps reduce some oddities in reporting.
In addition, this might be something we consider giving administrators
the ability to set (with default options, because we shouldn't allow
page sizes of 10_000 as that's a massive memory hog).
Related to #14709
Don't allow passing `tag[name]=` in post params to admin tag update.
There's no field for this in the view, it's not expected that someone
change the name (it serves as a natural key) - it's preferrable to
alias an old name to a new tag if a renaming is desired.
* Nullify invalid tag colors
Set bg_color_hex and text_color_hex to nil when they were an empty
string.
This is a cleanup of legacy data (from form submissions, when the
field was unset and another attribute was updated, the value could be
saved as '' rather than set nil). This is no longer possible due to
validations added in #10495 so only needs to be handled once.
Prior to this commit, this instantiation of `Redcarpet::Markdown` was
different from the other instantiations. The other ones all included
the second paramenter (e.g., `Constants::Redcarpet::CONFIG`).
My question is, should we (or can we) be using the same configuration in
all cases?
* Add a failing test for comments index of deleted article
After https://github.com/forem/forem/pull/15052 removed the (also
broken) deleted commentable template and the redirect, requests for
comments from deleted articles raise no method errors (initially
trying to set the page title to "Comments for commentable.title" but
the assumption that @commentable is non-nil is present in several
other places.
This test currently fails (by design). Either we want to update the
controller so that comments from deleted articles are no longer
viewable (returning not found, as we did prior to
https://github.com/forem/forem/pull/5199 or making the view safe for
the case where @commentable is nil and no @root_comment is present.
These requests are happening quite frequently (@maestromac and I
suspect the sitemap may contain these pages and crawlers are visiting
the site from a published link), as evidenced by
https://app.honeybadger.io/projects/66984/faults/81994265
* Add request spec for deleted article scenario
Additionally, relabel the legacy spec (updated during #15052) to
clarify we do not render the deleted_commentable_comment view (this is
testing the comment.path, rather than the article.path/comments index
The scenario with comment.path sets `@root_comment` in the controller,
so does not trigger errors on the `@commentable` method calls.
* Update view
pass 1: get the errors to stop (need to check the rendered page is
also usable, the comment tree is not shown when commentable is nil and
this might be a huge usability/correctness issue).
* extract logic from comments index to methods and update tests
We no longer expect deleted article's comments index to render (should
return 404), only direct links to comments of deleted articles.
Only assign @article in the index for the view if it is in fact an
article (not a podcast episode, it's possible `@root_comment` was for
a podcast episode).
* remove unneeded (and soon to be incorrect spec)
No longer want or need to test for the case where root comment is nil
and so is commentable. This was an exploratory spec (scaffolding) and
can be removed.
* Undo nil safety changes to comments index
and fix typo in comments spec
* Adds a help icon to the creator settings setup page
* Moves the help icon styles from the a tag to the inline_svg_tag
* Removes reused class and aligns help icon to the right
* Refactors help icon out into a partial used across necessary views
* Moves .admin-help-button class from admin.scss to scaffolds.scss
* Adds further utility classes to align help icon as expected
* fix: closing divs and alignments
* fix: closing divs, alignments and add z-elevate
* refactor: remove the confirm email css annd add it to setup_mode
* improve mobile responsiveness
* feat: redirect directly to the new_admin_creator_setting_path from the confirmation email adn the signup
* feat: update the test to no longer show the referral which seems no longer relevant
* fix: update the tests to conform to the new URLS
* update the link
* Dark Theme preference is a user setting and not delegated
Resolves NoMethodError
* Add a view spec
This ensures the /credits/purchase page is rendered
* Test both styles based on user setting
Add an actual expectation to the view test
* views/stories and home related i18n
* PR key names fixes
* remove ja.yml
* Update en.yml
* Update fr.yml
* Update articles_search_spec.rb
* Update _meta.html.erb
* Update index.html.erb
* Update _meta.html.erb
* Update articles_search_spec.rb
text in HTML should not contain raw brackets
* Update articles_search_spec.rb
* Update _signup_modal.html.erb
* Add back missing Search text
Co-authored-by: Fernando Valverde <fernando@visualcosita.com>
* WIP - main formatters with undo syntax
* tests for new text area utils
* WIP: formatters undoing and formatting, tests to follow
* small tweak
* WIP - tweaks to heading
* add heading level tests
* refactor link formatting into separate functions, flesh out tests
* add missing test case, adjust link undo
Because of the way the the scripts to run works, there's always
already a script with this file name by the time this starts.
Remove the guard clause and let it run.
* fix: closing divs and alignments
* fix: closing divs, alignments and add z-elevate
* refactor: remove the confirm email css annd add it to setup_mode
* improve mobile responsiveness