Daniel Uber
d6b4e83190
When updating article scores, use new score for blackbox ( #13009 )
...
Fixes #13008
Add a test case for blackbox stability
This failed as expected on master and passed on this branch, when a
reaction (which would change the article's calculated score during
update) is added, the hotness should be stable, and not modified
during the second call to `#update_score`.
2021-03-18 14:20:27 -05:00
dependabot[bot]
fdf91eb5f2
Bump oj from 3.11.2 to 3.11.3 ( #13040 )
...
Bumps [oj](https://github.com/ohler55/oj ) from 3.11.2 to 3.11.3.
- [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.11.2...v3.11.3 )
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-03-18 19:18:01 +01:00
Daniel Uber
195b202d85
Use normal db transactions around tests ( #13035 )
...
* Use normal db transactions around tests
An unrelated spec failure was observed when this was run before
another test expecting the seed data to be present. It looks like the
specific pain point in https://github.com/forem/forem/pull/8865 was
around an rss reader spec (which is no longer in use) and I'd like to
try reverting this truncation behavior here.
The minimal failing test case I had on master was this
```
rspec ./spec/system/dashboards/user_sorts_dashboard_articles_spec.rb:44 ./spec/lib/data_update_scripts/fix_profile_field_edge_cases_spec.rb
```
The find_by(attribute:...) in the edge case spec returned nil (since
there was no such profile field, the table had been truncated). Tests
pass locally so this might be fine to just leave on the defaults (if
that's the case the truncation support added in #8865 can also be
removed, this is the last caller).
* Reenable transactional feeds imports
rhymes pointed out that a second test uses this db_strategy and that's
the successor to the rss_feed_spec.rb that was the initial issue.
Attempt removal of the truncation strategy, and reenable the
transactional tests, for the feeds import.
* Remove database cleaner
Having removed the last use of it (in the feeds import spec) we no
longer need this gem.
* remove spec support for database cleaner
2021-03-18 12:56:55 -05:00
Andy Zhao
8dd65bd0a3
Get the correct episode by finding the given podcast's episodes ( #13034 )
...
* Only search for the given podcast's episodes
* Make describe value a bit more readable
* Add podcast episode show spec
2021-03-18 12:02:37 -04:00
Suzanne Aitchison
e3c97d18d6
Update storybook mention autocomplete component to take over whole textarea ( #13044 )
...
* Revert "Revert "Update storybook autocomplete component (#12980 )" (#13027 )"
This reverts commit f393dd2bbc .
* create helper function to replace node, add comments
* minor refactors
2021-03-18 15:04:59 +00:00
dependabot[bot]
459378d218
Bump jsonapi-serializer from 2.1.0 to 2.2.0 ( #13039 )
...
Bumps [jsonapi-serializer](https://github.com/jsonapi-serializer/jsonapi-serializer ) from 2.1.0 to 2.2.0.
- [Release notes](https://github.com/jsonapi-serializer/jsonapi-serializer/releases )
- [Changelog](https://github.com/jsonapi-serializer/jsonapi-serializer/blob/master/CHANGELOG.md )
- [Commits](https://github.com/jsonapi-serializer/jsonapi-serializer/compare/v2.1.0...v2.2.0 )
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-03-18 09:23:08 -05:00
dependabot[bot]
e36d89c291
Bump honeybadger from 4.7.3 to 4.8.0 ( #13038 ) [deploy]
...
Bumps [honeybadger](https://github.com/honeybadger-io/honeybadger-ruby ) from 4.7.3 to 4.8.0.
- [Release notes](https://github.com/honeybadger-io/honeybadger-ruby/releases )
- [Changelog](https://github.com/honeybadger-io/honeybadger-ruby/blob/master/CHANGELOG.md )
- [Commits](https://github.com/honeybadger-io/honeybadger-ruby/compare/v4.7.3...v4.8.0 )
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-03-18 07:58:44 -06:00
dependabot[bot]
33d0e03dbd
Bump rpush from 5.3.0 to 5.4.0 ( #13041 )
...
Bumps [rpush](https://github.com/rpush/rpush ) from 5.3.0 to 5.4.0.
- [Release notes](https://github.com/rpush/rpush/releases )
- [Changelog](https://github.com/rpush/rpush/blob/master/CHANGELOG.md )
- [Commits](https://github.com/rpush/rpush/compare/v5.3.0...v5.4.0 )
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-03-18 12:47:42 +01:00
dependabot[bot]
47dcf7d20d
Bump cypress from 6.7.1 to 6.8.0 ( #13042 )
...
Bumps [cypress](https://github.com/cypress-io/cypress ) from 6.7.1 to 6.8.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/v6.7.1...v6.8.0 )
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-03-18 10:08:53 +00:00
rhymes
8b9f2d546c
Use faster serializers for Search::Postgres::Tag ( #13022 )
...
* Use faster serializers for Search::Postgres::Tag
* Fix spec
2021-03-18 09:30:56 +01:00
Nick Taylor
f222497913
Disabled 'no default exports' rule for Storybook files and Stimulus controllers ( #13032 )
2021-03-17 21:29:39 -04:00
dependabot[bot]
a7056ab650
Bump counter_culture from 2.7.0 to 2.8.0 ( #13021 )
...
Bumps [counter_culture](https://github.com/magnusvk/counter_culture ) from 2.7.0 to 2.8.0.
- [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/v2.7.0...v2.8.0 )
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-03-17 15:00:18 -05:00
Nick Taylor
f393dd2bbc
Revert "Update storybook autocomplete component ( #12980 )" ( #13027 )
2021-03-17 15:59:38 -04:00
Alex
1e4d4db562
[Search 2.0] Add Search::Postgres::Username behind a feature flag ( #12975 )
...
* Add PostgreSQL FTS for usernames
* Change profile_image_90 logic
* Make search_users private
* Add tsvector index on usernames
* Limit the number of search results
* Update index name
2021-03-17 13:45:58 -04:00
Kurnia Muhamad
51b3a90cbf
Fix github readme liquid tag ( #12836 )
...
* Fix github readme liquid tag
* Update github liquid tag style
2021-03-17 17:16:26 +01:00
Michael Kohl
7c7a8dcd45
Remove experimental /call functionality from Connect ✂️ ✂️ ✂️ ( #12979 )
...
* Remove Twilio gem
* remove VideoChatsController + views and specs
* Remove /call related code
* Update spec
* More JS cleanup
* Restore wrongly deleted files
* Remove obsolete files
* More cleanup
2021-03-17 17:06:15 +01:00
dependabot[bot]
5bd87b93d6
Bump flipper-active_record from 0.20.3 to 0.20.4 ( #13016 )
...
Bumps [flipper-active_record](https://github.com/jnunemaker/flipper ) from 0.20.3 to 0.20.4.
- [Release notes](https://github.com/jnunemaker/flipper/releases )
- [Changelog](https://github.com/jnunemaker/flipper/blob/master/Changelog.md )
- [Commits](https://github.com/jnunemaker/flipper/compare/v0.20.3...v0.20.4 )
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-03-17 17:05:49 +01:00
Rafi
09c645f5a1
Adding aria labels in Suggested people to follow screen during onboarding ( #12384 )
...
Co-authored-by: Nick Taylor <nick@dev.to>
2021-03-17 11:59:50 -04:00
Josh Puetz
80e8129628
Configurre bundler to ignore Rpush install message ( #13025 )
2021-03-17 10:55:11 -05:00
Suzanne Aitchison
76a7ed6dbe
Update storybook autocomplete component ( #12980 )
2021-03-17 11:49:16 -04:00
Daniel Uber
91b99fce7a
Add and document COVERAGE environment variable in the sample ( #13013 )
...
Running coverage is great, but it's definitely something I don't want
to do when interactively using the test suite (running a single file
or single example, this adds 20+ seconds for me).
2021-03-17 10:27:59 -05:00
dependabot[bot]
9e906af519
Bump ibm-openapi-validator from 0.36.0 to 0.37.1 ( #13020 )
...
Bumps [ibm-openapi-validator](https://github.com/IBM/openapi-validator ) from 0.36.0 to 0.37.1.
- [Release notes](https://github.com/IBM/openapi-validator/releases )
- [Changelog](https://github.com/IBM/openapi-validator/blob/main/CHANGELOG.md )
- [Commits](https://github.com/IBM/openapi-validator/compare/v0.36.0...v0.37.1 )
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-03-17 10:08:28 -05:00
Nick Taylor
7c1343be9e
Revert "Revert "Removed service worker ( #12974 )" ( #13014 )" ( #13015 )
...
This reverts commit 2416387fb4 .
2021-03-17 10:57:56 -04:00
dependabot[bot]
4e997e7e3a
Bump fastly from 3.0.0 to 3.0.1 ( #13019 )
...
Bumps [fastly](https://github.com/fastly/fastly-ruby ) from 3.0.0 to 3.0.1.
- [Release notes](https://github.com/fastly/fastly-ruby/releases )
- [Changelog](https://github.com/fastly/fastly-ruby/blob/master/CHANGELOG.md )
- [Commits](https://github.com/fastly/fastly-ruby/compare/v3.0.0...v3.0.1 )
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-03-17 09:39:25 -05:00
Jeferson S. Brito
eb2b851e45
Fix github issue liquid tag styles ( #12839 )
...
* Fix github liquid tag styles
* Replace className and fix styles
* Fix text color variable
* Fix markup to original and update styles
* Refactor gh button to use crayons styles
2021-03-17 09:55:15 +00:00
dependabot[bot]
429d1f3e4a
Bump @testing-library/user-event from 12.8.3 to 13.0.0 ( #13018 )
...
Bumps [@testing-library/user-event](https://github.com/testing-library/user-event ) from 12.8.3 to 13.0.0.
- [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/v12.8.3...v13.0.0 )
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-03-17 10:53:44 +01:00
dependabot[bot]
94ec2d96db
Bump flipper-ui from 0.20.3 to 0.20.4 ( #13017 )
...
Bumps [flipper-ui](https://github.com/jnunemaker/flipper ) from 0.20.3 to 0.20.4.
- [Release notes](https://github.com/jnunemaker/flipper/releases )
- [Changelog](https://github.com/jnunemaker/flipper/blob/master/Changelog.md )
- [Commits](https://github.com/jnunemaker/flipper/compare/v0.20.3...v0.20.4 )
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-03-17 09:28:24 +01:00
Daniel Uber
71df6eaddf
Only check cache or database once ( #13010 )
...
* Only check cache or database once
Since `@trusted` is a boolean true/false value, we can't use the
`@ivar || value` pattern, and want instead to check if the variable
has been defined.
Fixes #13006
* Add unit test around memoization behavior
In local testing I was able to get this to fail by changing the
2.times block to include `remove_instance_variable(:@trusted)` (so the
`allow...once` check is sufficient to ensure we are not calling the
cache more than once per instance when false).
2021-03-16 18:58:57 -05:00
Molly Struve
2416387fb4
Revert "Removed service worker ( #12974 )" ( #13014 )
...
This reverts commit 4fb6230606 .
2021-03-16 18:10:01 -05:00
Nick Taylor
4fb6230606
Removed service worker ( #12974 )
2021-03-16 15:55:31 -04:00
Daniel Uber
16d17445a5
reenable article rescoring when moderators flag users ( #12983 )
...
* Update worker calculation and disable early return
* Enable service tests
This updates the test to look at the individual article scores
changing, rather than the sum of the articles scores changing
The scores lambda was added as a way to observe this eagerly
* Correctly handle raising the score when vomit is cleared
The initial implementation loaded the articles reactions and the
user's reactions in order to rescore. This restores that activity.
It occurs to me that article.reactions.sum(:points) +
user.reactions.sum(:points) feels like something articles should know
how to do, in which case we can move this into article (#rescore!)?
and call that instead of knowing how to handle moderation specially here.
* Move logic to Article#update_score
Having realized "sum of reaction scores" was an Article concern, I
found that we have a worker to score articles that does _exactly_ what
we're doing here.
Let's use that and allow the vomit reaction presence or absence on a
user to automatically affect the article calculations.
This is at least n + 1 and maybe worse.
2021-03-16 14:04:13 -05:00
rhymes
1b89d6c72b
Upgrade rspec-rails to 5.0 ( #13005 )
2021-03-16 17:34:10 +01:00
dependabot[bot]
9b8a586345
Bump preact from 10.5.12 to 10.5.13 ( #12994 )
...
Bumps [preact](https://github.com/preactjs/preact ) from 10.5.12 to 10.5.13.
- [Release notes](https://github.com/preactjs/preact/releases )
- [Commits](https://github.com/preactjs/preact/compare/10.5.12...10.5.13 )
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-03-16 10:24:23 -05:00
Mac Siri
e31da314a2
Nullify fetch_format for Imgproxy ( #12988 )
2021-03-16 10:36:27 -04:00
Arit Amana
04d5ea8e82
Update the UI for Low-Quality-Comments Notice ( #12952 )
...
* Implement change for regular comments
* Modify tests and implement for deleted-commentable-comment
* Fix stupid mistake
2021-03-16 09:40:29 -04:00
Josh Puetz
7f164c2da3
Add test for DevicesController ( #12985 )
...
* Add test for DevicesController
* Remove defensive calls
2021-03-16 08:33:25 -05:00
dependabot[bot]
dd988c0857
Bump cypress from 6.6.0 to 6.7.1 ( #13000 )
...
Bumps [cypress](https://github.com/cypress-io/cypress ) from 6.6.0 to 6.7.1.
- [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/v6.6.0...v6.7.1 )
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-03-16 13:19:04 +01:00
dependabot[bot]
f78882ada5
Bump css-loader from 5.1.2 to 5.1.3 ( #13001 )
...
Bumps [css-loader](https://github.com/webpack-contrib/css-loader ) from 5.1.2 to 5.1.3.
- [Release notes](https://github.com/webpack-contrib/css-loader/releases )
- [Changelog](https://github.com/webpack-contrib/css-loader/blob/master/CHANGELOG.md )
- [Commits](https://github.com/webpack-contrib/css-loader/compare/v5.1.2...v5.1.3 )
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-03-16 12:36:36 +01:00
Nick Taylor
c884082aa0
Turned off deprecated rule in jsx-a11y eslint plugin. ( #12986 )
2021-03-16 12:36:16 +01:00
dependabot[bot]
31f695d86e
Bump ibm-openapi-validator from 0.35.2 to 0.36.0 ( #12995 )
...
Bumps [ibm-openapi-validator](https://github.com/IBM/openapi-validator ) from 0.35.2 to 0.36.0.
- [Release notes](https://github.com/IBM/openapi-validator/releases )
- [Changelog](https://github.com/IBM/openapi-validator/blob/main/CHANGELOG.md )
- [Commits](https://github.com/IBM/openapi-validator/compare/v0.35.2...v0.36.0 )
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-03-16 12:32:30 +01:00
dependabot[bot]
18a0fd5f61
Bump jsdom from 16.5.0 to 16.5.1 ( #12996 )
...
Bumps [jsdom](https://github.com/jsdom/jsdom ) from 16.5.0 to 16.5.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/16.5.0...16.5.1 )
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-03-16 08:57:09 +07:00
dependabot[bot]
4cc6688852
Bump eslint from 7.21.0 to 7.22.0 ( #12997 )
...
Bumps [eslint](https://github.com/eslint/eslint ) from 7.21.0 to 7.22.0.
- [Release notes](https://github.com/eslint/eslint/releases )
- [Changelog](https://github.com/eslint/eslint/blob/master/CHANGELOG.md )
- [Commits](https://github.com/eslint/eslint/compare/v7.21.0...v7.22.0 )
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-03-16 08:56:53 +07:00
Michael Kohl
2513de92fb
Add rate limit for new user comments ( #12925 )
...
* Add rate limit for new user comments
* Rename limit, add check to controller
* Add spec
* Fix specs
2021-03-16 08:39:31 +07:00
Fernando Valverde
cf3bde4259
Add mobile push notifications to Forem ( #12419 )
...
* First commit with iOS PN working
* RPush cleanup worker + unique jobs config
* Remove rpush tables from schema.rb
* PR feedback
* Feature flag and test for route
* Tests and feature flag PushNotification ::Send
* Update app/controllers/devices_controller.rb
Co-authored-by: Michael Kohl <citizen428@dev.to>
* Update spec/routing/devices_routes_spec.rb
Co-authored-by: Michael Kohl <citizen428@dev.to>
* Update spec/services/push_notifications/send_spec.rb
Co-authored-by: Michael Kohl <citizen428@dev.to>
* PR feedback
* Set Rpush driver and url
* More PR feedback
* Apply suggestions from code review
Co-authored-by: Jamie Gaskins <jgaskins@gmail.com>
* PR feedback from Rhymes
* Don’t double render
* Sure
Co-authored-by: Josh Puetz <hi@joshpuetz.com>
Co-authored-by: Josh Puetz <josh@dev.to>
Co-authored-by: Michael Kohl <citizen428@dev.to>
Co-authored-by: Jamie Gaskins <jgaskins@gmail.com>
2021-03-12 14:08:18 -06:00
Daniel Uber
f1d85e666b
Add SENDGRID_API_KEY to .env_sample ( #12982 )
...
This is only useful in production, but helpful to see there is such an
environment variable needed.
Closes #12977
2021-03-12 10:58:08 -06:00
Suraj Vishwakarma
3417dd5447
Fix : background box of the button on profile via chat section issue 2nd PR: #12879 ( #12920 )
...
* chat-profile
* updated-chat-profile
2021-03-12 13:32:13 +01:00
rhymes
c0ea4e5878
[Search 2.0] Add Search::Postgres::Tag behind a feature flag ( #12937 )
...
* Add Search::Postgres::Tag to retrieve tags for autocompletion
* Add Search::Postgres::Tag in SearchController behind a feature flag
* Update spec/services/search/postgres/tag_spec.rb
Co-authored-by: Michael Kohl <citizen428@dev.to>
* Add index to tags.supported
* Fix hotness_score ordering
Co-authored-by: Michael Kohl <citizen428@dev.to>
2021-03-11 19:12:30 +01:00
Vaidehi Joshi
41ef7a7c3e
Bump MAX_USER_MENTION_LIVE_AT in comment model ( #12972 )
2021-03-11 09:42:32 -08:00
Fernando Valverde
13e335e172
Adds more exceptions to SW paths ( #12971 )
2021-03-11 11:01:59 -06:00
Lisa Sy
170f894aed
Improve UI design through small spacing tweaks ( #12964 )
2021-03-11 08:50:34 -08:00