Commit graph

125 commits

Author SHA1 Message Date
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
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
6e437f69be
Fix typo in placeholder anti-spam terms (#11360) 2020-11-10 15:36:52 -05: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
Lisa Sy
8d08191e9a
[Front-End Q/A] Config Authentication view (#11169)
* Update spacing and add Crayons classes

* Update modal interaction and style

* WIP Hide collapsed container

* Refactor invite only mode UX using tooltip

* Fix recaptcha toggle

* Implement button-text change and enabled-indicator hide

* Remove small icon alignment

* Update app/views/admin/configs/show.html.erb

* Fix icon and row alignment

* Fix enabled-indicator bug

Co-authored-by: Arit Amana <msarit@gmail.com>
2020-11-03 20:12:19 -08:00
dependabot-preview[bot]
2a31681e87
Bump emoji_regex from 3.0.0 to 3.2.0 (#11210)
* Bump emoji_regex from 3.0.0 to 3.2.0

Bumps [emoji_regex](https://github.com/ticky/ruby-emoji-regex) from 3.0.0 to 3.2.0.
- [Release notes](https://github.com/ticky/ruby-emoji-regex/releases)
- [Commits](https://github.com/ticky/ruby-emoji-regex/compare/v3.0.0...v3.2.0)

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

* Bump emoji_regex from 3.0.0 to 3.2.0 (Update vendor/cache)

* Use new ::RGIEmoji instead of deprecated ::Regex

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Co-authored-by: rhymes <rhymes@hey.com>
2020-11-02 11:44:29 +01:00
Alex
94cd9e246f
[deploy] Add default for main_social_image (#11126)
* Add default for main_social_image

* Fix image URL and add spec

* Fix spec

* Move image_url helper into image module

* Fix typo in comment

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

* Change URL helper logic

* Try something else

* Use ApplicationConfig

* Refactor

* Try again

* Try again with another approach

* Add specs for URL.local_image

Co-authored-by: Vaidehi Joshi <vaidehi.sj@gmail.com>
2020-10-29 10:07:14 -04:00
Arit Amana
1912ffdc46
[Team Email Login] Refactor the Email Authentication flow (#11090)
* Hooked "Enable" button to hidden checkbox

* Hooked "Close" button to close email settings and show "Enable/Edit" button

* Additional hookups

* Start building generalized Modal blocks

* Everything hooked up except styling and a few Qs

* last of the hookups; ensure logic flow

* clean up

* specs to cover email auth refactor

* Fix bug surfaced by Vaidehi

* Incorporate PR feedback

* prevent email auth disable if invite-only-mode

* adjust emailAuthModal body text

* Sundry improvements

* Last-mile tweaks

* Trying to get 3rd party auth deselect to work

* delete unnecssary function

* remove superfluous comment

* Move inline styling into CSS file

* Incorporate PR feedback

* Incorporate more PR feedback

* Make Confirm btn intent clearer

* Add TODO comment
2020-10-28 13:37:11 -04:00
y yam
fc22e2c4ae
Add admin config to always show manually selected users on "Suggested people to follow" list (#10917) [deploy]
* Fix missing spaces in description of suggested_users

* Add config to use suggested_users instead of auto-generated suggestions

* Improve determine_follow_suggestions method

* Update app/lib/constants/site_config.rb

Improve the wording of the description of prefer_manual_suggested_users

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

* Apply new style to prefer_manual_suggested_users checkbox

Co-authored-by: Vaidehi Joshi <vaidehi.sj@gmail.com>
2020-10-28 10:36:49 -07:00
Jacob Herrington
c91c07920f
Add config option for Forem collective noun (#11107)
Not everyone will want to use "Community" to describe their Forem, so
now they have some flexibility there.
2020-10-27 12:45:52 -04:00
Ben Halpern
d822d8d7d9
Fall back to configured social image instead of hardcoded (#9747)
* Fall back to configured social image instead of hardcoded

* Move from constant to method for config inclusion

* Fix spec

* Fix test
2020-10-27 08:54:45 -04:00
Jacob Herrington
380d8ebcd5
Add campaign call to action to SiteConfig (#10997)
* Ignore LineLength cop for SiteConfig constants

* Add campaign call to action to SiteConfig
2020-10-21 21:27:53 -04:00
Julianna Tetreault
0b2fb08e32
Adds a constant, SVG_PLACEHOLDER, to site_config.rb (#11001) 2020-10-21 15:28:02 -04:00
Andy Zhao
60b18d1a80
Add Mailchimp API Key to Site Config Form (#10995)
* Add Mailchimp API key to config show page

* Update description for newsletter id
2020-10-21 13:19:54 -04:00
Julianna Tetreault
cfbb5a1763
Standardize Image Placeholder Text in SiteConfig (#10992) [deploy]
* Standardizes image placeholder text in SiteConfig

* Adjusts image placeholder text URL per review suggestion

* Pulls image placeholder text out into a constant, IMAGE_PLACEHOLDER
2020-10-21 10:57:27 -06:00
Ben Halpern
a6923d530b
[deploy] Add interface for feed number config (#10969)
* Add interface for feed number config

* Fix tests

* Allow list values

* Fix lint
2020-10-21 09:01:00 -04:00
Tudor Pavel
52cf81624e
Preserve newlines and indentation in <pre> tags from RSS import (#10922) 2020-10-20 09:25:57 -04:00
Arit Amana
8e57cf17ad
[Team Email Login] Admin enable/disable recaptcha during email signup (#10846)
* Initial Implementation

* Complete hookup of recaptcha guard

* Write tests for recaptcha during email signup

* Addressing PR changes 1

* Create helper method and write specs

* fix bug
2020-10-19 16:20:18 -04:00
Molly Struve
c55bd0948f
[deploy] Flaky Spec Fix:Set TimeZone For All Spec Requests to Match Zonebie (#10891) 2020-10-19 09:24:58 -05:00
Alexis Moody
f4a10e4a44
[deploy] Adds a new admin setting for experience levels. (#10870)
* Adds a new admin setting for experience levels.

This is used in the post management UI to determine the range of experience. These values fallback to the ones we currently see in DEV, Total Newbies and Senior Devs. There is also a removal of the word coding when talking about experience level, since the context for each forem instance should be implied when referencing experience.

* Cleans up experience defaults

* Fixes instance_of usage
2020-10-16 12:40:25 -06:00
Michael Kohl
1a44d717fc
[deploy] Move settings tabs to constant (#10859) 2020-10-16 08:30:58 +07:00
Ben Halpern
b5f20c0a46
Make allow email password login default true (#10838)
* Make allow email password login default true

* Change test
2020-10-14 13:34:01 -04:00
Molly Struve
7ce3b8abd2
[deploy] Feature:Add Video States Encoder Key to SiteConfig (#10818) 2020-10-13 12:14:07 -05:00
Arit Amana
f4bd1df21c
[Email/Password Authentication] Allow Admins to enable email/password login (#10745)
* Implement Admins ability to allow email login

* Write specs for admin allow email login

* Fix specs causing builds to fail

* Fix spec causing builds to fail

* Use dummyimage.com for spec images

Co-authored-by: Josh Puetz <joshpuetz@gmail.com>

* Use dummyimage.com

* refactor setting of SiteConfig attributes

* Address PR review comments

* fix indentation

* Use "allow to receive and return" approach for other specs

Co-authored-by: Josh Puetz <joshpuetz@gmail.com>
2020-10-12 12:54:35 -04:00
Jacob Herrington
c37b283865
Allow Forem admins to enable an invite only mode. (#10758)
* Add invite only mode field to SiteConfig

* Add UI elements for invite only mode
2020-10-12 11:27:22 -04:00
Darshak Parikh
dfaa747405
[deploy] Add im-in.space Mastodon instance (#10804)
Co-authored-by: rhymes <rhymes@hey.com>
2020-10-12 16:59:52 +02:00
Andy Zhao
6c20a70aef
[deploy] Add recaptcha keys to as site-configurable keys (#10736)
* Add recaptcha keys to as site-configurable keys

* Add recaptcha to site config view

* Use site config key

* Make ReCAPTCHA tag optional if keys are blank

* Use proper capitalization of recaptcha

Co-authored-by: Julianna Tetreault <32834804+juliannatetreault@users.noreply.github.com>

* Refactor logic for readability

* Use proper capitalization of recaptcha

Co-authored-by: Julianna Tetreault <32834804+juliannatetreault@users.noreply.github.com>

* Use proper capitalization of recaptcha

Co-authored-by: Julianna Tetreault <32834804+juliannatetreault@users.noreply.github.com>

* Use proper capitalization of recaptcha

Co-authored-by: Julianna Tetreault <32834804+juliannatetreault@users.noreply.github.com>

Co-authored-by: Julianna Tetreault <32834804+juliannatetreault@users.noreply.github.com>
2020-10-08 17:16:00 -04:00
Ben Halpern
f87e9eace1
[deploy] Add feed_strategy config (#10245)
* Add feed_strategy config

* Add configs spec

* Fix specs

* Fix field test scenario

* Linting

* A couple small changes

* Rename Optimized and objects

* Add proper namespace

* Fix codeclimate

* Add docs

* Update docs/technical-overview/readme.md
2020-10-06 17:36:27 -04:00
Vaidehi Joshi
f83062a9dd
Remove community_action from SiteConfig (#10678) 2020-10-06 15:46:04 -04:00
Ben Halpern
eefbe25bd3
[deploy] Add ability for admin to add anti-spam terms (#10615)
* Add ability for admin to add anti-spam terms

* Fix specs

* Fix tests

* Fix typo

* Fix test
2020-10-06 10:10:30 -04:00
Rafi
4a9f27163e
[deploy] Manage listing categories in dashboard (#10506)
* Displaying all listing

* Edit listing form

* Editing listing

* Searching listing categories

* Creating new listing category

* Deleting listing category

* Fixing error message and roles

* Tests

* Fixing aria label

* Fixing link class

* Fixing error message of destroy

* Changing placeholder text
2020-10-02 11:05:09 -04:00
Hugo Peixoto
24e9f81f5a
Fix newlines being chomped in RSS import (#10476)
The CustomText converter was monkey patched to fix a bug related to
preserve_tags. Somewhere in that process, remove_inner_newlines was
changed to strip newlines completely, instead of replacing them with a
single space. This restores that functionality.

In development mode, files are not eager loaded. That means that the
converters were not being required, so it was not possible to reproduce
that issue in development mode (since it was falling back to the
original converter, which does not have the bug). This commit also adds
an initializer that requires every converter.
2020-09-29 10:38:36 -04:00
Fernando Valverde
2297e84f35
[deploy] HTML Variant admin dashboard (#10188)
* HTML Variant admin dashboard

* Tweaks to actions & spec fixes

* Update app/controllers/admin/html_variants_controller.rb

Co-authored-by: Michael Kohl <citizen428@dev.to>

* Removes old html_variants dashboards

* Removes old lingering spec

Co-authored-by: Michael Kohl <citizen428@dev.to>
2020-09-28 09:22:13 -06:00
Ben Halpern
3a469a99e2
[deploy] Enable admin-configured app_domain (#10206)
* Move app_domain from env var to siteconfig *within app area*

* Fix SiteConfig

* Don't change URL.domain yet

* Not use in fastly cache purge yet

* Session store magoo

* Revert domain issue

* Add SetCookie middleware

* Temporarily remove cookie middleware and release tasks

* Re-enable SetCookieDomain

* Add some more comments, get it ready for testing

* Remove host from url options and temporarily show errors

* Allow forwarded host to be cookie

* Fix typo

* Change invalidAuthenticityToken

* Properly set app domain

* Proper Fastly cache

* Remove config.app_domain

* Remove config.app_domain

* Explicitely set remember_user_token

* More play with cookies

* Fiddle with remember_user_token

* Add remember_user_token changes

* Monkeypatch devise

* Sessions controller

* Include rememberable

* Include rememberable

* Proper cookie monkeypatch

* Proper cookie monkeypatch

* Proper cookie monkeypatch

* Remove extra cookie code

* User sign in tweak

* Close the loop

* Experiment with carrierwave public_url

* Finalize carrierwave monkeypatch

* Remove async controller specs

* Change some tests

* Update domain test

* Remove temporary production.rb change

* modify cookie logic

* Remove unneeded changes

* Remove unneeded changes

* Explicitely pass host

* Fix linting

* Fix social image test

* Add some cookie tests

* Modify article url

* Fix canonical urls

* Fix typo

* Remove sessions controller

* Remove devise monkeypatch

* Add monkeypatch

* Remove elsif

* Update spec/helpers/application_helper_spec.rb

Co-authored-by: Michael Kohl <citizen428@dev.to>

* Adjust remember_cookie_sync

* Remember user token experimentation

* Fiddle with devise

* Properly configure devise

* Fix typo

* Fix formatting issue

* Add comment about middleware

* Fix typo

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

* Remove commented-out code

Co-authored-by: Michael Kohl <citizen428@dev.to>
Co-authored-by: Vaidehi Joshi <vaidehi.sj@gmail.com>
2020-09-11 09:38:34 -04:00
Ben Halpern
244195fc92
Move mailchimp API key to app logic (#10270) 2020-09-10 13:25:55 -04:00
Ben Halpern
b3f1e53ec7
[deploy] Add ga tracking to config (#10150)
* Add ga tracking to config

* Remove empty line

* Remove console.log

* Fix typo

* Update app/assets/javascripts/initializers/initializeBaseTracking.js.erb

* Add google tracking id example
2020-09-04 09:37:16 -04:00
Fernando Valverde
ada2d0c728
[deploy] Extracts DisplayAds from Administrate into admin (#10153)
* Extracts DisplayAds from Administrate into admin

* Suggested changes
2020-09-02 09:28:22 -06:00
Molly Struve
79b00d4960
[deploy] Optimization:Throttle Noisy Honeycomb Events More (#10143) 2020-09-01 15:21:07 -05:00
Ben Halpern
7b5bc89b7c
Allow admins to set brand color (#10097)
* Allow admins to set brand color

* Remove extra line

* Fix linting

* Update app/controllers/admin/configs_controller.rb

Co-authored-by: Michael Kohl <citizen428@dev.to>

* Move wcag compare to own class

* Remove unnecessary spacing

Co-authored-by: Michael Kohl <citizen428@dev.to>
2020-09-01 11:16:31 +02:00
Ben Halpern
239629c1de
[deploy] Grant admin permissions through the UI (part 1) (#9656)
* Grant permissions through the UI

* Update app/services/moderator/manage_activity_and_roles.rb

Co-authored-by: Michael Kohl <citizen428@dev.to>

* Make roles into constants

* Swap internal and admin

* Improve UI, remove hack

* Fix link

* Remove unused internal file

* Modify registrations controller

* A bit of progress

* More work

* a bit pf progress on confirmation emails

* Get basic functionality in place

* Remove comments

* First basic test

* Add tests

* Fix code styles

* Remove sessions spec

* Remove sessions spec

* Remove extra markup

* Fix base role

* Add Resource Admin Config

* Fix indentation issue

Co-authored-by: Michael Kohl <citizen428@dev.to>
2020-08-28 11:57:06 -04:00
Ben Halpern
0dd04ea45a
Create initial "register by email and password" beta/MVP in prep for "setup mode" (#10039)
* Modify registrations controller

* A bit of progress

* More work

* a bit pf progress on confirmation emails

* Get basic functionality in place

* Remove comments

* First basic test

* Add tests

* Fix code styles

* Remove sessions spec

* Remove sessions spec

* Remove extra markup
2020-08-28 09:46:56 -04:00
Jacob Herrington
2c645c9ace
Allow greater flexibility for footer mascot image (#10004)
* Allow greater flexibility for footer mascot image

This change allows admins to set a footer mascot image of any dimension
and manage the forced dimensions in their site config options.

* Update site config copy based on PR feedback
2020-08-26 12:33:52 -04:00
Josh Puetz
d47d02f090
[deploy] Log in with Facebook (#9922)
* First draft of facebook auth

* Add Facebook welcome broadcast to seeds, data script

* Tests!

* Documentation

* Update docs with pictures

* User siteconfig/app config

* Adjust dropdown menu width to avoid wrap for Facebook button

* Add Facebook auth keys to SiteConfig properly

* Remove unnecessary VCR cassette

* Add omniauth facebook gem to vendor cache

* Use uid instead of email for nickname randomization

* Test fix, test for missing email in Facebook

* Update docs/backend/auth-facebook.md

Co-authored-by: Molly Struve <mollylbs@gmail.com>

* Typo fix!

* Don't default facebook auth settings to ApplicationConfig

Co-authored-by: Molly Struve <mollylbs@gmail.com>
2020-08-26 12:04:20 -04:00
rhymes
3afe269665
Add tech.lgbt to allowed Mastodon instances (#9959) 2020-08-23 12:51:27 -04:00
Ben Halpern
36ccfd55dd
[deploy] Add Twitter and GitHub keys to SiteConfig (#9899)
* Add Twitter and GitHub keys to SiteConfig

* Change docs

* Add notice about not taking affect right away
2020-08-20 15:58:15 -04:00
Ridhwana
df9aa4c5ae
Use and organize constants for the config page (#9891)
* feat: update the descriptions

* feat: alphebatize

* alphabetize
2020-08-20 09:38:02 -04:00
Ben Halpern
e76f6cbbba
Set Stripe dynamically instead of at boot (#9862)
* Set Stripe dynamically instead of at boot

* Add stripe SiteConfig

* Fix capitalization
2020-08-19 21:24:19 -04:00
Ben Halpern
986eb87ce8
[deploy] Remove unneeded Analytics update script (#9852)
* Remove unneeded Analytics update script

* Remove constants
2020-08-19 15:57:27 -04:00
Ben Halpern
6c71369df5
[deploy] Add community_name to site config (#9864)
* Add community_name to site config

* Fix a spec

* Remove SiteConfig from constants

* Change subjects to method

* Fix subjects method

* Fix linting
2020-08-19 14:54:40 -04:00
Ben Halpern
83ab44c75b
Allow staff_user_id to be modified (#9869) 2020-08-19 13:33:17 -04:00