Commit graph

7417 commits

Author SHA1 Message Date
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
Ben Halpern
a7ac6a2c3a
Bust caches at different intervals on restart (#11369) 2020-11-11 11:27:53 -05:00
Mac Siri
a56f3630bf
Parralelize Travis deploy (#11378) 2020-11-11 11:26:34 -05:00
Molly Struve
e02414ecf6
Comment out Still Flaky Onboarding spec (#11375) 2020-11-11 08:32:05 -06:00
Nizar
7058d628af
Added Copy Permalink Functionality to Comment Dropdown (#8311)
* Added Copy Permalink Functionality to Comment Dropdown

Copy functionality is similar to the way 'copy article link' is implemented. It checks for the android bridge first, then the navigator, then fallsback to the default document copy command

Since the codes were really similar, I moved the copy functionality to a function of its own with callbacks and fallbacks as lambdas, and triggered it with the copyArticleLink and the copyPermalink

* Replaced Copy Permalink Callbacks with Promises

* Keep anchor tags instead of buttons (#1)

* copy permalink using anchor tag

* Missing closing button tag

* Adds 'Copied to Clipboard' Snackbar Message

* Patches bug introduced in #10323

Patch suggested in following comment: https://github.com/forem/forem/pull/8311\#pullrequestreview-492011202

* Removes import statement for addSnackbarItem and Suppresses ESLint Error

Initializer runs in global scope

* Unhandles exception when copying permalink so Honeybadger can handle it

* Replaces ButtonListener suffix for copyPermalink method with Listener

Co-authored-by: Fernando Valverde <fernando@visualcosita.com>
2020-11-11 08:32:10 -05:00
Jacob Herrington
7c70d5a722
Use crayons buttons in card headers (#11367) 2020-11-11 02:22:10 -06:00
Robin Gagnon
27a3df7d73
A11y: Add keyboard navigation to article feed (#10468)
Co-authored-by: Andrew Bone <AndrewB05@gmail.com>
Co-authored-by: Nick Taylor <nick@dev.to>
2020-11-10 22:38:15 -05:00
Nick Taylor
af58e7c1a9
Set default timeout to 0 ms for keyboard shortcuts. (#11363) 2020-11-10 18:32:29 -05:00
Ben Halpern
1f8491ea13
Change from stylesheet_url to stylesheet_path (#11368) 2020-11-10 18:14:24 -05:00
Ben Halpern
32a79e662e
Replace old assets with new ones if cached page mismatch (#11252)
* Let dev/test blow up if current_user is used erroneously

* Replace old assets with new ones if cached page mismatch

* Remove wrong code

* Remove wrong code

* Adjust code and add test

* Fix spec

* Clarify comment

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

* Change up partial location

* Remove js

* Remove console log

* Move meta tag around

* Remove js id

* Do not run in test because it messes with stuff

* Remove head div

* Remove head div

* Fix test
2020-11-10 17:47:17 -05:00
Molly Struve
9e8dc37169
Refactor:Remove Duplicate from Onboarding Specs (#11356) 2020-11-10 14:37:03 -06:00
Peter Frank
6e437f69be
Fix typo in placeholder anti-spam terms (#11360) 2020-11-10 15:36:52 -05:00
Peter Frank
aa1c7dc2e9
Flip values of email digest min/max (#11359) 2020-11-10 15:35:48 -05:00
Lisa Sy
b57ebe0074
Update styles (#11342) 2020-11-10 10:22:20 -08:00
Andy George
0cc2513226
add "andygeorge" to Core team list (#11355) 2020-11-10 09:50:21 -06:00
Joe Doss
601f2831b4
Update to NodeJS 14.14.x to match with Fedora 33's installed version. (#11348)
* Update to NodeJS 14.14.x to match with Fedora 33's installed version.

* Update .gitpod.dockerfile

Co-authored-by: Michael Kohl <citizen428@dev.to>
2020-11-10 09:45:08 -06:00
Andrew Bone
75bec9b705
Add chaining to shortcuts (#11113)
Co-authored-by: Nick Taylor <nick@iamdeveloper.com>
2020-11-10 09:21:39 -05:00
Fernando Valverde
756acebaed
Podcast + Video player native bridge small refactor (#11345) 2020-11-10 07:36:05 -06:00
n martin
bae898ed1a
Show canonical URL on article even after it has been updated (#11256)
* Show canonical URL on article even after it has been updated

* Refactor canonical URL fix

* Clean up canonical URL code

* Clean up canonical URL code
2020-11-10 13:30:21 +01:00
Michael Kohl
824e9a13cb
Add service generator (#11265)
* Add service generator

* Finalize service generator

* Add documentation

* Explicitly require rails/generators

* Update Zeitwerk initializer

* Remove explicit require

* Update docs/backend/service-objects.md

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

Co-authored-by: Ridhwana <Ridhwana.Khan16@gmail.com>
2020-11-10 09:09:35 +07:00
Michael Kohl
5664cd3ca8
Correctly set constant in including modules (#11331) 2020-11-10 08:47:30 +07:00
Ben Halpern
dfc3d96286
Update shell version when admin action taken (#11343)
* Update shell version when admin action taken

* Update app/controllers/admin/application_controller.rb

Co-authored-by: Alex <alexandersmith223@gmail.com>

Co-authored-by: Alex <alexandersmith223@gmail.com>
2020-11-09 15:31:54 -05:00
Molly Struve
a0c174fcb7
Refactor:Remove more_experience_level_weight_experiment From Feed Tests (#11340) 2020-11-09 13:59:59 -06:00
rhymes
1db388510e
Add custom instrumentation to Feeds::Import (#11297)
* Add custom instrumentation to Feeds::Import

* Remove superfluous logging instructions
2020-11-09 17:12:01 +01:00
dependabot-preview[bot]
8d4b2be3e0
Remove sdoc (was Bump sdoc from 1.1.0 to 2.0.0) (#11311)
* Bump sdoc from 1.1.0 to 2.0.0

Bumps [sdoc](https://github.com/zzak/sdoc) from 1.1.0 to 2.0.0.
- [Release notes](https://github.com/zzak/sdoc/releases)
- [Changelog](https://github.com/zzak/sdoc/blob/master/CHANGELOG.md)
- [Commits](https://github.com/zzak/sdoc/commits)

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

* Bump sdoc from 1.1.0 to 2.0.0 (Update vendor/cache)

* Remove sdoc from Gemfile

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Co-authored-by: rhymes <rhymes@hey.com>
2020-11-09 17:11:43 +01:00
rhymes
38963c6629
Move TimeZoneSetter middleware in proper place (#11336)
* Move TimeZoneSetter middleware in proper place

* Use explicit naming
2020-11-09 17:11:10 +01:00
dependabot-preview[bot]
f84b0d5ad5
Bump @stoplight/spectral from 5.6.0 to 5.7.1 (#11316)
Bumps [@stoplight/spectral](https://github.com/stoplightio/spectral) from 5.6.0 to 5.7.1.
- [Release notes](https://github.com/stoplightio/spectral/releases)
- [Changelog](https://github.com/stoplightio/spectral/blob/develop/CHANGELOG.md)
- [Commits](https://github.com/stoplightio/spectral/compare/v5.6.0...v5.7.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-09 10:17:44 -05:00
Molly Struve
b3ed84e68c
Comment Out Flaky Onboarding Spec (#11341) 2020-11-09 08:54:44 -06:00
dependabot-preview[bot]
2a3093ea2e
Bump parallel from 1.19.2 to 1.20.0 (#11313) 2020-11-09 08:26:39 -05:00
Krzysztof Rybka
d6956180ad
Return video_source_url in API V0 Videos index (#11040) 2020-11-09 06:27:28 +01:00
dependabot-preview[bot]
af69812298
Bump ruby-prof from 1.4.1 to 1.4.2 (#11324)
* Bump ruby-prof from 1.4.1 to 1.4.2

Bumps [ruby-prof](https://github.com/ruby-prof/ruby-prof) from 1.4.1 to 1.4.2.
- [Release notes](https://github.com/ruby-prof/ruby-prof/releases)
- [Changelog](https://github.com/ruby-prof/ruby-prof/blob/master/CHANGES)
- [Commits](https://github.com/ruby-prof/ruby-prof/compare/1.4.1...1.4.2)

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

* Bump ruby-prof from 1.4.1 to 1.4.2 (Update vendor/cache)

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-11-09 06:25:52 +01:00