Commit graph

11729 commits

Author SHA1 Message Date
dependabot[bot]
4f220614cd
Bump i18n-tasks from 1.0.10 to 1.0.11 (#17929)
Bumps [i18n-tasks](https://github.com/glebm/i18n-tasks) from 1.0.10 to 1.0.11.
- [Release notes](https://github.com/glebm/i18n-tasks/releases)
- [Changelog](https://github.com/glebm/i18n-tasks/blob/main/CHANGES.md)
- [Commits](https://github.com/glebm/i18n-tasks/compare/v1.0.10...v1.0.11)

---
updated-dependencies:
- dependency-name: i18n-tasks
  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-06-16 14:55:54 -04:00
Suzanne Aitchison
c3fd59f436
Revert "Bump lint-staged from 12.4.1 to 13.0.1 (#17915)" (#17936)
This reverts commit 551e42d80e.
2022-06-16 11:06:36 -04:00
Mac Siri
80d9b969bd
Enable Rails framework 7.0's ActiveStorage & ActionMailer (#17931) 2022-06-16 10:49:56 -04:00
Suzanne Aitchison
b94c5deea6
Admin member index: filter by member roles (#17884)
* prevent ID conflicts in filters modal by caching content

* show roles with expandable section

* minor tweak

* don't use the hidden field

* send array of role

* role -> roles. small refactor

* set initial checked status

* show an indicator when a filter is applied

* add JS to toggle filter clear buttons and indicators

* update some comments, make sure users only appear once in list

* add some cypress specs, fix some bugs
2022-06-16 15:06:35 +01:00
dependabot[bot]
b83deac828
Bump octokit from 4.24.0 to 4.25.0 (#17933)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-06-16 08:44:24 -05:00
Joshua Wehner
07e1364f54
Trusted users can view & use moderator response templates (#17867)
* Trusted users can use moderator response templates

* Iron out container reveal logic

* Explanatory comment on controller endpoint confusion
2022-06-16 14:05:49 +02:00
dependabot[bot]
551e42d80e
Bump lint-staged from 12.4.1 to 13.0.1 (#17915)
Bumps [lint-staged](https://github.com/okonet/lint-staged) from 12.4.1 to 13.0.1.
- [Release notes](https://github.com/okonet/lint-staged/releases)
- [Commits](https://github.com/okonet/lint-staged/compare/v12.4.1...v13.0.1)

---
updated-dependencies:
- dependency-name: lint-staged
  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>
2022-06-16 09:28:05 +01:00
Jeremy Friesen
b4f17ed7dc
Allowing UserQuery to filter on multiple roles (#17919)
I had looked at using `User.with_any_roles` but that creates one User
query per role passed.  Which is not ideal, given that we want to have
an ActiveRecord::Relation object on which we'd paginate.

This adjustment does it's best to mimic Forem's role structure and
adhear to how Rolify builds the underlying query.

An astute reader will notice that in these specs we use `role: "admin"`
and `roles: ["Admin"]`; the primary reason relates the user interface
being worked on in forem/forem#17884.  It is my understanding that the
`role` approach and `roles` approach will be separated by a feature
flag (we're rolling out the `roles` approach).

Related to
- forem/forem#17491
- forem/forem#17884
2022-06-15 08:50:03 -04:00
dependabot[bot]
76eb01b0cd
Bump @babel/eslint-parser from 7.17.0 to 7.18.2 (#17916)
Bumps [@babel/eslint-parser](https://github.com/babel/babel/tree/HEAD/eslint/babel-eslint-parser) from 7.17.0 to 7.18.2.
- [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.18.2/eslint/babel-eslint-parser)

---
updated-dependencies:
- dependency-name: "@babel/eslint-parser"
  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-06-14 21:44:54 -04:00
dependabot[bot]
69ca58d49f
Bump @etchteam/storybook-addon-css-variables-theme from 1.2.0 to 1.2.1 (#17918)
Bumps [@etchteam/storybook-addon-css-variables-theme](https://github.com/etchteam/storybook-addon-css-variables-theme) from 1.2.0 to 1.2.1.
- [Release notes](https://github.com/etchteam/storybook-addon-css-variables-theme/releases)
- [Commits](https://github.com/etchteam/storybook-addon-css-variables-theme/commits)

---
updated-dependencies:
- dependency-name: "@etchteam/storybook-addon-css-variables-theme"
  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-06-14 21:44:45 -04:00
dependabot[bot]
6ba577a674
Bump sidekiq-unique-jobs from 7.1.24 to 7.1.25 (#17921)
Bumps [sidekiq-unique-jobs](https://github.com/mhenrixon/sidekiq-unique-jobs) from 7.1.24 to 7.1.25.
- [Release notes](https://github.com/mhenrixon/sidekiq-unique-jobs/releases)
- [Changelog](https://github.com/mhenrixon/sidekiq-unique-jobs/blob/main/CHANGELOG.md)
- [Commits](https://github.com/mhenrixon/sidekiq-unique-jobs/compare/v7.1.24...v7.1.25)

---
updated-dependencies:
- dependency-name: sidekiq-unique-jobs
  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-06-14 21:43:58 -04:00
dependabot[bot]
fa7c162a6f
Bump imgproxy from 2.0.1 to 2.1.0 (#17920)
Bumps [imgproxy](https://github.com/imgproxy/imgproxy.rb) from 2.0.1 to 2.1.0.
- [Release notes](https://github.com/imgproxy/imgproxy.rb/releases)
- [Commits](https://github.com/imgproxy/imgproxy.rb/compare/v2.0.1...v2.1.0)

---
updated-dependencies:
- dependency-name: imgproxy
  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>
2022-06-14 21:43:34 -04:00
dependabot[bot]
e4eb6cbfb9
Bump rubocop-rails from 2.14.2 to 2.15.0 (#17922)
Bumps [rubocop-rails](https://github.com/rubocop/rubocop-rails) from 2.14.2 to 2.15.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.14.2...v2.15.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>
2022-06-14 21:22:10 -04:00
dependabot[bot]
10eff70aca
Bump jest from 28.1.0 to 28.1.1 (#17917)
Bumps [jest](https://github.com/facebook/jest/tree/HEAD/packages/jest) from 28.1.0 to 28.1.1.
- [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/v28.1.1/packages/jest)

---
updated-dependencies:
- dependency-name: jest
  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-06-14 16:34:57 +01:00
Arit Amana
d15d36da54
Allow Moderator Role to adjust post tags (#17858)
* building

* Implement flow; tests pending

* complete backend work

* add e2e tests

* fix error in specs

* address Pr review comments

* add specs for article_policy changes

* method refactor

* refactors

* add max_tag_List_size constant

* destroy all test tags

* test db cleaned!

* COMPLETED T THE SPECS!!! 💃💃

* optimization

* reverse "optimization" 😅
2022-06-14 10:55:19 -04:00
Julianna Tetreault
379a5fd3dd
Member Index View Actions: "Add Organization" (#17879)
* Adds an Add Organization modal and e2e tests for the modal

* Conditionally redirects to the correct view upon adding org

* Combines modal tests within userIndexView.spec.js

* Removes redundant code and switches assign role and add org button positions

* Updates RSpec tests to account for conditional redirection

* Lowercases the o in organization within _user_actions_dropdown.html.erb

* Fixes failing e2e tests
2022-06-14 08:31:51 -06:00
dependabot[bot]
a1dbfe35c8
Bump babel-jest from 28.1.0 to 28.1.1 (#17911)
Bumps [babel-jest](https://github.com/facebook/jest/tree/HEAD/packages/babel-jest) from 28.1.0 to 28.1.1.
- [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/v28.1.1/packages/babel-jest)

---
updated-dependencies:
- dependency-name: babel-jest
  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-06-14 08:05:02 -06:00
dependabot[bot]
eea8b5e230
Bump preact from 10.7.2 to 10.7.3 (#17913)
Bumps [preact](https://github.com/preactjs/preact) from 10.7.2 to 10.7.3.
- [Release notes](https://github.com/preactjs/preact/releases)
- [Commits](https://github.com/preactjs/preact/compare/10.7.2...10.7.3)

---
updated-dependencies:
- dependency-name: preact
  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-06-14 08:04:42 -06:00
dependabot[bot]
54854ef6be
Bump @storybook/manager-webpack5 from 6.5.7 to 6.5.9 (#17905)
Bumps [@storybook/manager-webpack5](https://github.com/storybookjs/storybook/tree/HEAD/lib/core) from 6.5.7 to 6.5.9.
- [Release notes](https://github.com/storybookjs/storybook/releases)
- [Changelog](https://github.com/storybookjs/storybook/blob/v6.5.9/CHANGELOG.md)
- [Commits](https://github.com/storybookjs/storybook/commits/v6.5.9/lib/core)

---
updated-dependencies:
- dependency-name: "@storybook/manager-webpack5"
  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-06-14 07:28:03 -06:00
dependabot[bot]
0ab7714295
Bump @babel/core from 7.17.10 to 7.18.5 (#17907)
Bumps [@babel/core](https://github.com/babel/babel/tree/HEAD/packages/babel-core) from 7.17.10 to 7.18.5.
- [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.18.5/packages/babel-core)

---
updated-dependencies:
- dependency-name: "@babel/core"
  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>
2022-06-14 11:40:53 +01:00
dependabot[bot]
ecc6d7b787
Bump @storybook/addon-actions from 6.4.22 to 6.5.9 (#17908)
Bumps [@storybook/addon-actions](https://github.com/storybookjs/storybook/tree/HEAD/addons/actions) from 6.4.22 to 6.5.9.
- [Release notes](https://github.com/storybookjs/storybook/releases)
- [Changelog](https://github.com/storybookjs/storybook/blob/v6.5.9/CHANGELOG.md)
- [Commits](https://github.com/storybookjs/storybook/commits/v6.5.9/addons/actions)

---
updated-dependencies:
- dependency-name: "@storybook/addon-actions"
  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-06-14 11:37:04 +01:00
dependabot[bot]
1f3feb6d7f
Bump @storybook/addon-controls from 6.4.22 to 6.5.9 (#17904)
Bumps [@storybook/addon-controls](https://github.com/storybookjs/storybook/tree/HEAD/addons/controls) from 6.4.22 to 6.5.9.
- [Release notes](https://github.com/storybookjs/storybook/releases)
- [Changelog](https://github.com/storybookjs/storybook/blob/v6.5.9/CHANGELOG.md)
- [Commits](https://github.com/storybookjs/storybook/commits/v6.5.9/addons/controls)

---
updated-dependencies:
- dependency-name: "@storybook/addon-controls"
  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>
2022-06-14 11:33:36 +01:00
dependabot[bot]
733f61fa1b
Bump @storybook/addon-docs from 6.4.22 to 6.5.9 (#17906)
Bumps [@storybook/addon-docs](https://github.com/storybookjs/storybook/tree/HEAD/addons/docs) from 6.4.22 to 6.5.9.
- [Release notes](https://github.com/storybookjs/storybook/releases)
- [Changelog](https://github.com/storybookjs/storybook/blob/v6.5.9/CHANGELOG.md)
- [Commits](https://github.com/storybookjs/storybook/commits/v6.5.9/addons/docs)

---
updated-dependencies:
- dependency-name: "@storybook/addon-docs"
  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-06-13 16:42:03 -04:00
dependabot[bot]
d876edae09
Bump ahoy_matey from 4.0.3 to 4.1.0 (#17899)
Bumps [ahoy_matey](https://github.com/ankane/ahoy) from 4.0.3 to 4.1.0.
- [Release notes](https://github.com/ankane/ahoy/releases)
- [Changelog](https://github.com/ankane/ahoy/blob/master/CHANGELOG.md)
- [Commits](https://github.com/ankane/ahoy/compare/v4.0.3...v4.1.0)

---
updated-dependencies:
- dependency-name: ahoy_matey
  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>
2022-06-13 14:20:21 -06:00
dependabot[bot]
6bb89c408e
Bump postcss from 8.4.13 to 8.4.14 (#17898)
Bumps [postcss](https://github.com/postcss/postcss) from 8.4.13 to 8.4.14.
- [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.13...8.4.14)

---
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-06-13 15:53:07 -04:00
dependabot[bot]
50333e0e43
Bump strong_migrations from 1.1.0 to 1.2.0 (#17902)
Bumps [strong_migrations](https://github.com/ankane/strong_migrations) from 1.1.0 to 1.2.0.
- [Release notes](https://github.com/ankane/strong_migrations/releases)
- [Changelog](https://github.com/ankane/strong_migrations/blob/master/CHANGELOG.md)
- [Commits](https://github.com/ankane/strong_migrations/compare/v1.1.0...v1.2.0)

---
updated-dependencies:
- dependency-name: strong_migrations
  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>
2022-06-13 15:52:26 -04:00
dependabot[bot]
09b42086ba
Bump @storybook/addon-backgrounds from 6.4.22 to 6.5.8 (#17901)
Bumps [@storybook/addon-backgrounds](https://github.com/storybookjs/storybook/tree/HEAD/addons/backgrounds) from 6.4.22 to 6.5.8.
- [Release notes](https://github.com/storybookjs/storybook/releases)
- [Changelog](https://github.com/storybookjs/storybook/blob/v6.5.8/CHANGELOG.md)
- [Commits](https://github.com/storybookjs/storybook/commits/v6.5.8/addons/backgrounds)

---
updated-dependencies:
- dependency-name: "@storybook/addon-backgrounds"
  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>
2022-06-13 15:52:17 -04:00
dependabot[bot]
24e56d071d
Bump ahoy_email from 2.1.2 to 2.1.3 (#17903)
Bumps [ahoy_email](https://github.com/ankane/ahoy_email) from 2.1.2 to 2.1.3.
- [Release notes](https://github.com/ankane/ahoy_email/releases)
- [Changelog](https://github.com/ankane/ahoy_email/blob/master/CHANGELOG.md)
- [Commits](https://github.com/ankane/ahoy_email/compare/v2.1.2...v2.1.3)

---
updated-dependencies:
- dependency-name: ahoy_email
  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-06-13 15:51:31 -04:00
Jeremy Friesen
234fd8b08d
Adjusting field_test index and show page (#17895)
This change introduces several things things:

1. Fixes the performance of the `/admin/abtests` page; instead of
   rendering all of the experiment results, just render the overview.
2. Adjust the show page for an experiment to show the summary of
   results.
3. Favor the existing "started_at" and "ended_at" attributes of
   FieldTest (see https://github.com/ankane/field_test#config)
4. Update the field test experiments to include the `started_at` and
   `ended_at` attributes.
5. Skip processing all non-active experiments in our conversion handler.

Why are there no tests?  This is a page that is Admin only and is only
visible for reporting purposes.  So, it's not quite worth writing tests
as you'd need lots of data.  So we'll assume the logic from the upstream
[field_test gem][1] is adequate.

Closes forem/forem#17869

[1]:https://github.com/ankane/field_test
2022-06-13 12:22:36 -04:00
Mac Siri
dc55db5708
Change Rails load_defaults to 6.1 (#17877) 2022-06-13 10:40:53 -04:00
Fernando Valverde
6b073d078b
Enable clickOutsideDeactivates on Onboarding FocusTrap (#17885) 2022-06-13 08:23:46 -06:00
dependabot[bot]
9ec7f31a5d
Bump sidekiq-cron from 1.5.0 to 1.5.1 (#17890)
Bumps [sidekiq-cron](https://github.com/ondrejbartas/sidekiq-cron) from 1.5.0 to 1.5.1.
- [Release notes](https://github.com/ondrejbartas/sidekiq-cron/releases)
- [Changelog](https://github.com/ondrejbartas/sidekiq-cron/blob/master/Changes.md)
- [Commits](https://github.com/ondrejbartas/sidekiq-cron/compare/v1.5.0...v1.5.1)

---
updated-dependencies:
- dependency-name: sidekiq-cron
  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-06-13 08:13:06 -06:00
dependabot[bot]
c1b44b70f7
Bump flipper, flipper-active_record, flipper-active_support_cache_store and flipper-ui (#17888)
Bumps [flipper](https://github.com/jnunemaker/flipper), [flipper-active_record](https://github.com/jnunemaker/flipper), [flipper-active_support_cache_store](https://github.com/jnunemaker/flipper) and [flipper-ui](https://github.com/jnunemaker/flipper). These dependencies needed to be updated together.

Updates `flipper` from 0.24.1 to 0.25.0
- [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.24.1...v0.25.0)

Updates `flipper-active_record` from 0.24.1 to 0.25.0
- [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.24.1...v0.25.0)

Updates `flipper-active_support_cache_store` from 0.24.1 to 0.25.0
- [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.24.1...v0.25.0)

Updates `flipper-ui` from 0.24.1 to 0.25.0
- [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.24.1...v0.25.0)

---
updated-dependencies:
- dependency-name: flipper
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: flipper-active_record
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: flipper-active_support_cache_store
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: flipper-ui
  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>
2022-06-13 08:12:31 -06:00
dependabot[bot]
2482f568b7
Bump ancestry from 4.1.0 to 4.2.0 (#17889)
Bumps [ancestry](https://github.com/stefankroes/ancestry) from 4.1.0 to 4.2.0.
- [Release notes](https://github.com/stefankroes/ancestry/releases)
- [Changelog](https://github.com/stefankroes/ancestry/blob/master/CHANGELOG.md)
- [Commits](https://github.com/stefankroes/ancestry/compare/v4.1.0...v4.2.0)

---
updated-dependencies:
- dependency-name: ancestry
  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>
2022-06-13 08:12:08 -06:00
Jeremy Friesen
736079e28c
Adding additional order by levers (#17847)
In the general sense we have an existing `order by` that follows the
following format: `order(x) = f(x) * rand() ^ ( 1 / g(x))`

For the present [20220603-variant-b][1], `g(x)` is the article’s score.
And `f(x)` is 1.

This pull request introduces a few named variations for the above
`order(x)` formula.

The three named formats each use a different `g(x)` function; namely
`greatest(0.1, ln(1 + greatest(0, public_reactions_count)))`.  The more
public_reactions the article has the closer to zero the resulting
positive number will be.  And raising a random number, with range
`(0..1)`, to the inverse of that number will tend to mean that artciles
with many reactions will tend to group towards the higher end of the
random range, whereas articles with few reactions will have a more even
distribution across the range.

Further the `ln` function helps dampen the weight we give to reactions.

The variation within these three order levers is on the `f(x)` portion:

1. Using `published_at`
2. Using `last_commented_at`
3. Using a mix of `published_at` and `last_commented_at`

In all cases, those dates are converted to an integer.  A date 2 weeks
ago will result in a number less than a date 1 week ago which will be
less than a today.

The idea for the mix of `published_at` and `last_commented_at` is to see
a mix of things where some “older” articles (from the underlying result
set) will get a chance to show up earlier in the feed.

My rational for this order structure is because the `RANDOM() ^ (1 /
score)` is showing possible success in a current experiment.  And in
past trials long past, it rose to the top as a likely and viable
contender.

These new `order_by` lever patterns introduce three things:

1. A variable based on a date in time
2. A dampening of what can be a large number; (we have scores in the
   publication range that are between -200 and 750 so I think it is
   important to apply a dampening.  For example `(0.1 ^ (1/100)) =
   0.977` and `(0.01 ^ (1/100)) = 0.955`; in other words these large
   scores aggressively pushed their corresponding posts to the top of
   the relevance; even as we weren't explicitly querying for those
   scores.
3. With the score being quasi-magical, it doesn’t make sense to sort on
   that value but to instead sort on a property that represents what
   we’re setting as our experiment goals (e.g. publishing something or
   commenting on something and/or reacting to something)

Note: it would be feasible to extract these into a singular order lever
that we would configure.  But that's a future concern.

Also note, none of these are yet part of any experiment, but are instead
being "queued up" to add to our available corpus.

Closes forem/forem#17834

Related to:

- forem/forem#17827
- forem/forem#17826
- forem/forem#17833
- forem/forem#16128 :: for past order queries to seek as inspiration

[1]:https://github.com/forem/forem/blob/main/config/feed-variants/20220603-variant-b.json
2022-06-10 16:37:21 -04:00
Josh Puetz
c62d899f05
Stop recommending deprecated plugins (#17870) 2022-06-10 09:33:44 -05:00
Julianna Tetreault
8e4b6581e2
Member Index View Actions: "Assign Role" (#17866)
* Adds the Assign Role modal to the Member Index View

* Adds e2e tests for the Assign role modal

* WIP: Conditionally redirects to the correct view upon assigning a role

* Conditionally renders the redirect in the correct method :|

* Adjusts the conditional redirect to account for ID

* Adds an even more explicit check for the correct refferer
2022-06-10 07:22:03 -06:00
Rajat Talesra
27c6f07686
Feature/add embed icon to editor toolbar (#17781)
* Finished task 1 and task 3

* Task 2:  If the user already has text selected inside syntax

* Added comments

* Tests added

* Nit fixes

* Code optimisation

* Nit fixes

* Fix typo

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

* Removed console log statements

* Minor fix

* Simplified code

Co-authored-by: Suzanne Aitchison <suzanne@forem.com>
2022-06-10 17:33:23 +05:30
Mac Siri
686be06009
Enable cookies_same_site_protection :lax (#17875) 2022-06-09 16:04:39 -04:00
dependabot[bot]
ff6ed8afa0
Bump strong_migrations from 1.0.0 to 1.1.0 (#17872)
Bumps [strong_migrations](https://github.com/ankane/strong_migrations) from 1.0.0 to 1.1.0.
- [Release notes](https://github.com/ankane/strong_migrations/releases)
- [Changelog](https://github.com/ankane/strong_migrations/blob/master/CHANGELOG.md)
- [Commits](https://github.com/ankane/strong_migrations/compare/v1.0.0...v1.1.0)

---
updated-dependencies:
- dependency-name: strong_migrations
  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>
2022-06-09 15:22:56 -04:00
dependabot[bot]
e4fcba7e0d
Bump rack-timeout from 0.6.2 to 0.6.3 (#17873)
Bumps [rack-timeout](https://github.com/zombocom/rack-timeout) from 0.6.2 to 0.6.3.
- [Release notes](https://github.com/zombocom/rack-timeout/releases)
- [Changelog](https://github.com/zombocom/rack-timeout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/zombocom/rack-timeout/compare/v0.6.2...v0.6.3)

---
updated-dependencies:
- dependency-name: rack-timeout
  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-06-09 15:22:35 -04:00
dependabot[bot]
73b9b2a1f9
Bump sidekiq-unique-jobs from 7.1.23 to 7.1.24 (#17874)
Bumps [sidekiq-unique-jobs](https://github.com/mhenrixon/sidekiq-unique-jobs) from 7.1.23 to 7.1.24.
- [Release notes](https://github.com/mhenrixon/sidekiq-unique-jobs/releases)
- [Changelog](https://github.com/mhenrixon/sidekiq-unique-jobs/blob/main/CHANGELOG.md)
- [Commits](https://github.com/mhenrixon/sidekiq-unique-jobs/compare/v7.1.23...v7.1.24)

---
updated-dependencies:
- dependency-name: sidekiq-unique-jobs
  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-06-09 15:22:11 -04:00
Josh Puetz
77a00d242a
Move API keys from Account tab to Extensions tab in settings (#17862) 2022-06-09 09:44:50 -05:00
dependabot[bot]
26e2e80ad1
Bump sidekiq from 6.4.2 to 6.5.0 (#17853)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Josh Puetz <hi@joshpuetz.com>
2022-06-09 09:44:31 -05:00
Jeremy Friesen
a1b17200c0
✂✂✂ Removing Spam::ArticleHandler (#17860)
This is uncalled code.  We instead use
`Spam::Handler.handle_article!` (see
[Article#create_conditional_autovomits][1]) for usage.

```shell
❯ rg ArticleHandler; echo $?
1
```

The above command shows for the "after this commit" state that there are
no mentions of the `ArticleHandler`.  The `1` is the exit status of the
`rg` (e.g. `ripgrep`).  A 1 exit status means no matches found.

[1]:bea711310e/app/models/article.rb (L915-L917)

Relates to forem/forem#15412
2022-06-08 16:34:29 -04:00
dependabot[bot]
bd214083da
Bump rack-timeout from 0.6.1 to 0.6.2 (#17864)
Bumps [rack-timeout](https://github.com/zombocom/rack-timeout) from 0.6.1 to 0.6.2.
- [Release notes](https://github.com/zombocom/rack-timeout/releases)
- [Changelog](https://github.com/zombocom/rack-timeout/blob/master/CHANGELOG.md)
- [Commits](https://github.com/zombocom/rack-timeout/compare/v0.6.1...v0.6.2)

---
updated-dependencies:
- dependency-name: rack-timeout
  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-06-08 15:05:17 -04:00
Mac Siri
a87f70048c
Enable some Rails 6.1 framework default part2 (#17855)
* Enable form_with_generates_remote_forms and deliver_later_queue_name

* Change form_with_generates_remote_forms to true

* Move config to application.rb

* Enable urlsafe_csrf_tokens

* Update comment
2022-06-08 10:56:10 -04:00
Suzanne Aitchison
6c9a09c344
Add quick select ranges to date range picker (#17850)
* Add utils for preset date ranges

* show the preset options in the calendar

* allow ranges to be selected in storybook

* add some more docs

* add missing prop type

* add tests

* move story out of beta

* fix last time periods

* small refactors
2022-06-08 15:48:06 +01:00
Anna Buianova
bea711310e
Fixes sort_link specs warning (#17845) 2022-06-08 12:18:43 +03:00
dependabot[bot]
f3e692031f
Bump octokit from 4.23.0 to 4.24.0 (#17854)
Bumps [octokit](https://github.com/octokit/octokit.rb) from 4.23.0 to 4.24.0.
- [Release notes](https://github.com/octokit/octokit.rb/releases)
- [Changelog](https://github.com/octokit/octokit.rb/blob/4-stable/RELEASE.md)
- [Commits](https://github.com/octokit/octokit.rb/compare/v4.23.0...v4.24.0)

---
updated-dependencies:
- dependency-name: octokit
  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>
2022-06-07 17:12:25 -04:00