Commit graph

11050 commits

Author SHA1 Message Date
Ridhwana
fc21eda0c1
feat: enable the feature flag across all Forems (#16700) 2022-03-01 10:46:43 -07:00
Suzanne Aitchison
9e19b71e7b
Only init mod tools if we're still on article page (#16733)
* only init mod tools if we're still on article page

* Update app/javascript/packs/articleModerationTools.js

Co-authored-by: Julianna Tetreault <32834804+juliannatetreault@users.noreply.github.com>

Co-authored-by: Julianna Tetreault <32834804+juliannatetreault@users.noreply.github.com>
2022-03-01 16:59:28 +00:00
Jeremy Friesen
dce7c4b275
Ensuring VideoPolicy#new? is canonical (#16735)
This commit compresses the policy check that spanned both :new? and
:enabled?.  We hide the ability to upload a video (as per the altered
html.erb files of this commit) but we didn't enforce the same logic in
the controller.

Further, as Videos are a subset of Article, I'm adding the "verify the
user is not suspended" test.

Directly relates to #16483

For sleuthing this relates:

- #16728
- forem/forem#16537
- #16634

And for historical context, this relates to:

- #10955
- #10954
- forem/internalEngineering#149
2022-03-01 11:46:31 -05:00
ludwiczakpawel
b321d1ec11
Removing bootstrap: admin sidebar navigation (#16618)
* nav

* nav

* move cheese around

* helpers

* optimize

* optimize

* optimization

* optimization

* children helper

* children helper

* Update app/views/admin/shared/_nested_sidebar.html.erb

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

Co-authored-by: Suzanne Aitchison <suzanne@forem.com>
2022-03-01 15:46:45 +01:00
Suzanne Aitchison
68b2824063
use getCsrfToken helper, refactor to fetch (#16717) 2022-03-01 09:11:42 +00:00
Suzanne Aitchison
3b42c01804
Favour fetch to XmlHttpRequest (#16715)
* refactor out xmlhttprequest

* rework
2022-03-01 09:11:22 +00:00
Jeremy Friesen
3bdcde6496
Adding indirection for Tag#name to ease future work (#16703)
* Adding indirection for Tag#name to ease future work

In pairing with Arit, we were able to capture a few small wins in
regards to favoring an accessible tag name.  In other words, where ever
you see a tag's name, we want to render it as camel-case.  This will
greatly help those using a screen reader and frankly visually scanning
the tag (idontknowaboutyoubutthisiskindahardtoread).

However, as we explored the
code base, we found several places that will require further
consideration.  These revolve around the API and caching of tags for
articles and listings as well as the JSON documents we use for
populating drop-down lists.

So, instead of unleashing a large pull request, we're opting to provide
a small non-breaking refactor that demonstrates where we're going and
keeps production working as expected while allowing future
development/testing to benefit from these captured gains.

Our next steps are to revisit the related issue and do a proper task
breakdown, becuase there are too many considerations to call this a
"small win".

I also encourage reviewers to read the comments.  This is an emerging
mental pattern that I believe helps us conceptually move our codebase
forward while also guarding against the mega-PR with oodles of commits
and file changes that span numerous contexts.

Related to forem/forem-internal-eng#269

* Expanding specs to address feedback
2022-02-28 16:32:04 -05:00
Julianna Tetreault
5652a89cd6
Update the Copy for all Modals in the Admin Member Detail View (#16708)
* Updates the copy for all modals within Admin Member Detail view

* Resolve most failing tests within managaUserOptions.spec.js

* Update app/views/admin/users/show/profile/actions/_export.html.erb

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

* Update cypress/integration/seededFlows/adminFlows/users/manageUserOptions.spec.js

Co-authored-by: Suzanne Aitchison <suzanne@forem.com>
2022-02-28 13:02:57 -07:00
dependabot[bot]
2de37815f1
Bump rubocop-rspec from 2.8.0 to 2.9.0 (#16724)
Bumps [rubocop-rspec](https://github.com/rubocop/rubocop-rspec) from 2.8.0 to 2.9.0.
- [Release notes](https://github.com/rubocop/rubocop-rspec/releases)
- [Changelog](https://github.com/rubocop/rubocop-rspec/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rubocop/rubocop-rspec/compare/v2.8.0...v2.9.0)

---
updated-dependencies:
- dependency-name: rubocop-rspec
  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>
2022-02-28 14:42:20 -05:00
dependabot[bot]
20c29961a5
Bump eslint-plugin-react from 7.28.0 to 7.29.2 (#16726)
Bumps [eslint-plugin-react](https://github.com/yannickcr/eslint-plugin-react) from 7.28.0 to 7.29.2.
- [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.28.0...v7.29.2)

---
updated-dependencies:
- dependency-name: eslint-plugin-react
  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>
2022-02-28 12:33:57 -07:00
dependabot[bot]
4afac58822
Bump postcss from 8.4.6 to 8.4.7 (#16723)
Bumps [postcss](https://github.com/postcss/postcss) from 8.4.6 to 8.4.7.
- [Release notes](https://github.com/postcss/postcss/releases)
- [Changelog](https://github.com/postcss/postcss/blob/main/CHANGELOG.md)
- [Commits](https://github.com/postcss/postcss/compare/8.4.6...8.4.7)

---
updated-dependencies:
- dependency-name: postcss
  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>
2022-02-28 14:17:55 -05:00
dependabot[bot]
da96237ea2
Bump eslint from 8.9.0 to 8.10.0 (#16722)
Bumps [eslint](https://github.com/eslint/eslint) from 8.9.0 to 8.10.0.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v8.9.0...v8.10.0)

---
updated-dependencies:
- dependency-name: eslint
  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>
2022-02-28 14:17:25 -05:00
dependabot[bot]
4a99ed6d1a
Bump sass from 1.49.8 to 1.49.9 (#16725)
Bumps [sass](https://github.com/sass/dart-sass) from 1.49.8 to 1.49.9.
- [Release notes](https://github.com/sass/dart-sass/releases)
- [Changelog](https://github.com/sass/dart-sass/blob/main/CHANGELOG.md)
- [Commits](https://github.com/sass/dart-sass/compare/1.49.8...1.49.9)

---
updated-dependencies:
- dependency-name: sass
  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>
2022-02-28 14:15:17 -05:00
Daniel Uber
c8515967ff
Don't send notification for invalid reactions (#16721)
* Don't send notification for invalid reactions

When a moderator flags a user,
and an admin marks this invalid
and the moderator tries to flag the user again
then destroy the existing reaction, and check whether to notify

Since the points for invalid reactions are set to 0, this was not being
skipped. Now it will be.

* cleanup test cases for reaction skip notification
2022-02-28 12:36:44 -06:00
dependabot[bot]
01689bee9f
Bump url-parse from 1.5.7 to 1.5.10 (#16711)
Bumps [url-parse](https://github.com/unshiftio/url-parse) from 1.5.7 to 1.5.10.
- [Release notes](https://github.com/unshiftio/url-parse/releases)
- [Commits](https://github.com/unshiftio/url-parse/compare/1.5.7...1.5.10)

---
updated-dependencies:
- dependency-name: url-parse
  dependency-type: indirect
...

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-02-28 11:55:53 -05:00
Mac Siri
16cc9014f8
Revert "Remove IE-specific setting (#16073)" (#16719)
This reverts commit 92b1958181.
2022-02-28 11:40:09 -05:00
Suzanne Aitchison
a70bb4811c
amend csrf token retries (#16714) 2022-02-28 15:05:13 +00:00
Jeremy Friesen
acd5b175ed
Ensuring POST api/v0/articles authorizes by policy (#16685)
As part of the [Authorization System Use Case
1:1](https://github.com/orgs/forem/projects/46) project, we are driving
towards the feature of: "Only admin's may post articles in this Forem."

This commit ensures that the API's "create an article" end-point
delivers on that feature.

Along the way, I've added reading notes and comments, to help us further
flex in the future (namely move all authorization checks into a policy
object).

Closes forem/forem#16488
2022-02-28 08:50:33 -05:00
dependabot[bot]
3a3018ff93
Bump counter_culture from 3.2.0 to 3.2.1 (#16707)
* Bump counter_culture from 3.2.0 to 3.2.1

Bumps [counter_culture](https://github.com/magnusvk/counter_culture) from 3.2.0 to 3.2.1.
- [Release notes](https://github.com/magnusvk/counter_culture/releases)
- [Changelog](https://github.com/magnusvk/counter_culture/blob/master/CHANGELOG.md)
- [Commits](https://github.com/magnusvk/counter_culture/compare/v3.2.0...v3.2.1)

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

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

* Wake up, Travis

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Julianna Tetreault <32834804+juliannatetreault@users.noreply.github.com>
2022-02-25 13:56:50 -07:00
dependabot[bot]
d5019301c2
Bump stackprof from 0.2.18 to 0.2.19 (#16706)
Bumps [stackprof](https://github.com/tmm1/stackprof) from 0.2.18 to 0.2.19.
- [Release notes](https://github.com/tmm1/stackprof/releases)
- [Changelog](https://github.com/tmm1/stackprof/blob/master/CHANGELOG.md)
- [Commits](https://github.com/tmm1/stackprof/compare/v0.2.18...v0.2.19)

---
updated-dependencies:
- dependency-name: stackprof
  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>
2022-02-25 12:44:05 -07:00
dependabot[bot]
1601aa05a3
Bump gibbon from 3.4.3 to 3.4.4 (#16705)
Bumps [gibbon](https://github.com/amro/gibbon) from 3.4.3 to 3.4.4.
- [Release notes](https://github.com/amro/gibbon/releases)
- [Changelog](https://github.com/amro/gibbon/blob/master/CHANGELOG.md)
- [Commits](https://github.com/amro/gibbon/compare/v3.4.3...v3.4.4)

---
updated-dependencies:
- dependency-name: gibbon
  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>
2022-02-25 11:24:54 -07:00
Julianna Tetreault
2be6ecfc14
Updates the copy for the Flags tab (#16697) 2022-02-25 08:41:47 -07:00
Ridhwana
92e59d76c4
remove verify emails from the dropdown (#16699) 2022-02-25 17:36:46 +02:00
Michael Kohl
3322b49e84
✂️ Remove myself from core contributors (#16672)
* Remove myself from core contributors

* Update comments

* Update more comments
2022-02-25 09:56:19 -05:00
Julianna Tetreault
0fd55d1c14
Update the Copy for the "Emails" Tab in the Admin Member Detail View (#16693)
* Adjusts the copy and layout of the Emails section

* Revert design changes to the Emails tab
2022-02-25 07:33:52 -07:00
Julianna Tetreault
70e6aecfc3
Update the Copy for the "Reports" Tab in the Admin Member Detail View (#16696)
* Updates the copy on the Reports tab

* Update app/views/admin/users/show/reports/_index.html.erb
2022-02-25 07:33:13 -07:00
Julianna Tetreault
5f26dc6809
Update the Copy for the "Overview" Tab and Its Modals (#16645)
* Updates the overview copy and over modal copy

* Updates E2E tests for Admin Member View overview fields

* Fixes copy on credit button in manageCredits.spec.js
2022-02-25 07:17:00 -07:00
Julianna Tetreault
d7993df25a
Update copy for Admin Member Detail View notes section (empty and not) (#16691) 2022-02-25 07:43:52 -05:00
Dwight Scott
ab224d34b2
Add ability to bulk search tags by name or id (#16671)
* Trigger Build

* Remove cache header before_action and add ability to search by tag name

* Remove cache header before_action and add ability to search by tag name

* Add internal bulk tag endpoint to get tags by array of  names or ids

* Restore V0 tags controller
2022-02-24 12:34:50 -05:00
Jeremy Friesen
e0e4003671
Removing somewhat duplicated logic (#16684)
In conversations with citizen428, this method looked to be a holdover
from a past approach.  Reviewing the code, we can get the same behavior
with other methods.

Further, I added some comments for future considerations, and refactored
for more readily scannable guard clauses.

Related to forem/forem#16488, forem/forem#16681, and forem/forem#6255
2022-02-24 12:16:48 -05:00
Suzanne Aitchison
1dcd593c10
✂️ Remove clipboard packages no longer needed ✂️ (#16683)
* remove clipboard copy packages no longer needed

* add to tests to make sure clipboard populated
2022-02-24 16:47:22 +00:00
Michael Kohl
f917a501af
Silence parser/current warnings (#16682) 2022-02-24 21:43:59 +07:00
ludwiczakpawel
80422120b4
GIF button z-index issue (#16649)
* fix

* fix sneak in
2022-02-24 09:40:18 +01:00
Jeremy Friesen
8ec81e80e9
Removing duplicate logic and adding docs (#16681)
As I was investigating an approach for #16488, I stumbled upon two
methods partially doing the same thing.  This helps consolidate the
logic and provides some guiding documentation.
2022-02-23 15:22:35 -05:00
Daniel Uber
71a4c47181
Update identities where the auth data dump is a plain hash (#16676)
* Update identities where the auth data dump is a plain hash

All but 3 records in DEV have OmniAuth::AuthHash objects serialized as
auth data dump. Normalize the remaining ones so they don't cause no
method errors when we treat the auth_data_dump as an object (sending
`#info` instead of asking for `['info']`).

should address https://app.honeybadger.io/projects/66984/faults/84183659

Add null safety check in a second example (that null values should not
cause an error, and should not be coerced to auth hashes).

* Ignore rubocop suggestion to create list

Because the factory for identities doesn't automatically create the
required user object, this is impractical.

While I'm here, move the identity hash update into the creation block
rather than doing this in two passes.

Co-authored-by: Jamie Gaskins <jgaskins@hey.com>
2022-02-23 14:14:14 -06:00
dependabot[bot]
9a0682d652
Bump pg from 1.3.2 to 1.3.3 (#16680)
Bumps [pg](https://github.com/ged/ruby-pg) from 1.3.2 to 1.3.3.
- [Release notes](https://github.com/ged/ruby-pg/releases)
- [Changelog](https://github.com/ged/ruby-pg/blob/master/History.rdoc)
- [Commits](https://github.com/ged/ruby-pg/compare/v1.3.2...v1.3.3)

---
updated-dependencies:
- dependency-name: pg
  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>
2022-02-23 12:35:25 -06:00
ludwiczakpawel
a313d8ad38
Text overflow on profile preview cards (#16650) 2022-02-23 16:52:05 +01:00
yheuhtozr
c5faab1736
extra tweaks for i18n (#16192)
* extra tweaks for i18n

* fix for PR

* fix for #16115

* fix for rubocop

* fixes for spec
2022-02-23 06:48:52 -07:00
Suzanne Aitchison
24d02b6a53
Add new ColorPicker to organization settings (#16642)
* Use new color picker in org settings

* add cypress spec

* remove i18n keys no longer needed
2022-02-23 09:05:39 +00:00
Michael Kohl
b07ea0a87e
More listings refactoring (#16343) 2022-02-23 13:44:30 +07:00
Michael Kohl
d4ec02bf6d
Update profile image for orgs in seeds (#16666) 2022-02-23 10:13:43 +07:00
Michael Kohl
e1bce8c398
Update device_detector, remove warning workaround (#16665)
Co-authored-by: Dan Uber <dan@forem.com>
2022-02-23 10:13:21 +07:00
Julianna Tetreault
45b7806120
Remove Remaining logo_svg Code (#16291)
* Removes logo_svg-related code

* Removes logo_svg-related specs

* Removes the logo_uploader and logo_uploader DUS spec

* Removes the logo_uploader_spec.rb

* Adds a DUS to remove the logo_svg var from the DB

* Reverts the removal of the logo_svg_uploader.rb
2022-02-22 12:05:16 -07:00
Mac Siri
5fc1f48e51
Add ChunkLoadError to Honeybadger's ignorePatterns (#16662) 2022-02-22 13:48:43 -05:00
dependabot[bot]
3d0c968f57
Bump nokogiri from 1.13.2 to 1.13.3 (#16668)
Bumps [nokogiri](https://github.com/sparklemotion/nokogiri) from 1.13.2 to 1.13.3.
- [Release notes](https://github.com/sparklemotion/nokogiri/releases)
- [Changelog](https://github.com/sparklemotion/nokogiri/blob/v1.13.3/CHANGELOG.md)
- [Commits](https://github.com/sparklemotion/nokogiri/compare/v1.13.2...v1.13.3)

---
updated-dependencies:
- dependency-name: nokogiri
  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>
2022-02-22 12:27:03 -06:00
Daniel Uber
a052b16015
Don't sanitize anchor elements with no href (#16667)
* If href is nil, allow node

* Add unit test showing no change

My first pass had the `<a>` within an h1 content, but the scrubber
added a newline after the closing a tag?
2022-02-22 11:27:38 -06:00
Ryan Palo
40639ea602
Fix RSS feed validity issue (#16418) (#16517) 2022-02-22 09:22:05 -06:00
Ben Halpern
8649eaed0f
[Small win] Add display name to campaign settings (#16653)
* Add display name to campaign settings

* Update app/models/settings/campaign.rb

* Update app/views/admin/settings/forms/_campaign.html.erb
2022-02-22 10:01:52 -05:00
ludwiczakpawel
ec41d12246
theme-color (#16651) 2022-02-22 15:52:14 +01:00
Arit Amana
9c92ce03dc
Implement Loom Embed (not merging now) (#16633)
* started implementation and specs

* complete implementation and specs

* refactor

* update doc

* fix failing specs

* typos will NOT be the death of me
2022-02-22 09:05:55 -05:00