Commit graph

7447 commits

Author SHA1 Message Date
rhymes
f9506affb5
Use faster JS selection methods (#11409)
* Add JS tips section to frontend documentation

* Replace document.getElementsByTagName('body') with document.body

* Replace querySelectorAll with faster selecting methods where appropriate

* Replace querySelector with faster selecting methods where appropriate

* Fix typo

* Fix forEach and getElementsByClassName

* Change querySelector* to faster methods in erb files

* Change querySelector* to faster methods in ruby files

* Fix runkit tag

* Various fixes

* Update app/assets/javascripts/initializers/initializeEllipsisMenu.js

Co-authored-by: Ridhwana <Ridhwana.Khan16@gmail.com>

* Update app/assets/javascripts/utilities/slideSidebar.js

Co-authored-by: Ridhwana <Ridhwana.Khan16@gmail.com>

* Commenting out flaky spec

Co-authored-by: Ridhwana <Ridhwana.Khan16@gmail.com>
2020-11-16 17:35:50 +01:00
dependabot-preview[bot]
73c1a7e636
Bump css-loader from 5.0.0 to 5.0.1 (#11421)
Bumps [css-loader](https://github.com/webpack-contrib/css-loader) from 5.0.0 to 5.0.1.
- [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.0.0...v5.0.1)

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

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-11-16 17:35:26 +01:00
rhymes
f40975701b
Add partial index on users.feed_url (#11411) 2020-11-16 17:10:48 +01:00
dependabot-preview[bot]
d2d9a33323
Bump linkstate from 1.1.1 to 2.0.0 (#11424)
Bumps [linkstate](https://github.com/developit/linkstate) from 1.1.1 to 2.0.0.
- [Release notes](https://github.com/developit/linkstate/releases)
- [Commits](https://github.com/developit/linkstate/compare/1.1.1...2.0.0)

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

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-11-16 11:10:19 -05:00
rhymes
18740bc650
Jest: Lower branches code coverage to 38 to unblock builds (#11441) 2020-11-16 17:06:35 +01:00
Michael Kohl
6804b8b8cb
Update data update script (#11350) 2020-11-16 10:06:00 -06:00
dependabot-preview[bot]
c38c97b65b
Bump babel-loader from 8.1.0 to 8.2.1 (#11419)
Bumps [babel-loader](https://github.com/babel/babel-loader) from 8.1.0 to 8.2.1.
- [Release notes](https://github.com/babel/babel-loader/releases)
- [Changelog](https://github.com/babel/babel-loader/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel-loader/compare/v8.1.0...v8.2.1)

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

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-11-16 10:29:39 -05:00
dependabot-preview[bot]
fa31ff2e76
Bump @storybook/preact from 6.0.27 to 6.0.28 (#11417)
Bumps [@storybook/preact](https://github.com/storybookjs/storybook/tree/HEAD/app/preact) from 6.0.27 to 6.0.28.
- [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.0.28/app/preact)

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

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-11-16 10:29:06 -05:00
dependabot-preview[bot]
717d78a119
Bump core-js from 3.6.5 to 3.7.0 (#11422)
Bumps [core-js](https://github.com/zloirock/core-js) from 3.6.5 to 3.7.0.
- [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.6.5...v3.7.0)

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

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-11-16 10:26:19 -05:00
dependabot-preview[bot]
0c52df9379
Bump sass-loader from 10.0.5 to 10.1.0 (#11428)
Bumps [sass-loader](https://github.com/webpack-contrib/sass-loader) from 10.0.5 to 10.1.0.
- [Release notes](https://github.com/webpack-contrib/sass-loader/releases)
- [Changelog](https://github.com/webpack-contrib/sass-loader/blob/master/CHANGELOG.md)
- [Commits](https://github.com/webpack-contrib/sass-loader/compare/v10.0.5...v10.1.0)

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

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-11-16 10:25:55 -05:00
dependabot-preview[bot]
278524644a
Bump oj from 3.10.15 to 3.10.16 (#11427)
* Bump oj from 3.10.15 to 3.10.16

Bumps [oj](https://github.com/ohler55/oj) from 3.10.15 to 3.10.16.
- [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.10.15...v3.10.16)

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

* Bump oj from 3.10.15 to 3.10.16 (Update vendor/cache)

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-11-16 16:25:46 +01:00
dependabot-preview[bot]
9312a4771d
Bump listen from 3.2.1 to 3.3.1 (#11423)
* Bump listen from 3.2.1 to 3.3.1

Bumps [listen](https://github.com/guard/listen) from 3.2.1 to 3.3.1.
- [Release notes](https://github.com/guard/listen/releases)
- [Commits](https://github.com/guard/listen/compare/v3.2.1...v3.3.1)

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

* Bump listen from 3.2.1 to 3.3.1 (Update vendor/cache)

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-11-16 16:25:38 +01:00
dependabot-preview[bot]
facf11a745
Bump jest-axe from 4.0.0 to 4.1.0 (#11426)
Bumps [jest-axe](https://github.com/nickcolley/jest-axe) from 4.0.0 to 4.1.0.
- [Release notes](https://github.com/nickcolley/jest-axe/releases)
- [Changelog](https://github.com/nickcolley/jest-axe/blob/main/CHANGELOG.md)
- [Commits](https://github.com/nickcolley/jest-axe/compare/v4.0.0...v4.1.0)

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

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-11-16 10:25:23 -05:00
dependabot-preview[bot]
2c25d8ef5d
Bump eslint-config-preact from 1.1.1 to 1.1.3 (#11430)
Bumps [eslint-config-preact](https://github.com/preactjs/eslint-config-preact) from 1.1.1 to 1.1.3.
- [Release notes](https://github.com/preactjs/eslint-config-preact/releases)
- [Commits](https://github.com/preactjs/eslint-config-preact/compare/1.1.1...v1.1.3)

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

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-11-16 10:24:19 -05:00
Rafi
eab507604d
Removing data-testid from Article component (#10249) 2020-11-16 10:23:44 -05:00
rhymes
700c62c416
Fix small ERB linting issues (#11438)
* Fix Layout/LineLength

* Fix Style/StringConcatenation and Lint/FloatComparison

* Fix Lint/DuplicateHashKey
2020-11-16 16:15:37 +01:00
dependabot-preview[bot]
994fbf99ad
Bump better_errors from 2.8.3 to 2.9.1 (#11425)
* Bump better_errors from 2.8.3 to 2.9.1

Bumps [better_errors](https://github.com/BetterErrors/better_errors) from 2.8.3 to 2.9.1.
- [Release notes](https://github.com/BetterErrors/better_errors/releases)
- [Commits](https://github.com/BetterErrors/better_errors/compare/v2.8.3...v2.9.1)

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

* Bump better_errors from 2.8.3 to 2.9.1 (Update vendor/cache)

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-11-16 15:14:24 +01:00
dependabot-preview[bot]
1110ba6fac
Bump webmock from 3.9.4 to 3.10.0 (#11416)
* Bump webmock from 3.9.4 to 3.10.0

Bumps [webmock](https://github.com/bblimke/webmock) from 3.9.4 to 3.10.0.
- [Release notes](https://github.com/bblimke/webmock/releases)
- [Changelog](https://github.com/bblimke/webmock/blob/master/CHANGELOG.md)
- [Commits](https://github.com/bblimke/webmock/compare/v3.9.4...v3.10.0)

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

* Bump webmock from 3.9.4 to 3.10.0 (Update vendor/cache)

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-11-16 14:23:09 +01:00
dependabot-preview[bot]
9cb0567000
Bump bootsnap from 1.5.0 to 1.5.1 (#11415)
* Bump bootsnap from 1.5.0 to 1.5.1

Bumps [bootsnap](https://github.com/Shopify/bootsnap) from 1.5.0 to 1.5.1.
- [Release notes](https://github.com/Shopify/bootsnap/releases)
- [Changelog](https://github.com/Shopify/bootsnap/blob/master/CHANGELOG.md)
- [Commits](https://github.com/Shopify/bootsnap/compare/v1.5.0...v1.5.1)

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

* Bump bootsnap from 1.5.0 to 1.5.1 (Update vendor/cache)

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-11-16 14:23:04 +01:00
dependabot-preview[bot]
6d82a15ac5
Bump blazer from 2.2.7 to 2.2.8 (#11420)
* Bump blazer from 2.2.7 to 2.2.8

Bumps [blazer](https://github.com/ankane/blazer) from 2.2.7 to 2.2.8.
- [Release notes](https://github.com/ankane/blazer/releases)
- [Changelog](https://github.com/ankane/blazer/blob/master/CHANGELOG.md)
- [Commits](https://github.com/ankane/blazer/compare/v2.2.7...v2.2.8)

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

* Bump blazer from 2.2.7 to 2.2.8 (Update vendor/cache)

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-11-16 14:22:53 +01:00
dependabot-preview[bot]
2acf538d79
Bump rouge from 3.24.0 to 3.25.0 (#11418)
* Bump rouge from 3.24.0 to 3.25.0

Bumps [rouge](https://github.com/rouge-ruby/rouge) from 3.24.0 to 3.25.0.
- [Release notes](https://github.com/rouge-ruby/rouge/releases)
- [Changelog](https://github.com/rouge-ruby/rouge/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rouge-ruby/rouge/compare/v3.24.0...v3.25.0)

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

* Bump rouge from 3.24.0 to 3.25.0 (Update vendor/cache)

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-11-16 14:22:33 +01:00
Damla Köksal
a7dd143064
Fixed the scroll bar problem in Safari (#11387)
* Fixed the scroll bar problem in Safari

* #11387 requested changes done
2020-11-16 12:48:51 +01:00
irmela
9af120561c
Make markup for dashboard ellipsis menu more consistent (#10764)
* Make markup for dashboard ellipsis menu more consistent

* Rename js-dashboard-row-more to js-ellipsis-menu
2020-11-15 14:26:37 +01:00
rhymes
910f79e04e
Remove wrong datadog metric in Feeds::Import (#11405) 2020-11-13 16:11:02 -05:00
Jacob Herrington
94fe355dae
Add system spec for profile fields (#11398)
* Add system spec for profile fields

* Use FeatureFlag wrapper over Flipper
2020-11-13 14:51:42 -06:00
Jacob Herrington
de5122cb52
Use Rails path helpers in admin system specs (#11399) 2020-11-13 10:45:57 -06:00
Andy Zhao
97e6c2295d
Filter by tags of reading list items not tags you follow (#11394)
* Filter by tags of reading list items not tags followed

* Sort the reading list tags
2020-11-13 10:45:32 -05:00
Ben Halpern
992dc54b0f
Simplify admin config permissions and add links to help pages (#11362)
* Simplify admin and add links to help pages

* Add line

* Add line

* Update app/views/layouts/admin.html.erb

* Update app/controllers/admin/configs_controller.rb

* Move svg to own file
2020-11-13 09:56:13 -05:00
rhymes
33dccc7997
Move badges_area template in proper place and refactor the partial (#11400)
* Move badges_area template in proper place and refactor the partial

* Fix badge show routing
2020-11-13 14:23:50 +01:00
Alex
99c3fb276d
Auto generate mascot accounts (#11380)
* Auto generate mascot accounts

* Refactor to remove extra query

* Update registration specs

* Fix search query spec

* Fix reaction specs

* Create with bang and raise error
2020-11-12 16:33:16 -05:00
ludwiczakpawel
2225fe9999
Footer UI update (#11337)
* tooltips 1.0.1

* tooltips 1.0.1

* footer redesign

* missed spots

* color

* revert class renaming

* spacing fix

* spacing fix

* Update app/views/layouts/_footer.html.erb

Co-authored-by: Michael Kohl <me@citizen428.net>

Co-authored-by: Michael Kohl <me@citizen428.net>
2020-11-12 15:11:08 -05:00
Julianna Tetreault
0ee74d1e26
Validate Image URLs in SiteConfig (#11299) [deploy]
* Adds image URL validation to image URLs in configs_controller.rb

* Adds additional image URLs to #valid_image_url in configs_controller.rb

* Adds tests around valid image URLs to configs_spec.rb

* WIP: sets strict conditions for before_action

* WIP: comments out unused code for draft PR

* WIP: cleans up configs_controller.rb for draft PR review

* Renames constant to more explicit IMAGE_FIELDS in configs_controller.rb

* Removes unnecessary comments from admin/configs_spec.rb

* Checks for matching keys in params and IMAGE_FIELDS in configs_controller

* Refactors #valid_image_urls and #valid_image_url in ConfigsController (THANK U, ANDY)

* Refactors image-related code and error messages in Admin::ConfigsController

* Renames expected_image_url to invalid_image_url and removes useless test

* Fix: update the tests to contain valid image urls so that they pass the validation.

* Adjusts tests & VALID_URL regex to validate images rather than image-specific URL

* Replaces $ with \z per Rhymes suggestion and feedback

* Adds accidentally removed code

Co-authored-by: Ridhwana <ridhwana.khan16@gmail.com>
2020-11-12 12:02:07 -07:00
Molly Struve
60b7572f5c
Feature:Send Alerts for Failed DataUpdateScripts to Datadog (#11381) 2020-11-12 10:59:54 -06:00
Ben Halpern
badefcabeb
Developer experience/security: Make dev/test blow up if current_user is used erroneously (#11237)
* Let dev/test blow up if current_user is used erroneously

* Fix logic

* Fix click-to-edit permissions

* Change test to check for new behavior

* linting

* Edit tests

* Change test

* Clean up implementation

* Update comment

* Fix instance vars

* Update app/controllers/concerns/caching_headers.rb

* Merge origin and add request_store gem
2020-11-12 11:54:23 -05:00
Nick Taylor
964a6df518
Bumped jest test coverage thresholds. (#11391) 2020-11-12 11:20:31 -05:00
Molly Struve
40ecfd6f0f
Refactor:Replace Production Check with Average Metrics (#11096) 2020-11-12 10:03:10 -06:00
Molly Struve
025c5213d1
Refactor:Remove Deprecated SENDGRID_USERNAME and SENDGRID_PASSWORD From production.rb (#11376) 2020-11-12 09:58:10 -06:00
Josh Puetz
2223e5468b
Email login always on (#11307)
* Starting out

* Building away...

* Hooking buttons up

* Hook Auth Provider buttons to Array Field

* trying to fix NoNameError

* Remains InviteOnlyMode disable and tests

* Smashing remaining tasks

* Last of tasks

* add tests

* Complete specs and tests 😅

* Fix bug

* Additional guard

* pass event to functions

* Position Email Auth first

* Fix bug in Email Auth Modal

* Fix spacing issue

* Update docs for adminModal.js

* Show/hide Enabled Indicator with Enable/Undo buttons

* Complete Auth Providers functionality

* Only update `allow_email_password_registration` from admin

* Remove duplicated methods

* Some refactoring around fact that Email Login is now always on (#11382)

* Fix merge (again!)

Co-authored-by: Arit Amana <msarit@gmail.com>
Co-authored-by: Arit Amana <32520970+msarit@users.noreply.github.com>
2020-11-12 09:32:58 -06:00
Ridhwana
178b0a32f0
Remove information route and add a temporary redirect to /about for SEO purposes (#11373)
* chore: remove information route and add redirect

* chore: update messaging

* fix: remove additional path referenced
2020-11-12 10:02:58 -05:00
ludwiczakpawel
ab34b37c49
Badges area on profile (#11384)
* tooltips 1.0.1

* tooltips 1.0.1

* badges size

* badges size

* .

* button style

* pawel messing with controllers

* math is stupid

* good boys write docs

* typos
2020-11-12 15:53:14 +01:00
ludwiczakpawel
df9ec8ccd5
Profile image loading glitch fix (#11389)
* tooltips 1.0.1

* tooltips 1.0.1

* profile image fix

* profile image fix
2020-11-12 15:52:49 +01:00
Robin Gagnon
1a3f2739f8
feat: Preload links on focus (#11377)
* feat: Preload links on focus

* Add explaining comment for link preload on focus

* Reformat comment

* Remove focus event listener removal
2020-11-12 09:16:04 -05:00
rhymes
f8f3795b88
Remove mascot from JS template for modals (#11388) 2020-11-12 14:58:50 +01:00
rhymes
1bb53651b0
Replace calls to Flipper with FeatureFlag (#11386) 2020-11-12 14:15:33 +01:00
ludwiczakpawel
de5a22ecf7
Profile UI update (#11357)
* tooltips 1.0.1

* tooltips 1.0.1

* profile layout

* fix

* whoops

* better github repos

* spec

* brining back doc, and making liitle fixes

* button placement, stats styling

* rename
2020-11-12 08:47:04 +01:00
Jacob Herrington
9f62711123
Convert inline JS to Stimulus (#11364)
* Convert inline JS to Stimulus

* Use Stimulus targets over element IDs
2020-11-11 21:25:04 -06:00
Lisa Sy
3fd6aa5c89
Update rate limit modal (#11344) 2020-11-11 18:10:20 -05:00
Michael Kohl
b46323d0b2
Move ArticleSuggester to Articles::Suggest service (#11370) 2020-11-11 13:06:33 -05:00
Rafi
0bc475254b
Adding select option to storybook (#11338) 2020-11-11 11:36:11 -05:00
Peter Frank
cbde504e91
Add admin guide to "added to docs?" section of PR template (#11366)
I'm linking to the GitBook generated version (https://forem.gitbook.io/forem-admin-guide/) and not the GitHub repo (https://github.com/forem/forem-admin-guide) but I could see the opposite being better.  Open to suggestions.
2020-11-11 11:33:31 -05:00