Commit graph

7462 commits

Author SHA1 Message Date
Robin Gagnon
4fabc3a5e6
fix: Add hidden navigation link to article HTML (#11465) 2020-11-18 14:50:19 +01:00
Nick Taylor
8fabccec4e
Add Preact dev tools to development bundles (#11459)
* Now Preact dev tools are injected into development bundles.

* Updated frontend debugging documentation.

* Updated frontend debugging documentation wording.
2020-11-18 14:20:58 +01:00
rhymes
cbc461a850
Refactor RssReader and Feeds::Import common parts: take 1 (#11412)
* Extract Feeds::CheckMediumReplyItem service

* Extract Feeds::CheckItemPreviouslyImported

* Clarified comment on Feeds::CheckItemMediumReply (thanks @maestromac)

* Refactor a bit to be more Rubeyeyey
2020-11-18 14:17:53 +01:00
Nick Taylor
ed7f4561e3
Fixed <Snackbar /> component displayName property. (#11460) 2020-11-18 06:41:00 -05:00
Vaidehi Joshi
59ea42a372
Add community_emoji to SiteConfig (#11450)
* Add optional community_emoji to SiteConfig

* Remove hardcoded emojis, favor community_emoji instead

* Remove remaining hardcoded emojis

* Validate community_emoji field when updated
2020-11-17 14:02:04 -08:00
Fernando Valverde
449cf89737
Uses template literals to more clearly interpolate a complex string in buildArticleHTML.js (#11457) 2020-11-17 14:45:32 -06:00
Ben Halpern
f5670e6fa2
Add username to profile more info button (#11451)
* Add username to profile more info button

* Update spec/requests/user/user_profile_spec.rb

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

Co-authored-by: rhymes <rhymes@hey.com>
Co-authored-by: Vaidehi Joshi <vaidehi.sj@gmail.com>
2020-11-17 10:07:47 -05:00
Ben Halpern
f3a69bbd84
Allow Forems to specify which domains are allowed for registration (#11442)
* Allow authors to restrict which emails can sign up

* Add form and tests

* Check for email presence in allowed email flow

* Fix test domains

* Fix codeclimate issue
2020-11-17 08:43:46 -05:00
Peter Frank
cc63725875
Change "use" to "Use" on Nav Link script (#11453)
Just noticed this on a brand new Forem and realized it was _probably_ a quick fix?
2020-11-17 14:40:13 +01:00
Molly Struve
6aa41bfba2
Optimization:Only Check Past Day for DataUpdateScript failures (#11448) 2020-11-17 06:39:58 -06:00
Molly Struve
cf619caf70
Refactor: Remove more_tag_weight_more_random_experiment (#11447) 2020-11-16 15:48:45 -06:00
Ben Halpern
eaf3403091
Fix document.body.getElementById is not a function (#11446) 2020-11-16 16:21:52 -05:00
Molly Struve
fdb0e6449a
Spec Speed Up:Stories Index Spec (#11361) 2020-11-16 13:27:57 -06:00
Molly Struve
048fbe3a06
Bug Fix:Update Remove Draft Articles Scripts to not use Squish (#11445) 2020-11-16 13:20:37 -06:00
dependabot-preview[bot]
ad33d73b3b
Bump lint-staged from 10.4.2 to 10.5.1 (#11431)
Bumps [lint-staged](https://github.com/okonet/lint-staged) from 10.4.2 to 10.5.1.
- [Release notes](https://github.com/okonet/lint-staged/releases)
- [Commits](https://github.com/okonet/lint-staged/compare/v10.4.2...v10.5.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 13:51:40 -05:00
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