Commit graph

10263 commits

Author SHA1 Message Date
dependabot[bot]
770e55bd87
Bump solargraph from 0.44.1 to 0.44.2 (#15495)
Bumps [solargraph](https://github.com/castwide/solargraph) from 0.44.1 to 0.44.2.
- [Release notes](https://github.com/castwide/solargraph/releases)
- [Changelog](https://github.com/castwide/solargraph/blob/master/CHANGELOG.md)
- [Commits](https://github.com/castwide/solargraph/compare/v0.44.1...v0.44.2)

---
updated-dependencies:
- dependency-name: solargraph
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-11-29 07:10:05 -07:00
dependabot[bot]
9e27f2c454
Bump bootsnap from 1.9.1 to 1.9.3 (#15491)
Bumps [bootsnap](https://github.com/Shopify/bootsnap) from 1.9.1 to 1.9.3.
- [Release notes](https://github.com/Shopify/bootsnap/releases)
- [Changelog](https://github.com/Shopify/bootsnap/blob/master/CHANGELOG.md)
- [Commits](https://github.com/Shopify/bootsnap/compare/v1.9.1...v1.9.3)

---
updated-dependencies:
- dependency-name: bootsnap
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-11-29 07:09:42 -07:00
Suzanne Aitchison
03660423b9
Rename feeds + update feeds' tabs UI (#15435)
* Rename feeds + update feeds' tabs UI

* rspec updates

* change relevance to relevant
2021-11-29 07:51:24 +00:00
Suzanne Aitchison
d0dea2228c
Add markdown toolbar to V2 editor (#15347)
* initial add of toolbar to v2 editor WIP

* fix Form test knocked out by rebase

* basic image upload functionality added to toolbar

* add cypress tests for toolbar

* move image tests to previous cypress spec

* test markdown insertion from buttons in jest

* small tidy up

* remove right padding in scrollable layout, hide scrollbar

* update tests following new line changes

* add more doc comments

* tweak padding css

* create constant for image placeholder

* add image uploader change missed in staging after merge conflict resolution
2021-11-29 07:50:17 +00:00
Jeremy Friesen
be97f2fc07
Favoring dependent: :delete_all over :destroy (#15442)
* Favoring dependent: :delete_all over :destroy

The `dependent: :destroy` callback is slower than `dependent: :delete`
and `dependent: :delete_all`.  We need only favor the `dependent:
:destroy` when there's callbacks that happen.

In the case of :destroy, ActiveRecord instantiates each object and then
runs destroy.  Whereas in the case of :delete, ActiveRecord issues a SQL
command to delete the related files.

It is often "safer" to use :destroy, as it guarantees that you'll
instantiate the record and run it's callbacks.  But sometimes you have
to go with the speed of SQL.

This relates to #14140.  Note there is still more to consider, but given
that we're looking at moving from :destroy on all of an article's page
views to :delete, we might buy enough time in the callback.

* Removing redundancy of article destroy

Prior to this commit, `before_destroy_actions` called the `bust_cache`
method which in turn called `touch_actor_latest_article_updated_at` but
`bust_cache` did not pass the destroying parameter.  Then
`before_destroy_actions` immediately called
`touch_actor_latest_article_updated_at` with `destroying: true`.

With this change, we remove one of those duplicate calls.

* Fixing specs regarding relationships

* Fixing specs regarding relationships
2021-11-24 13:56:16 -05:00
Jeremy Friesen
9df5f6af49
Ensuring reading list excludes unpublished articles (#15490)
* Ensuring reading list excludes unpublished articles

Prior to this commit, if a given user adds an article to their reading
list then the author unpublishes the article, the article remains in the
reading list.  When the given user would then "click" on the now
unpublished article, they would get a 404 Not Found notice.

With this commit, we now exclude unpublished articles from the search
results for the reading list.

This should also address the issue of attempting to archive the reading
list item (because it won't be visible in the listing).

One of the behaviors that is expected is if, in the above scenario, the
author again publishes the article, that article will again "appear" on
the reading list for the given user.

Closes #14796

* Updating documentation and adding spec

* Addressing pull request feedback

Yes, I should've used a scope!  And also, no need to test present.  Just
let it's "truthy"-ness speak for itself!

* Update spec/services/search/reading_list_spec.rb

Co-authored-by: Jamie Gaskins <jamie@forem.com>

Co-authored-by: Jamie Gaskins <jamie@forem.com>
2021-11-24 13:22:26 -05:00
Jamie Gaskins
34ad76ab1c
Automatically run DUSs in development (#15489)
robots doing things >>>>>>>>>>> robots telling humans to do things
2021-11-24 12:32:13 -05:00
Jeremy Friesen
6e275a12fc
Adding solargraph to support LSP for Ruby (#15484)
* Adding solargraph to support LSP for Ruby

[Solargraph](https://github.com/castwide/solargraph) is a Language
Server Protocol (LSP) implementation for Ruby.

LSP provides Integrated Development Environment (IDE) features.  There
are a list of plugins for various editors.

By including Solargraph, those using LSP enabled tools have a rich suite
of tools available for them.

In Emacs land I'm using lsp-mode.el.  There are plugins/extensions for
VS Code, Atom, and Vim.  (see the Solargraph URL for details).

* Further documenting solargraph

Really, just want to nudge Travis
2021-11-24 12:18:28 -05:00
Jeremy Friesen
58a4d805d7
Preventing author profile from going transparent (#15478)
* Preventing author profile from going transparent

Prior to this change, when you would hover over an author profile that
was "close to" the bottom of the page, the card would be transparent
instead of the expected opaque.

With this change, when you hover over an author profile that is "close"
to the bottom of the page, the card renders as an opaque card.

Now why does this work?  I don't really know, except to say that a
`display: table` imperative is a more "chunky" display element than a
block.  I would love for someone to explain why this works.

Tested against on MacOS Safari, Firefox, and Chrome.

https://developer.mozilla.org/en-US/docs/Web/CSS/display

Fixes #15290

* revert table

* fix

* missed spot

* actions dropdown

Co-authored-by: Paweł Ludwiczak <ludwiczakpawel@gmail.com>
2021-11-24 09:38:13 -05:00
Anna Buianova
d711897cb4
Accessibility improvements for hide comments modal (#15462) 2021-11-24 09:50:27 +03:00
Fernando Valverde
75a722bd6e
ForemMobile namespaced functions (#15212)
* window.ForemMobile namespaced functions

* Fix broken Buildkite

* Wait for data-loaded before using Runtime in pack

* Bring back sprockets base

* Better error handling

* Smal fixes to ConsumerApp to support Android platform

* Fix typo

* utilities/waitForDataLoaded.js

* Update app/javascript/utilities/waitForDataLoaded.js

Co-authored-by: Nick Taylor <nick@forem.com>

* Review feedback

* Fix failing spec

* Cleanup promise

* Remove old utility file

* Add Cypress check for namespaced availability

* More specs

* Refactor to rely on ForemMobile for native bridge messaging

* Fix spec/requests/api/v0/instances_spec.rb

* Fix devices spec

* Remove changes to /api/instance

* Refactor to dynamic import

* Fix typo

* Fixed custom event detail payload for tests.

* mock ForemMobile function instead of webkit call directly

* failing jest test debug

* Another attempt

* Fixed broken test that was missing an onMainImageUrlChange prop on the component.

* Fixed mobile bridging E2E tests.

* Move Cypress tests to mobileFlows

* Add JSDocs + cypress spec for injectJSMessage when logged out

* Cleanup + Disable native image upload until AppStore approval

Co-authored-by: Nick Taylor <nick@forem.com>
Co-authored-by: Nick Taylor <nick@dev.to>
2021-11-23 15:25:29 -06:00
Fernando Valverde
c384755bae
Enable Forem (Passport) Auth (#15141)
* Enable Forem (Passport) Auth

* Remove feature flag DUS

* Add prompt for Forem Passport in admin

* Add spec & fix broken one

* Link to docs instead of passport site
2021-11-23 14:59:00 -06:00
Julianna Tetreault
cbff6cb92f
Adjust "Public" Radio Buttons on the Creator Settings Form (#15476)
* Adjusts booleans tied to public radio buttons

* Update app/views/admin/creator_settings/_form.html.erb

Revert capitalization of "only" in "Members only"
2021-11-23 11:34:05 -07:00
Nick Taylor
d13f0ba0cb
Added the babel-inline-react-svg plugin (#15461) 2021-11-23 12:24:50 -05:00
Julianna Tetreault
f9549b8f5c
Fixes broken TOS broken link on Creator Settings form (#15466) 2021-11-23 10:17:27 -07:00
Jeremy Friesen
ee0a521a83
Favoring delete_all on user relationships (#15443)
* Favoring delete_all on user relationships

Prior to this commit, several of the user's "has_many" were marked as
`depenedent: :destroy`.

In the case of :destroy, ActiveRecord instantiates each object and then
runs destroy. Whereas in the case of :delete, ActiveRecord issues a SQL
command to delete the related files.

It is often "safer" to use :destroy, as it guarantees that you'll
instantiate the record and run it's callbacks. But sometimes you have
to go with the speed of SQL.

And while not directly related to #15424 it is representative of our
callback ecosystem creating some unexpected computational loads.

Related to #15442 and #15424

* Noting models that user no longer cascade destroys
2021-11-23 11:50:12 -05:00
Ridhwana
8060f78893
Dynamically update the brand colors (#15432)
* Added alias for app/javascript/controllers

* Added hooks for Stimulus controller.

* Fixed eslint issue with @controllers alias.

* Initial working logo preview.

* Added explicit accept values for png and svg files only for a logo.

* Fixed content layout shift issue and resize to max height 80px.

* Cleaned up logo preview resizing.

* Added focus style to Upload logo label.

* Now the logo preview image has empty alt text as it's visual only.

* Fixed position of upload logo button.

* Removed tooltip for logo.

* Fixed check to load client-side controller.

* Put back tooltip, minus the aria-describedby

* Fixed E2E tests I broke.

* Made the logo preview visible to the accessibility tree.

* feat: update the brand colors on the page when we select a new one

* feat: update the radio button_tags to use crayons-radio

* feat: remove the fill attributes in the svg

* Added support for JPG image upload.

* Fixed height adjustment when width exceeds max preview width.

* feat: add form-background class with an accent

* feat: update the briightness accent on the page

* Fixed JS error if user cancelled file selection for a logo.

* Added the @routes webpack alias for routes.js.erb.

* Fixed data tooltip for assistive technologies.

* Fixed preview logo alignment with upload logo button.

* remove required as it's not doing anything

* feat: update the code brigtness code

* Opting to not show friendly error message if route fails to load.

* Fixed validation message not appearing for logo.

* Revert "Added the @routes webpack alias for routes.js.erb."

This reverts commit 3b6621dcde541f2fa05df6ff75af38955842b88e.

* Reverted to default styling of input[type="file"].

* Moved creator_settings_controller to admin/controllers.

* Updated E2E test for logo preview on the creator settings page.

* create tests for the brand color updates

* feat: update the description

* Update cypress/integration/creatorOnboardingFlows/creatorSettings.spec.js

Co-authored-by: Nick Taylor <nick@iamdeveloper.com>

* Update app/javascript/admin/controllers/creator_settings_controller.js

Co-authored-by: Suzanne Aitchison <suzanne@forem.com>

* feat: do not update branding if an invalid color is provided

* feat: move the brightness code to its own accent calculator file in js utilities

* test: brightness ratios

* chore: remove whitespace

Co-authored-by: Nick Taylor <nick@dev.to>
Co-authored-by: Nick Taylor <nick@iamdeveloper.com>
Co-authored-by: Suzanne Aitchison <suzanne@forem.com>
2021-11-23 09:46:17 +02:00
Daniel Uber
33757683ec
Use tap instead of a temporary variable to modify after create (#15453) 2021-11-22 16:06:11 -06:00
Daniel Uber
b7246a5ef0
Update knapsack-pro/cypress to 4.5.0 (#15417)
We're getting warnings during test set submission to the server

    {
        message: 'Please update client @knapsack-pro/cypress 4.4.1
	version to 4.5.0. See CHANGELOG: https://github.com/KnapsackPro/knapsack-pro-cypress/blob/master/CHANGELOG.md#changelog'
     }

Try upgrading as suggested
2021-11-22 16:19:08 -05:00
Jeremy Friesen
4683784b05
Adding debug gem (#15459)
See https://github.com/ruby/debug/ for guidance on usage.

Most importantly, this allows for stepping through code.
2021-11-22 16:17:14 -05:00
dependabot[bot]
ed07069b6a
Bump @honeybadger-io/webpack from 1.5.0 to 1.5.1 (#15451)
Bumps [@honeybadger-io/webpack](https://github.com/honeybadger-io/honeybadger-webpack) from 1.5.0 to 1.5.1.
- [Release notes](https://github.com/honeybadger-io/honeybadger-webpack/releases)
- [Changelog](https://github.com/honeybadger-io/honeybadger-webpack/blob/master/CHANGELOG.md)
- [Commits](https://github.com/honeybadger-io/honeybadger-webpack/compare/v1.5.0...v1.5.1)

---
updated-dependencies:
- dependency-name: "@honeybadger-io/webpack"
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-11-22 16:08:28 -05:00
dependabot[bot]
44f872b775
Bump jsdom from 18.1.0 to 18.1.1 (#15450)
Bumps [jsdom](https://github.com/jsdom/jsdom) from 18.1.0 to 18.1.1.
- [Release notes](https://github.com/jsdom/jsdom/releases)
- [Changelog](https://github.com/jsdom/jsdom/blob/master/Changelog.md)
- [Commits](https://github.com/jsdom/jsdom/compare/18.1.0...18.1.1)

---
updated-dependencies:
- dependency-name: jsdom
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-11-22 14:07:40 -07:00
Jeremy Friesen
93c40a7983
Guarding against missing experiments (#15440)
* Guarding against missing experiments

This is a short-circuit to ensure we don't throw exceptions in the
worker.  In #15240 we introduce an AbExperiment module that we could use
to insulate against FieldTest implementations.

* Update app/workers/users/record_field_test_event_worker.rb

Co-authored-by: Jamie Gaskins <jamie@forem.com>

* Favoring guard condition over coercion

Co-authored-by: Jamie Gaskins <jamie@forem.com>
2021-11-22 16:06:32 -05:00
dependabot[bot]
c449c119e2
Bump lint-staged from 12.0.2 to 12.1.2 (#15452)
Bumps [lint-staged](https://github.com/okonet/lint-staged) from 12.0.2 to 12.1.2.
- [Release notes](https://github.com/okonet/lint-staged/releases)
- [Commits](https://github.com/okonet/lint-staged/compare/v12.0.2...v12.1.2)

---
updated-dependencies:
- dependency-name: lint-staged
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-11-22 15:36:51 -05:00
dependabot[bot]
b9b0b6481e
Bump @reach/combobox from 0.16.3 to 0.16.4 (#15457)
Bumps [@reach/combobox](https://github.com/reach/reach-ui/tree/HEAD/packages/combobox) from 0.16.3 to 0.16.4.
- [Release notes](https://github.com/reach/reach-ui/releases)
- [Commits](https://github.com/reach/reach-ui/commits/v0.16.4/packages/combobox)

---
updated-dependencies:
- dependency-name: "@reach/combobox"
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-11-22 15:36:37 -05:00
dependabot[bot]
d3c87e33d8
Bump eslint-plugin-react from 7.27.0 to 7.27.1 (#15448)
Bumps [eslint-plugin-react](https://github.com/yannickcr/eslint-plugin-react) from 7.27.0 to 7.27.1.
- [Release notes](https://github.com/yannickcr/eslint-plugin-react/releases)
- [Changelog](https://github.com/yannickcr/eslint-plugin-react/blob/master/CHANGELOG.md)
- [Commits](https://github.com/yannickcr/eslint-plugin-react/compare/v7.27.0...v7.27.1)

---
updated-dependencies:
- dependency-name: eslint-plugin-react
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-11-22 14:04:51 -05:00
Jeremy Friesen
3f3659c276
Adding program language lens for Code Ownership (#15431)
The goal is to consider different means of determining who might be able
to help review this code.

After we merge this, we're going to want to have folks self-identify in
the three groups:

- [@forem/ruby](https://github.com/orgs/forem/teams/ruby)
- [@forem/javascript](https://github.com/orgs/forem/teams/javascript)
- [@forem/css](https://github.com/orgs/forem/teams/css)
2021-11-22 11:28:35 -05:00
Julianna Tetreault
363c099bab
Provide COC and TOS Checkboxes During Creator Onboarding (#15430)
* WIP: Add COC and TOS checkboxes to Creator Settings form

* Adds assertions to the creatorSettings.spec.js E2E test

* Removes comments and unnecessary code from Admin::CreatorSettingsController

* Removes params from transaction

* Updates creatorSettings.spec.js to fix checkbox-related failures

* Adds a note to the COC and TOS checkboxes
2021-11-22 07:41:05 -07:00
Suzanne Aitchison
e5cda63391
reflect search query in page title (#15434) 2021-11-22 13:32:28 +00:00
ludwiczakpawel
50f8cb21fc
Mod tools trigger (#15400)
* init

* init

* test

* test
2021-11-22 08:22:26 +01:00
dependabot[bot]
5a5a0a723a
Bump view_component from 2.43.1 to 2.44.0 (#15439)
Bumps [view_component](https://github.com/github/view_component) from 2.43.1 to 2.44.0.
- [Release notes](https://github.com/github/view_component/releases)
- [Changelog](https://github.com/github/view_component/blob/main/docs/CHANGELOG.md)
- [Commits](https://github.com/github/view_component/compare/v2.43.1...v2.44.0)

---
updated-dependencies:
- dependency-name: view_component
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-11-19 11:44:09 -07:00
Daniel Uber
7c540abc8d
Gitpod: wait for postgresql to be listening before startup (#15429)
* Wait for postgresql to be listening on port before setup and startup

 https://github.com/forem/forem/issues/15428 points out an issue where
 the command sequence runs (foreman starts the Procfile.dev)
 but rails exits early because the database is not up.

Await the db port before proceeding.

* Await database in gitpod before starting up

* Move await-port to before: action

see https://www.gitpod.io/docs/config-start-tasks - init is only run
as needed (prebuild, new workspace) once, before is run every time a
workspace starts or restarts.

* When in doubt, sleep
2021-11-19 11:35:46 -06:00
Jeremy Friesen
9687760056
Updating valid domain registration (#15436)
* Updating valid domain registration

Prior to this commit, our regular expression did not account for the `-`
character as valid within the domain.  The `-` character cannot be the
first nor last character of the domain (e.g. `-hello.com` nor
`hello-.com` are invalid but `hell-o.com` is valid).

In addition I tidied up the default value of the
`blocked_registration_email_domains` to match it's sibling `allowed_registration_email_domains`.

This relates to the spammer seo-hunt.com

* Adding validator domain validator spec

* Moving request spec to unit spec

This change does two things:

1) Allows for 2 character domains
2) Moves the spec for 2 character domains from an expensive spec to a
   cheaper to run spec (e.g., request-cycle to unit-test validator)

It preserves PR #12268
2021-11-19 10:05:00 -05:00
Suzanne Aitchison
460d2f433a
Markdown toolbar - update new line logic for block syntaxes (#15343)
* update new line logic for block syntaxes

* use padStart
2021-11-19 06:59:21 +00:00
Jeremy Friesen
7ba0b49ea8
Parameterizing featured story requiring main image (#15333)
* Parameterizing featured story requiring main image

This begins to ease the resolution of #15292.

If we merge #15240, I could see setting an `Article` constant for this
value and allowing the administrator to choose the particular behavior.

Once we have insight from the product team, we can move forward with a
more comprehensive solution.

* Adding default parameter

While this is an `@api private` method, I am aligning the defaults with
it's `@api public` caller.  Yes, only specs call the method, but I'd
rather not fiddle with the specs at this moment in time.

* Reworking logic to be more scannable
2021-11-18 16:28:58 -05:00
Jeremy Friesen
21abe8cb34
Guarding against spam from OAuth Sources (#15404)
* Guarding against spam from OAuth Sources

Prior to this commit, when an administrator had indicated blocked email
domains, those blocks were not applied to identities created via the
OAuth sources (e.g., Twitter, Facebook, etc).  With this change, we're
hooking into the similar logic flow as suspended email accounts.

Related to #15403, #15397, and forem/rfcs#281

* Adding class documentation to exception

* Update app/services/authentication/authenticator.rb

Co-authored-by: Ridhwana <Ridhwana.Khan16@gmail.com>

Co-authored-by: Ridhwana <Ridhwana.Khan16@gmail.com>
2021-11-18 16:26:39 -05:00
Mac Siri
58f6bbb07b
Increase Blazer's timeout (#15427) 2021-11-18 14:50:18 -05:00
Arit Amana
dda559bca0
complete changes (#15420) 2021-11-18 14:19:45 -05:00
Jamie Gaskins
b64909acdd
Remove Pusher route (#15426)
We removed the controller in #15418, but some clients are still sending
requests to this endpoint, causing routing errors.
2021-11-18 14:04:06 -05:00
dependabot[bot]
fa00dea247
Bump ddtrace from 0.53.0 to 0.54.0 (#15425)
Bumps [ddtrace](https://github.com/DataDog/dd-trace-rb) from 0.53.0 to 0.54.0.
- [Release notes](https://github.com/DataDog/dd-trace-rb/releases)
- [Changelog](https://github.com/DataDog/dd-trace-rb/blob/master/CHANGELOG.md)
- [Commits](https://github.com/DataDog/dd-trace-rb/compare/v0.53.0...v0.54.0)

---
updated-dependencies:
- dependency-name: ddtrace
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-11-18 12:00:16 -07:00
Nick Taylor
ca0db28fc4
Add logo preview to creator settings form (#15363) 2021-11-18 12:23:24 -05:00
Mac Siri
ef83f0b07b
Unfreeze models in RecordDataCountsWorker (#15419) 2021-11-18 11:30:40 -05:00
dependabot[bot]
9f084b635c
Bump store_attribute from 0.9.2 to 0.9.3 (#15405)
Bumps [store_attribute](https://github.com/palkan/store_attribute) from 0.9.2 to 0.9.3.
- [Release notes](https://github.com/palkan/store_attribute/releases)
- [Changelog](https://github.com/palkan/store_attribute/blob/master/CHANGELOG.md)
- [Commits](https://github.com/palkan/store_attribute/compare/v0.9.2...v0.9.3)

---
updated-dependencies:
- dependency-name: store_attribute
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-11-18 08:10:05 -07:00
dependabot[bot]
96236a0783
Bump web-console from 4.1.0 to 4.2.0 (#15406)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-11-18 10:07:44 -05:00
Michael Kohl
09828853f6
✂✂✂ Remove Connect (#14734)
* 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>
2021-11-18 08:21:00 -06:00
Ridhwana
83b4a6db81
feat: update the description to more concise (#15416) 2021-11-18 15:47:50 +02:00
Suzanne Aitchison
15fed1cce4
Revise skip link behaviour (#15401)
* Revise skip link route change behaviour

* remove cypress test for divergent behaviour no longer needed

* fix import path

* remove duplicate styles - woops

* use translated string
2021-11-18 13:45:08 +00:00
Anna Buianova
4cab190285
Hiding comments: an option to hide or keep children (#15178)
* Optional hiding child comments (start)

* Changed confirm button in comments hide form

* Hide children comments if hide_children was passed

* Added a spec for hidden child comment notifications

* Hide only explicitly hidden comments

* Hide comment modal on article page

* Prevent default behaviour for hide comment link

* Improved hide comments modal looks

* Improved hide comments modal looks

* Removed unused code

* Send hide comment form via fetch

* Hide comment descendants when hide_children was passed

* Don't hide hidden comments descendants on permalink

* Removed unnecesary span

* Improved hide comments modal styling

* Removed unused styles and js, improved styling

* Clickable label

Co-authored-by: ludwiczakpawel <ludwiczakpawel@gmail.com>

* Fixed showing hidden comments spoiler for article author

* Fixed hideArticleComments.spec.js

* Fixed displaying hidden comments text for artice author, added specs

* Target hide comments modal inside the modal when adding a listener

Co-authored-by: Suzanne Aitchison <suzanne@forem.com>

* Replaced hide comment link with a button

* Refactored adding hide_children url param

Co-authored-by: Suzanne Aitchison <suzanne@forem.com>

* Fixed cypress hide comments test

* Removed aria-label for submit on the hide comments modal

* Fixed formatting

Co-authored-by: ludwiczakpawel <ludwiczakpawel@gmail.com>
Co-authored-by: Suzanne Aitchison <suzanne@forem.com>
2021-11-18 11:57:40 +03:00
Jeremy Friesen
91b951eb05
Refactoring and extending article spam behavior (#15399)
* 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
2021-11-17 17:09:17 -05:00
Nick Taylor
52ec967de5
Fixed issue where element didn't exist in the config Stimulus controller. (#15408) 2021-11-17 15:25:17 -05:00