Commit graph

9781 commits

Author SHA1 Message Date
ludwiczakpawel
f1c8de4024
Shortcut for "Following tags" (#14708)
* following tags shortcut

* rails helper
2021-09-15 20:54:18 +02:00
Alex
a024efcc45
Add display_in_directory setting (#14733)
* Add display_in_directory setting

* Remove setting from constants

* Update spec to use change
2021-09-15 13:34:31 -04:00
Mac Siri
94d2261d42
Remove #sanitize_and_decode (#14727) 2021-09-15 11:05:06 -04:00
Daniel Uber
14e95e6713
Ensure ActiveRecord::Base has descendants before checking triggers (#14732)
HairTrigger uses the ActiveRecord::Base.descendants to find triggers
in the db (from `models`). WithModel (used in the Settings::Base spec)
clears this during its descendants cleanup, causing this test to
ocassionally fail.

Before checking hairtrigger, if AR::Base descendents is empty, add
ApplicationRecord (there's an assumption here that all of our
application models inherit from application record - this may or may
not be true if we use engine generated models that do not follow this
convention and need to validate triggers there.
2021-09-15 09:29:44 -05:00
Andy Zhao
84d931136e
Fix bug where OAuth signups were not pulling in OAuth provider's profile image (#14711)
* Use regex to replace with https

* Refactor a bit

* Update logic to handle edge cases

* url being nil
* url not a valid URL (weak validation, checks for starting
string of http)

* Add new test case for http to https conversion
2021-09-14 22:13:16 -04:00
dependabot[bot]
3f83d7e171
Bump prettier from 2.3.2 to 2.4.0 (#14713)
Bumps [prettier](https://github.com/prettier/prettier) from 2.3.2 to 2.4.0.
- [Release notes](https://github.com/prettier/prettier/releases)
- [Changelog](https://github.com/prettier/prettier/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prettier/prettier/compare/2.3.2...2.4.0)

---
updated-dependencies:
- dependency-name: prettier
  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-09-15 08:36:55 +07:00
Daniel Uber
21e9966ccb
Relax tag validation restriction to permit non-ascii strings (#14710)
* Relax tag validation restriction to permit alphanumeric strings

Non-word symbols like musical notes are still blocked, but most
languages should work.

* Handle redirect after tag edit

The URI.parse(tag.name) was not updated in #13720

Move reused logic into tag_path method in URL module.

* FactoryBot generated tags are non-ascii

This should help expose any cases where we're mistakenly counting on
ascii-only content in tags by causing all generated tags without a
specified name to be of the form `tag你好#{n}` instead of `tag#{n}`.

* Revert "FactoryBot generated tags are non-ascii"

This reverts commit ed1035cd1e91619b2c1599e521b6ddf962c97f80.

It was useful to see how many places the path knowledge is in the
tests (a lot of requests have GET /t/tag.name and need to have GET
URL.tag_path instead).

https://app.travis-ci.com/github/forem/forem/builds/237542600 has the
results.

Reverting because those test-side changes seem like a secondary
concern to the change in this PR (I'll file a follow on issue)
2021-09-14 14:03:54 -05:00
Alex
d6a1b16a45
Add context to Instance API (#14731) 2021-09-14 13:09:20 -04:00
dependabot[bot]
f0700b2588
Bump jest from 26.6.3 to 27.2.0 (#14722)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Suzanne Aitchison <suzanne@forem.com>
2021-09-14 11:20:15 -04:00
Michael Kohl
a32b50d46c
Make Rubocop happy again (#14729) 2021-09-14 09:15:01 -05:00
dependabot[bot]
c8dd728210
Bump cypress from 8.3.1 to 8.4.0 (#14726)
Bumps [cypress](https://github.com/cypress-io/cypress) from 8.3.1 to 8.4.0.
- [Release notes](https://github.com/cypress-io/cypress/releases)
- [Changelog](https://github.com/cypress-io/cypress/blob/develop/.releaserc.base.js)
- [Commits](https://github.com/cypress-io/cypress/compare/v8.3.1...v8.4.0)

---
updated-dependencies:
- dependency-name: cypress
  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-09-14 07:51:17 -06:00
ludwiczakpawel
d6aa9e058b
Forem background (#14700)
* forem background styles

* cleanup

* layout updates

* couple fixes

* cypress
2021-09-14 14:47:48 +02:00
Michael Kohl
099b4672ad
Don't try to create invalid RatingVote (#14706) 2021-09-14 09:41:59 +07:00
Christina
82b27d9d61
Update Forem core team only section (#14725)
* Update Forem core team only section

Adding additional clarification for how the team can communicate that they worked on the Admin area so Community Success can update the appropriate docs.

* Updated PR with Michael T's suggestions

* Update .github/PULL_REQUEST_TEMPLATE.md

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

Co-authored-by: Julianna Tetreault <32834804+juliannatetreault@users.noreply.github.com>
2021-09-13 15:38:56 -06:00
dependabot[bot]
fc65f1a2ea
Bump gibbon from 3.4.0 to 3.4.1 (#14718)
Bumps [gibbon](https://github.com/amro/gibbon) from 3.4.0 to 3.4.1.
- [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.0...v3.4.1)

---
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>
2021-09-13 16:07:25 -05:00
dependabot[bot]
2eab34f3bf
Bump rubocop-rails from 2.12.1 to 2.12.2 (#14723)
Bumps [rubocop-rails](https://github.com/rubocop/rubocop-rails) from 2.12.1 to 2.12.2.
- [Release notes](https://github.com/rubocop/rubocop-rails/releases)
- [Changelog](https://github.com/rubocop/rubocop-rails/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rubocop/rubocop-rails/compare/v2.12.1...v2.12.2)

---
updated-dependencies:
- dependency-name: rubocop-rails
  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-09-13 14:43:45 -06:00
dependabot[bot]
cd4f0a05ac
Bump sass from 1.38.0 to 1.39.2 (#14714)
Bumps [sass](https://github.com/sass/dart-sass) from 1.38.0 to 1.39.2.
- [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.38.0...1.39.2)

---
updated-dependencies:
- dependency-name: sass
  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-09-13 14:43:02 -06:00
dependabot[bot]
546f5dc1ff
Bump oj from 3.13.5 to 3.13.6 (#14719)
Bumps [oj](https://github.com/ohler55/oj) from 3.13.5 to 3.13.6.
- [Release notes](https://github.com/ohler55/oj/releases)
- [Changelog](https://github.com/ohler55/oj/blob/develop/CHANGELOG.md)
- [Commits](https://github.com/ohler55/oj/compare/v3.13.5...v3.13.6)

---
updated-dependencies:
- dependency-name: oj
  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-09-13 14:47:09 -05:00
dependabot[bot]
61c9478f5f
Bump rubocop from 1.20.0 to 1.21.0 (#14716)
Bumps [rubocop](https://github.com/rubocop/rubocop) from 1.20.0 to 1.21.0.
- [Release notes](https://github.com/rubocop/rubocop/releases)
- [Changelog](https://github.com/rubocop/rubocop/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rubocop/rubocop/compare/v1.20.0...v1.21.0)

---
updated-dependencies:
- dependency-name: rubocop
  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-09-13 14:37:47 -05:00
dependabot[bot]
23634adfd3
Bump core-js from 3.17.2 to 3.17.3 (#14720)
Bumps [core-js](https://github.com/zloirock/core-js) from 3.17.2 to 3.17.3.
- [Release notes](https://github.com/zloirock/core-js/releases)
- [Changelog](https://github.com/zloirock/core-js/blob/master/CHANGELOG.md)
- [Commits](https://github.com/zloirock/core-js/compare/v3.17.2...v3.17.3)

---
updated-dependencies:
- dependency-name: core-js
  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-09-13 13:33:55 -06:00
dependabot[bot]
463421d6fb
Bump babel-jest from 27.1.1 to 27.2.0 (#14715)
Bumps [babel-jest](https://github.com/facebook/jest/tree/HEAD/packages/babel-jest) from 27.1.1 to 27.2.0.
- [Release notes](https://github.com/facebook/jest/releases)
- [Changelog](https://github.com/facebook/jest/blob/main/CHANGELOG.md)
- [Commits](https://github.com/facebook/jest/commits/v27.2.0/packages/babel-jest)

---
updated-dependencies:
- dependency-name: babel-jest
  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-09-13 13:21:44 -06:00
dependabot[bot]
8e8e0fb5cd
Bump @babel/preset-env from 7.15.4 to 7.15.6 (#14712)
Bumps [@babel/preset-env](https://github.com/babel/babel/tree/HEAD/packages/babel-preset-env) from 7.15.4 to 7.15.6.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.15.6/packages/babel-preset-env)

---
updated-dependencies:
- dependency-name: "@babel/preset-env"
  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-09-13 15:07:37 -04:00
Josh Puetz
ed1731fd95
Change mobile new comment notification text and add sound (#14678) 2021-09-13 11:15:58 -05:00
Michael Kohl
0aa27f3d1e
Refactor profile refreshing (#14643)
* Refactor profile refreshing

* Fix guard in ProfileFields::Remove

* Add more comments to Profile

* Fix typo

* Rephrase comment

* Fix regular expression

* Clean up Profile

* Fix remove spec

* Also remove setter from store accessors

* Remove RUBY_THREAD_VM_STACK_SIZE workaround

* Travis, wake up
2021-09-13 12:15:04 -04:00
Daniel Uber
324265e24e
Handle GibbonError when Mailchimp api key was not set (#14695)
* When an api key was not set - handle gibbon error as mailchimp error

see https://app.honeybadger.io/projects/72638/faults/73753178

It's possible the right answer is instead to either (1) not make the
call at all (2) not log as a mailchimp error but treat distinctly

* Only report error if GibbonError, don't attempt to resubscribe

Separate the rescue blocks since resubscribing doesn't make sense if
we're handling a gibbon error rather than a mailchimp error

* Add test for gibbon error being raised (and rescued)

Copied the existing test specifying that resubscribe is attempted on a
raised mailchimp error.

* Remove irrelevant resubscribe check - assert error is handled only
2021-09-13 10:30:35 -05:00
Michael Kohl
c946d0bf6b
Add feature flag for Connect (#14644)
* Add feature flag for connect

* Start using Connect feature flag

* Add feature flag check to plaintext mailers

* Minor fixes/formatting issues

* Fix typo

* Enable Connect feature flag for tests

* Fix feature flag in tests

* Update rails_helper

* Fix typo

* (╯°□°)╯︵ ┻━┻

* One more try

* connect announcement

* Use connect feature flag in admin and admin routes

* Add aria-live attribute to announcement

* Undo schema.rb changes

Co-authored-by: Paweł Ludwiczak <ludwiczakpawel@gmail.com>
2021-09-13 10:45:56 -04:00
ludwiczakpawel
f2f2c34673
3d drop shadows (#14701)
* remove 3d box shadow

* profile cards fixes

* little fix

* dark mode + listings modal

* dropdowns padding

* whoops
2021-09-13 11:02:53 +02:00
dependabot[bot]
da709cf5c6
Bump knapsack_pro from 3.1.0 to 3.1.1 (#14703)
Bumps [knapsack_pro](https://github.com/KnapsackPro/knapsack_pro-ruby) from 3.1.0 to 3.1.1.
- [Release notes](https://github.com/KnapsackPro/knapsack_pro-ruby/releases)
- [Changelog](https://github.com/KnapsackPro/knapsack_pro-ruby/blob/master/CHANGELOG.md)
- [Commits](https://github.com/KnapsackPro/knapsack_pro-ruby/compare/v3.1.0...v3.1.1)

---
updated-dependencies:
- dependency-name: knapsack_pro
  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-09-10 14:40:30 -05:00
Michael Kohl
19a15990d1
Update rubocop-rails (#14699) 2021-09-10 14:11:51 -04:00
Nick Taylor
cedef989f1
Added gitpod-init script (#14698) 2021-09-10 11:35:52 -04:00
Nick Taylor
41b3171dd1
Now the script will launch the gitpod specific Forem url once the web server is ready. (#14697) 2021-09-10 08:33:41 -05:00
dependabot[bot]
d60d26b148
Bump httparty from 0.18.1 to 0.19.0 (#14693)
Bumps [httparty](https://github.com/jnunemaker/httparty) from 0.18.1 to 0.19.0.
- [Release notes](https://github.com/jnunemaker/httparty/releases)
- [Changelog](https://github.com/jnunemaker/httparty/blob/master/Changelog.md)
- [Commits](https://github.com/jnunemaker/httparty/compare/v0.18.1...v0.19.0)

---
updated-dependencies:
- dependency-name: httparty
  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-09-10 08:53:23 -04:00
Nick Taylor
84f2fc885e
Updated node version in Gitpod (#14696)
* Updated node version in Gitpod.

* 17 not 7. 🙃
2021-09-10 06:46:17 -04:00
ludwiczakpawel
00ce30e636
Warmer shades of grey (#14665)
* warmer grey
2021-09-09 21:35:51 +02:00
dependabot[bot]
e1375a3ec7
Bump rubocop-rails from 2.11.3 to 2.12.0 (#14692)
Bumps [rubocop-rails](https://github.com/rubocop/rubocop-rails) from 2.11.3 to 2.12.0.
- [Release notes](https://github.com/rubocop/rubocop-rails/releases)
- [Changelog](https://github.com/rubocop/rubocop-rails/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rubocop/rubocop-rails/compare/v2.11.3...v2.12.0)

---
updated-dependencies:
- dependency-name: rubocop-rails
  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-09-09 13:02:01 -06:00
dependabot[bot]
e3aff4b43d
Bump view_component from 2.39.0 to 2.40.0 (#14690)
Bumps [view_component](https://github.com/github/view_component) from 2.39.0 to 2.40.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.39.0...v2.40.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-09-09 13:01:07 -06:00
dependabot[bot]
7eb43299b8
Bump oj from 3.13.4 to 3.13.5 (#14689)
Bumps [oj](https://github.com/ohler55/oj) from 3.13.4 to 3.13.5.
- [Release notes](https://github.com/ohler55/oj/releases)
- [Changelog](https://github.com/ohler55/oj/blob/develop/CHANGELOG.md)
- [Commits](https://github.com/ohler55/oj/compare/v3.13.4...v3.13.5)

---
updated-dependencies:
- dependency-name: oj
  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-09-09 14:44:25 -04:00
Mac Siri
4e2f927861
Run yarn upgrade & add resolution for glob-parent (#14686) 2021-09-09 10:54:45 -04:00
Suzanne Aitchison
ba7fa0ad11
add temporary ahoy stats for tag sidebar clicks (#14688) 2021-09-09 08:31:27 -05:00
VISHAL DEEPAK
c88f8dcdaa
In dashboard show api eager load collection with articles (#14677)
* In dashboard show api eager load collection with articles

* Dashboard Article Row view now loads collection to suppress bullet warning of eager loading
2021-09-09 11:11:03 +01:00
Daniel Uber
2a75ec8ecc
When calling Faker::Markdown, avoid "sandwich" method (#14685)
* When calling Faker::Markdown, avoid "sandwich" method

Since random can also be selected by random (without the exclude
list), avoid calling sandwich occassionally from random's call to
random.

This avoids generating body_markdown exceeding 12 newlines (which is
validated in Listing and prevents save, breaking the seeds process).

* just take 10 lines, don't be clever

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

Co-authored-by: Jamie Gaskins <jamie@forem.com>
2021-09-08 17:54:53 -05:00
dependabot[bot]
61eed20876
Bump @testing-library/dom from 7.31.2 to 8.2.0 (#14623)
Bumps [@testing-library/dom](https://github.com/testing-library/dom-testing-library) from 7.31.2 to 8.2.0.
- [Release notes](https://github.com/testing-library/dom-testing-library/releases)
- [Changelog](https://github.com/testing-library/dom-testing-library/blob/main/CHANGELOG.md)
- [Commits](https://github.com/testing-library/dom-testing-library/compare/v7.31.2...v8.2.0)

---
updated-dependencies:
- dependency-name: "@testing-library/dom"
  dependency-type: direct:development
  update-type: version-update:semver-major
...

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-09-08 14:02:45 -04:00
Daniel Uber
1253d90114
Check for the current version of foreman when deciding to install (#14682)
* Check for the current version of foreman when deciding to install

0.87.1 was current when this was added, but `gem install foreman` now
installs 0.87.2, so this check always fails (I do not have the older
version present).

I'm suspecting we either don't want to version pin this test (assume
whatever version of foreman installed is fine) or we need to use
something like the Gemfile to have dependabot keep this version info
in sync with the upstream.

All I do here is update the current release version to test against.

* Remove foreman version constraint

If any version of (very stable) foreman is installed, assume it's
recent enough to run the (also very stable) Procfile

Only install foreman gem if it's not installed. Updates are on the user.
2021-09-08 09:31:23 -05:00
Fernando Valverde
a3da4f9bc4
Remove outdated notice (#14679) 2021-09-08 14:46:34 +02:00
dependabot[bot]
29949046d6
Bump babel-jest from 26.6.3 to 27.1.0 (#14670)
Bumps [babel-jest](https://github.com/facebook/jest/tree/HEAD/packages/babel-jest) from 26.6.3 to 27.1.0.
- [Release notes](https://github.com/facebook/jest/releases)
- [Changelog](https://github.com/facebook/jest/blob/master/CHANGELOG.md)
- [Commits](https://github.com/facebook/jest/commits/v27.1.0/packages/babel-jest)

---
updated-dependencies:
- dependency-name: babel-jest
  dependency-type: direct:development
  update-type: version-update:semver-major
...

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-09-08 10:58:33 +07:00
dependabot[bot]
af8d239478
Bump @storybook/addon-storysource from 6.3.7 to 6.3.8 (#14675) 2021-09-07 18:45:59 -04:00
dependabot[bot]
eae3ac1cb1
Bump honeycomb-beeline from 2.6.0 to 2.7.0 (#14680)
Bumps [honeycomb-beeline](https://github.com/honeycombio/beeline-ruby) from 2.6.0 to 2.7.0.
- [Release notes](https://github.com/honeycombio/beeline-ruby/releases)
- [Changelog](https://github.com/honeycombio/beeline-ruby/blob/main/CHANGELOG.md)
- [Commits](https://github.com/honeycombio/beeline-ruby/compare/v2.6.0...v2.7.0)

---
updated-dependencies:
- dependency-name: honeycomb-beeline
  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-09-07 17:22:04 -04:00
dependabot[bot]
40543ea126
Bump husky from 7.0.1 to 7.0.2 (#14676) 2021-09-07 15:42:15 -04:00
dependabot[bot]
330232e97d
Bump @babel/core from 7.15.0 to 7.15.5 (#14671) 2021-09-07 15:41:54 -04:00
Keshav Biswa
42c9a10f57
Accessible names for follow buttons (#14389)
* added follow hidden tags for accessibility

* fixed failing tests

* replaced hidden span with screen-reader-only with aria-label

* add aria-label dynamically to follow buttons

* fixed followButtons

* fixed cypress tests and updated addAriaLabelToButton helper

* Fixed failing tests

* fixed failing tests

* Update cypress/integration/seededFlows/notificationsFlows/followUserFromNotifications.spec.js

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

Co-authored-by: Suzanne Aitchison <suzanne@forem.com>
2021-09-07 16:09:06 +01:00