Commit graph

8684 commits

Author SHA1 Message Date
Mac Siri
236a2ba64f
Downgrade dogstatsd-ruby to 4.8.3 (#13255) 2021-04-05 16:17:55 -04:00
Mac Siri
a0591379e5
Declare DD_VERSION in prerun.sh (#13251) 2021-04-05 15:51:08 -04:00
Jacob Herrington
0ecfec1a80
[15 minute fix] Fix word wrapping on mobile dashboard (#13218)
* Fix word wrapping on mobile dashboard

* Update app/assets/stylesheets/components/buttons.scss

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

Co-authored-by: Suzanne Aitchison <suzanne@forem.com>
2021-04-05 14:46:06 -05:00
dependabot[bot]
e3ff582c99
Bump rubocop from 1.12.0 to 1.12.1 (#13245)
Bumps [rubocop](https://github.com/rubocop/rubocop) from 1.12.0 to 1.12.1.
- [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.12.0...v1.12.1)

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-04-05 18:31:31 +02:00
rhymes
b6360fb80c
Upgrade Rails to 6.1.3.1 (#11333)
* Upgrade Rails to 6.1

* Switch to unreleased bullet

* Run rails app:update

* Add deprecation notices after reading changelogs

* Fix app:update error

* Move middleware in the correct place

* Temporarily disable ransack which does not support Rails 6.1

* Remove wrongly merged file

* Re-run spring binstub

* Fix double quotes

* Track ransack branch with Rails 6.1 support

* Fix deprecation

* Switch to Ransack 2.4 which supports Rails 6.1 rc1

* Fix missing default params for the duration substitution

* Fix new behavior of relation.pluck with contradictory queries

* Fix uploaders specs by tracking rspec-rails main repo

* Disable bullet temporarily

* Fix remaining fixture_file_upload usages

* Add default seconds for video article duration

* Trigger Travis CI

* Upgrade Rails to 6.1.0.rc2

* Remove file deleted on master

* Add Rails 6.1 gem to Gemfile

* Trigger Travis CI

* Revert "Disable bullet temporarily"

This reverts commit cee0c2ce61fb72cbc16d52c94b12ee681e873031.

* Fix bullet version

* Upgrade to acts-as-taggable 7 and fix conflict

* Update Gemfile and rspec-* gems

* Fix nokogiri in Gemfile.lock

* Switch to rspec-rails main branch

* Remove leftover vendored cached items

* Fix path for Rails 6.1

* Use latest release of erb_lint

* Re-run rails app:update to incorporate new changes

* Disable erb_lint's ErbSafety checks

* Fix Gemfile.lock and re-add platform specific gems of Nokogiri

* Add mini_portile2 as well

* Fix latest merge conflict by removing now unused faraday_middleware

* Upgrade to Rails 6.1.3.1

* Regenerate Gemfile.lock and vendor/cache

* Add x86_64 linux gem

* Mark spec as flaky

* Revert "Mark spec as flaky"

This reverts commit 3caba94b33645f9b59c84ba78ee8df042fc7aee0.

Co-authored-by: Mac Siri <krairit.siri@gmail.com>
2021-04-05 10:39:48 -04:00
Suzanne Aitchison
e8098c8e5c
ensure home and sign up links in sidebar are announced once to screen reader users (#13231) 2021-04-05 09:24:56 +01:00
Suzanne Aitchison
54c6aa484d
improve accessible names of dashboard post actions (#13232) 2021-04-05 09:24:39 +01:00
Suzanne Aitchison
0691b8a897
link profile fields with their labels (#13233) 2021-04-05 09:24:16 +01:00
Suzanne Aitchison
100910a072
[15 min fix] ✂️✂️✂️ Remove preact-textarea-autosize library ✂️✂️✂️ (#13234)
* remove lib from title component, use hook instead

* remove lib from chat compose, and remove package
2021-04-05 09:23:29 +01:00
Daniel Uber
77273267b7
Change file name to remove ERB suffix (#13237)
We moved the initializePage.js file from ERB to pure/plain js in
https://github.com/forem/forem/pull/8030, and the docs are out of sync
with the code.

Fix up the path to this file so it matches the codebase.
2021-04-03 18:50:11 -05:00
Mac Siri
009c14653a
Fix app/services' ruby 2.7 kwargs warnings (#13177) 2021-04-01 18:40:50 -04:00
dependabot[bot]
da56f980e1
Bump ddtrace from 0.46.0 to 0.47.0 (#13180)
Bumps [ddtrace](https://github.com/DataDog/dd-trace-rb) from 0.46.0 to 0.47.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.46.0...v0.47.0)

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-04-01 14:51:13 -06:00
Mac Siri
a7d29cb3df
Skip a flaky e2e spec (#13225) 2021-04-01 16:45:14 -04:00
Jamie Gaskins
9533c77d7f
User#followed_articles->Article.cached_tagged_with (#13174)
* User#followed_articles->Article.cached_tagged_with

This should improve performance on StoriesController#index

* Make cached_* work like their tagged_with cousins

* Swap to `cached_tagged_with_any`

This was using `tagged_with(tags, any: true)` before so this commit
swaps to using a scope that aligns with that method.

* Allow for searching by Tag models

* do the thing

* abracadabra run the build

* Add comment explaining Postgres regex anchors
2021-04-01 16:20:29 -04:00
Jacob Herrington
18ce0c635c
Add endpoint for articles sorted by published date (#13137) 2021-04-01 13:36:36 -05:00
dependabot[bot]
ba61767f7e
Bump @storybook/addon-a11y from 6.1.21 to 6.2.1 (#13202)
Bumps [@storybook/addon-a11y](https://github.com/storybookjs/storybook/tree/HEAD/addons/a11y) from 6.1.21 to 6.2.1.
- [Release notes](https://github.com/storybookjs/storybook/releases)
- [Changelog](https://github.com/storybookjs/storybook/blob/next/CHANGELOG.md)
- [Commits](https://github.com/storybookjs/storybook/commits/v6.2.1/addons/a11y)

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-04-01 12:32:24 -06:00
Julianna Tetreault
95571df8b3
[15-Minute Fix] Fix Flaky trusted_user_flags_user_spec (#13224)
* Load a users profile page twice to get spec to pass

* Add TODO in place of Fix me

* Remove superfluous text from comment and trigger CLA
2021-04-01 11:41:28 -06:00
Jacob Herrington
a360d01c37
Make docs reflect code more accurately (#13219) 2021-04-01 08:21:34 -05:00
dependabot[bot]
88861b3b8d
Bump @storybook/addon-actions from 6.1.21 to 6.2.1 (#13211) 2021-04-01 08:57:53 -04:00
dependabot[bot]
13a80d5d7a
Bump @storybook/addon-docs from 6.1.21 to 6.2.1 (#13215) 2021-04-01 08:31:51 -04:00
dependabot[bot]
5ff1ddbe82
Bump cypress-rails from 0.4.2 to 0.5.0 (#13220) 2021-04-01 08:30:14 -04:00
Michael Kohl
28e38cbb7d
Add flag link to profile dropdown view (#12862)
* Add flag link to profile dropdown view

* Add JS for flag button on profile

* Only show flag button to trusted users

* Quick fix for accidental unflagging

This will be more properly addressed in a future refactoring.

* Update reaction specs

* Update spec

* Make flagging togglable

* Make CodeClimate happy

* Revert accidentally changed file

* CodeClimate

* Update app/javascript/profileDropdown/flagButton.js

Co-authored-by: Vaidehi Joshi <vaidehi.sj@gmail.com>

* Add JSDoc

* Remove second popup

* Refactor and add system spec

* CodeClimate

* Change send to public_send

* Address PR feedback by @aitchiss

Co-authored-by: Vaidehi Joshi <vaidehi.sj@gmail.com>
2021-04-01 09:26:43 +00:00
dependabot[bot]
a226379c45
Bump @testing-library/cypress from 7.0.4 to 7.0.5 (#13216)
Bumps [@testing-library/cypress](https://github.com/kentcdodds/cypress-testing-library) from 7.0.4 to 7.0.5.
- [Release notes](https://github.com/kentcdodds/cypress-testing-library/releases)
- [Changelog](https://github.com/testing-library/cypress-testing-library/blob/master/CHANGELOG.md)
- [Commits](https://github.com/kentcdodds/cypress-testing-library/compare/v7.0.4...v7.0.5)

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-04-01 11:23:00 +02:00
dependabot[bot]
205eee46a0
Bump @storybook/addon-links from 6.1.21 to 6.2.1 (#13210)
Bumps [@storybook/addon-links](https://github.com/storybookjs/storybook/tree/HEAD/addons/links) from 6.1.21 to 6.2.1.
- [Release notes](https://github.com/storybookjs/storybook/releases)
- [Changelog](https://github.com/storybookjs/storybook/blob/next/CHANGELOG.md)
- [Commits](https://github.com/storybookjs/storybook/commits/v6.2.1/addons/links)

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-03-31 14:46:02 -06:00
dependabot[bot]
67bc7e808e
Bump @storybook/preact from 6.1.21 to 6.2.1 (#13209)
Bumps [@storybook/preact](https://github.com/storybookjs/storybook/tree/HEAD/app/preact) from 6.1.21 to 6.2.1.
- [Release notes](https://github.com/storybookjs/storybook/releases)
- [Changelog](https://github.com/storybookjs/storybook/blob/next/CHANGELOG.md)
- [Commits](https://github.com/storybookjs/storybook/commits/v6.2.1/app/preact)

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-03-31 14:45:41 -06:00
Jamie Gaskins
e953b67ce5
Fix user_id tag in EDAC traces (#13213) 2021-03-31 15:58:08 -04:00
Molly Struve
8fac1b756c
Optimization:Remove Twitter Counts From User Table in db (#13208) 2021-03-31 14:44:15 -05:00
dependabot[bot]
3b61179515
Bump @storybook/addon-storysource from 6.1.21 to 6.2.1 (#13207)
Bumps [@storybook/addon-storysource](https://github.com/storybookjs/storybook/tree/HEAD/addons/storysource) from 6.1.21 to 6.2.1.
- [Release notes](https://github.com/storybookjs/storybook/releases)
- [Changelog](https://github.com/storybookjs/storybook/blob/next/CHANGELOG.md)
- [Commits](https://github.com/storybookjs/storybook/commits/v6.2.1/addons/storysource)

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-03-31 13:27:00 -06:00
dependabot[bot]
a9c47699e6
Bump @storybook/addon-knobs from 6.1.21 to 6.2.1 (#13205)
Bumps [@storybook/addon-knobs](https://github.com/storybookjs/storybook/tree/HEAD/addons/knobs) from 6.1.21 to 6.2.1.
- [Release notes](https://github.com/storybookjs/storybook/releases)
- [Changelog](https://github.com/storybookjs/storybook/blob/next/CHANGELOG.md)
- [Commits](https://github.com/storybookjs/storybook/commits/v6.2.1/addons/knobs)

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-03-31 12:36:44 -06:00
dependabot[bot]
93c80b35af
Bump @testing-library/user-event from 13.0.16 to 13.1.1 (#13204)
Bumps [@testing-library/user-event](https://github.com/testing-library/user-event) from 13.0.16 to 13.1.1.
- [Release notes](https://github.com/testing-library/user-event/releases)
- [Changelog](https://github.com/testing-library/user-event/blob/master/CHANGELOG.md)
- [Commits](https://github.com/testing-library/user-event/compare/v13.0.16...v13.1.1)

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-03-31 12:05:16 -06:00
Vaidehi Joshi
52b3d47a04
Remove pro role from users and database (#13176) 2021-03-31 09:34:10 -07:00
Nick Taylor
38aa5bd96c
Added the no-only-tests eslint rule to the cypress eslint config. (#13191) 2021-03-31 12:20:17 -04:00
Molly Struve
20c6b39a30
Optimization:Remove Unused Twitter Counts from User (#13196) 2021-03-31 10:57:03 -05:00
dependabot[bot]
3cebaf1d66
Bump faker from 5.5.1 to 5.5.2 (#13199)
Bumps [faker](https://github.com/Marak/Faker.js) from 5.5.1 to 5.5.2.
- [Release notes](https://github.com/Marak/Faker.js/releases)
- [Changelog](https://github.com/Marak/faker.js/blob/master/CHANGELOG.md)
- [Commits](https://github.com/Marak/Faker.js/compare/v5.5.1...v5.5.2)

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-03-31 09:16:33 -06:00
dependabot[bot]
cf4ccf03c9
Bump listen from 3.5.0 to 3.5.1 (#13197)
Bumps [listen](https://github.com/guard/listen) from 3.5.0 to 3.5.1.
- [Release notes](https://github.com/guard/listen/releases)
- [Commits](https://github.com/guard/listen/compare/v3.5.0...v3.5.1)

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-03-31 08:11:09 -06:00
dependabot[bot]
5323113f67
Bump @testing-library/dom from 7.30.1 to 7.30.3 (#13203)
Bumps [@testing-library/dom](https://github.com/testing-library/dom-testing-library) from 7.30.1 to 7.30.3.
- [Release notes](https://github.com/testing-library/dom-testing-library/releases)
- [Changelog](https://github.com/testing-library/dom-testing-library/blob/master/CHANGELOG.md)
- [Commits](https://github.com/testing-library/dom-testing-library/compare/v7.30.1...v7.30.3)

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-03-31 07:52:51 -06:00
Suzanne Aitchison
6f057fc8ce
Add mention autocomplete to posts (#13101)
* WIP - initial exploration into post mentioon autocomplete

* replace the autosize textarea with mention autocomplete, adjusting height

* add cypress tests for mentioning in a post

* fix resizing of text areas

* refactor text area resize hook

* refactoring

* update cypress tests

* remove mergeRefs from utils, extract UserListItemContent

* allow useTextAreaAutoResize elements to have height greater than minimum, apply styles to container

* Trigger Travis CI

* Travis plz

* small refactors

* add comments and constants as per PR feedback

Co-authored-by: Nick Taylor <nick@dev.to>
2021-03-31 14:42:59 +01:00
Ridhwana
4848a8b2e1
User Settings Step 1: Add user_settings and user_notification_settings tables (rfc#32) (#12768)
* feat: add the two new models users_setting and users_notification_setting

* feat: add the settings and notification_settings table to the schema

* feat: add the user and notification models

* feat: add the user_id foreign key to the model

* chore: sneaky indent

* feat: add some fields from the profile attributes

* Revert "feat: add some fields from the profile attributes"

This reverts commit 376828746ded063a243505d317140fa5339227cf.

* chore: add some profile field attributes

* chore: remove language_settings

* chore: update indent

* chore: remove language_settings

* feat: changes to the tables

* chore:  remove validation in favor of the foreign keys

* chore: add default for editor version

* Address PR review suggestions

* setting_spec.rb needs to be fixed; need help

* Working on PR review comments

* Continue with addressing PR review comments

* Remove normalize_config_values method; pass correct values from forms

* Address Travis failures

* revert some unnecessary changes in spec file

Co-authored-by: Arit Amana <msarit@gmail.com>
2021-03-31 14:37:46 +02:00
dependabot[bot]
d77b21b9b5
Bump postcss from 8.2.8 to 8.2.9 (#13198) 2021-03-31 05:59:03 -04:00
Vaidehi Joshi
95055b2a89
Remove pro role + expose analytics to all users via dashboard (#13156)
* Remove pro role on user, expose pro dashboard to all users as analytics

* Remove pro from Elasticsearch mappings

* Update user role docs to use :trusted over :pro

* Remove pro from Role model spec

* Remove more references to pro, as noted by @rhymes
2021-03-30 15:02:18 -07:00
Molly Struve
2534a8aa5f
Doc Update:Remove no longer used tech from overview docs (#13192) 2021-03-30 16:41:38 -05:00
Molly Struve
c410c2a645
Bug Fix:Remove Suggest a Tweet since we no longer have that feature (#13188) 2021-03-30 15:17:25 -05:00
Nick Taylor
b7fb9f0917
[15 Min Fix] Got rid of some E2E test flakiness (#13187)
* Finding this button by role makes the test always pass on my local. CI was fine.

* Fixed another flaky test.
2021-03-30 14:58:12 -04:00
Vaidehi Joshi
7fbbfa0a2d
[15 Min Fix]: Fix template error in badge achievement notification view (#13186)
* Fix template error in badge achievement notification view

Fixes https://app.honeybadger.io/projects/72638/faults/78624140.

* hello travis are you there its me vaidehi

* why arent you building my PR come onnnnn
2021-03-30 10:45:37 -07:00
Suzanne Aitchison
7af30e8bfc
reinstate reply to comment e2e test (#13181)
* reinstate reply to comment e2e test

* refactor selector for reply comment box

* refactor and remove data testid no longer needed
2021-03-30 16:31:07 +01:00
dependabot[bot]
ae51dc0466
Bump @babel/core from 7.13.13 to 7.13.14 (#13178) 2021-03-30 07:39:48 -04:00
dependabot[bot]
fcd5a6fd35
Bump svgo from 2.2.2 to 2.3.0 (#13179) 2021-03-30 07:21:14 -04:00
Nick Taylor
71d7be16b8
[15 minute fix] Now mention auto-complete dynamic imports are cached. (#13146)
* Now mention auto-complete dynamic imports are cached.

* Removed explicit setting of undefined.

* Put back setting window.Forem.mentionAutoCompleteImports to undefined to be explicit.
2021-03-30 13:20:15 +02:00
Nick Taylor
871650053c
[15 minute fix] Fixed bug with templates not being inserted for comments. (#13149)
* Fixed bug with templates not being inserted for comments.

* Removed some trailing white space from a heading.

* Added custom Cypress command to create an article.

* Added E2E tests for creating comments on an article.

* Fixed adding a comment issue caused by mention auto-complete.

* Fixed a selector for the E2E tests.

* Removed some unnecessary white space and also making code climate happy.

* Updated E2E test.

* Added a bit more to the E2E tests.

* Now validation for comment doesn't need to loop through textareas.

* Merge remote-tracking branch 'origin/master' into nickytonline/fix-comment-template-insertion-bug

* Removed a similar spec file and added tests to the other file.

* wip

* Fixed bug where a response template could not be submitted.

* Added/updated E2E tests.

* Reverted a small change to condition for showing the combobox popover.

* Undoing some white space changes as not related to PR.

* Trigger Build

* Put back article seed data as it's used in tests outside of comment tests.
2021-03-30 13:02:54 +02:00
Anna Buianova
40b989ca62
Configure badge credits by admins (#13145)
* Added credits_awarded to /admin/badges forms

* Award credits only if badge has them

* Removed information about credits and listings in the new badge email when not needed

* Specs for number of credits awarded for badges

* Added missing newline

* Fix typo

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

* Improve new_badge_email.text.erb

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

* Fixed number of credits in notification

* Added specs for number of credits in notifications

Co-authored-by: Julianna Tetreault <32834804+juliannatetreault@users.noreply.github.com>
2021-03-30 10:58:48 +03:00