Commit graph

56 commits

Author SHA1 Message Date
Mac Siri
afa73e06e3
Replace Webpacker with Esbuild (#20470)
* Migrate to esbuild WIP

* Add exclude

* Remove redundant file

* Move file

* Move to javascript_include_tag

* Lint fix

* WIP

* WIP

* Add watch mode to esbuild WIP

* Get jest working

* Remove babel

* Revert "Remove babel"

This reverts commit 6da35260aa19d6f97f586deb66c0ecaf48433b73.

* More WIP

* Got image to load

* WIP

* Resolve audit

* Lint fix

* WIP

* Fix jest spec

* [CI] Remove asset-restore for test build stage

* Production compliant

* Temp disable sourcemap

* Update glob

* Add esbuild helper to stimulus

* Import fragment

* Temp disable coverage to see failing tests

* Fix broken spec

* Address lint

* Set proper es6 target

* Use esbuild for everything

* wait what

* Revert "Set proper es6 target"

This reverts commit 98f5278093421baa8ffe2ca580845b01c1a1eadf.

* Revert "Use esbuild for everything"

This reverts commit 0ac46738f07ffcb6af095ccb1ffa5e439b7fefa3.

* Replace uglifier with terser

* New compiled assets version

* Remvoe honeybadger-io/webpack

* Remove cypress coverage checks for now

* Update jsconfig.json

* Update docker-compose

* Remove public/packs-test from ci cache
2024-01-25 20:29:21 +00:00
Ben Halpern
16ff57c2ff
Add HTML customization to admin (#20531)
* Add HTML customization to admin

* Update spec/requests/stories_index_spec.rb

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2024-01-17 12:12:22 +00:00
Ben Halpern
ae2371d9a4
Add configuration for admins to determine whether to show cookie banner (#20517)
* Cookie banner admin config (wip)

* GA4 consent mode based on cookie acceptance

* Fix i18n

* Merge upstream

* Adjust heading
2024-01-15 18:22:17 +00:00
Ben Halpern
a4a1de964d
Move features along in deprecation status ✂️ (#20315)
* Move features along in deprecation status

* Remove unnecessary tests
2023-11-07 09:50:08 -05:00
ktmouk
8963e185f8
Fix username combobox tries to load all users (#20227)
* Fix username combobox tries to load all users

* Add the limit param to the users_query

* Add a comment
2023-10-25 15:53:53 -04:00
Ben Halpern
77dd41dfb8
Roll back user name selection for user id boxes (#20205) 2023-10-02 16:24:59 +07:00
Joshua Wehner
6a48b486ca
Onboarding: custom newsletter opt-in settings (#20114)
* Settings can process markdown into html

* Update Settings with new onboarding settings

* Async render onboarding newsletter step

* Tweak onboarding design

* Fix broken spec

* Better rendered component test

* Tweaks to match design

* Try to tweak design

* Try having a default state

* Tweak placeholder content

* Better await componentDidMount

* Continue to tweak the design

* ContentRenderer#process should always return Result

* Try more clarity in the partial

* Rubocop
2023-09-26 06:34:19 -04:00
PJ
47deeefe57
Optionally limit new users based on admin setting (#20149)
* create admin setting for new user status

* limiting on signup working 🎉

* update registration specs

* sort out OAuth registrations
2023-09-26 10:46:36 +01:00
Joshua Wehner
13f4aaa0fb
Username inputs for admin (#20123)
* Support username inputs on /admin/articles

* Support username input on tag admin moderator

* Support username input on admin community settings

* Support username input on admin mascot settings
2023-09-20 09:25:38 -04:00
PJ
3f922921e5
Admin setting to control enabled countries for billboard geotargeting (#20083)
* use instance setting for enabled target geolocations

* add validation for enabled geolocations setting

* a start on the UI?

* backend tweaks for UI

* proper crack at autocomplete component

* fix region targeting toggle

* e2e spec
2023-09-12 12:06:00 -04:00
Ben Halpern
ec7adf56fe
Allow admins to set cover image height configs (#19936)
* Initial basic work

* Bulk of related work, including find/replace on the inputs

* Adjust some tests

* Adjust some specs

* Fix a few more tests

* Clean up tests

* Adjust tests

* Test fiddle

* Adjust crop back to be a param

* Update tests

* Set proper defaults

* Fix some styling

* Adjust enrichment logic and tests

* Adjust form JS

* Update test snapshot

* Clean up formatting

* Fix spec name

* Adjust some css and defaults

* Adjust translation for image provider options

* Switch from fill to fill-down

* Proper fallback image

* Fix tests

* Update app/services/images/optimizer.rb

Co-authored-by: Mac Siri <mac@forem.com>

---------

Co-authored-by: Mac Siri <mac@forem.com>
2023-08-21 13:25:16 -04:00
Duke Greene
cf7847fadb
remove onboarding background image, use gradient based on brand color (#19815)
* remove background image, rename prop to refer to color, pass primary brand color

* create helper method, send calculated gradient values into frontend props

* test new helper method and refine how color is darkened
2023-07-27 07:27:21 -04:00
Joshua Wehner
00a9db232b
Remove manual user follow suggestions (#19457)
* Remove manually user follow suggestions

* I honestly don't understand what this is doing here

* Remove suggested_users from config spec
2023-05-16 15:01:03 +02:00
dinozavrix
e9ce70d368
Don't skip indexing for old articles (#19231)
* Don't skip indexing for old articles

* add index_minimum_date to settings

---------

Co-authored-by: Ridhwana <Ridhwana.Khan16@gmail.com>
2023-05-15 15:35:35 +02:00
Joshua Wehner
0baafeabb9
Fix social media settings to enable mastodon (#19191) 2023-03-07 16:49:16 +01:00
Fernando Valverde
de6a5a0f07
Include Mastodon as social media option with rel=me attribute for verificatiion (#19015)
* Include Mastodon as social media option w/ rel=me attribute

* Extract social media from overloaded partial - admin config
2023-02-01 09:51:51 -06:00
Rajat Talesra
497f494ef3
Removed nav related classes from feedback tabs (#18924)
* Removed bootstrap from listing_categories, listings, navigation_links

* Removed not-used bootstrap classes from admin/tags

* Removed bootstrap from admin/settings

* Fix collapse glitch in profile-fields

* Feedback partial progress

* Feedback partial progress

* Removed form-control

* Replaced card with crayons-card

* Fixed profile field UI

* Removed collapse hide and show classes

* Removed collapse hide and show classes

* Removed collapse hide and show classes

* Nit height fix

* Nit width fix

* Updated tests

* Removed nav related classes from feedback tabs

* Remove btn-classes from commets too.

* Removed row and col-12 classes

* Removed bootstrap classes from Authentication

* Removed bootstrap classes from Mascot

* Removed bootstrap classes from Onboarding

* Removed bootstrap classes from lock/unlock discussions

* Notes design changes

* Removed bootstrap classes from Organization

* Removed bootstrap classes from Organization

* Remove alert bootstrap class from admin.html.erb

* Fixed tab_pane related code

* Enable click listener on notice

* Enable click listener on notice

* Applied suggested changes

* close bootstrap class removed

* Removed element completely
2023-01-09 20:18:28 +05:30
Rajat Talesra
952f2d87ae
Removed bootstrap from admin/listings, admin/listing_categories, admin/tags, admin/navigation_links, admin/settings (#18887)
* Removed bootstrap from listing_categories, listings, navigation_links

* Removed not-used bootstrap classes from admin/tags

* Removed bootstrap from admin/settings
2023-01-06 21:25:32 +05:30
Fernando Valverde
9ab6edb0b8
Opt in settings for Ahoy Tracking (#18575)
* Opt in settings for Ahoy Tracking

* Typo tweak
2022-10-17 10:11:27 -06:00
Ridhwana
9361d2426f
✂️✂️✂️ Part 1: Remove Sponsorship (#18512)
* feat: remove initializeSponsorshipVisibility and related code

* feat: remove sponsorships from sidebar

* feat: remove sponsorships from the admin - route, controller, view, spec

* feat: remove the admin menu item

* feat: remove the i8n for admin sponsors controller

* feat: sponsorship decorator was not being used anywhere

* feat: sponsorship slack messenger was not being used anywhere

* feat: remove the sponsorship_headline that gets configures on the admin

* feat: remove the /sponsors page

* feat: remove renedring of single_sponsor partial and associated partials

* feat: remove the navigation link rake task for sponsors

* feat: remove sponsorship from tags

* feat: remove i8n constants used

* remove sponsor references in text to the privacy page

* feat: remove the sponsorship detail from the organization page

* feat: remove the sponsors css that was used for app/views/pages/sponsors.html.erb

* feat: remove the sponsorship i8n that was used in the slack messengers

* feat: swap out the decorators to use Article as an example

* feat: remove spec to show sponsors on home page

* feat: update the specs to use Article Decorator instead of the Sponsorship Decorator

* fix: use direct and not all

* fix: remove tests for tag sponsorship

* fix: remove organization sponsorship test

* feat: remove more i8n
2022-10-03 16:26:32 +02:00
Julianna Tetreault
de4acd4fa5
Remove Community Emoji from Admin Config 🌱 (#16902)
* Removes all community_emoji-related code

* Removes community_emoji-related specs from codebase

* Updates communitySection.spec.js to test for member_label

* chore: merge conflicts

* feat: remove data update script

* chore: add file back

Co-authored-by: Ridhwana <ridhwana.khan16@gmail.com>
2022-08-30 17:16:58 +02:00
Josh Puetz
fc1031f52a
Add Google Analytics 4 Support (#18124) 2022-07-21 09:26:13 -05:00
yheuhtozr
d6c15a3fc6
I18nize Constants::Settings (#17086)
* app/lib i18n (no callers)

* tidy key names

* callers deconstantified

* delete ja.yml

* update locale keys and calls

* remove ja.yml

* Revert "remove ja.yml"

This reverts commit 6a6881e274b58424ece0411c887c862124a2ca87.

* fix conflicts

* remove ja.yml

* Update general.rb
2022-05-11 09:58:37 +01:00
Daniel Uber
d571231ea4
Remove sustaining member newsletter, and its settings (#17514)
* Remove sustaining member newsletter, and its settings

This removes the concept of sustaining memberships from the system,
and logic related to or dependent on it.

This does not remove the monthly_dues column from the users table (todo).

* Remove unused newsletter setting

Since nothing accesses the mailchimp_sustaining_members_id setting,
it's safe to remove.

* Use destroy rather than delete to ensure settings cache is cleared

We have a callback in Settings::Base to clear the cache after commit,
I assume it's useful to trigger that. This requires destroy, not
delete, to be called.
2022-04-29 11:47:12 -05:00
Jeremy Friesen
1d2ecc64f0
Removing Listing rate limiting when feature disabled (#17181)
* Removing Listing rate limiting when feature disabled

Closes forem/forem#17175

* Fixing tests
2022-04-08 11:59:23 -04:00
ludwiczakpawel
2cec22e146
Removing bootstrap from Config's collapsable sections (#16620)
* .

* updates

* update specs

* expand profile field before deleting

* expand auth section in rspec test

* expand smtp settings summary in rspec

* update user experience section specs

* more spec tweaks

Co-authored-by: Suzanne Aitchison <suzanne@forem.com>
2022-03-22 14:57:07 +01:00
Suzanne Aitchison
aff5f4ce0d
add new color picker to user experience config (#16769) 2022-03-08 12:43:01 +00:00
Ben Halpern
8649eaed0f
[Small win] Add display name to campaign settings (#16653)
* Add display name to campaign settings

* Update app/models/settings/campaign.rb

* Update app/views/admin/settings/forms/_campaign.html.erb
2022-02-22 10:01:52 -05:00
Ridhwana
b21397a8c6
"Reply to" and "From" Email addresses for SMTP Configurations (#16499)
* feat: create a from_email_address and a reply_to_email_address

* feat: update other mailers with the new SMTP email settings

* test: update all spec files

* fix: use the SMTP::Settings value

* fix tests

* spec: fix the comma

* feat: tighten some logic

* fix: test

* fix tests

* fix tests

* final fix test commit

* fix test

* fix test

* oops

* feat: add a reply_to for Devise Mailer

* chore: update the description

* use a proc for reply_to

* feat: update text

* Update spec/mailers/digest_mailer_spec.rb

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

* Update spec/mailers/verification_mailer_spec.rb

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

* Update spec/mailers/shared_examples/renders_proper_email_headers.rb

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

* refactor: move OPTIONS to a helper as its only being used in the view layer

Co-authored-by: Julianna Tetreault <32834804+juliannatetreault@users.noreply.github.com>
2022-02-16 16:14:54 +02:00
Ridhwana
1025900d16
Improve the UX of the SMTP Section (#16223)
* feat: allow reply_to and email_from to be set for an SMTP config

* feat: use these SMTP values in the mailers

* spec: test the application_mailer

* fix: validate with email, and not url

* feat: mimic macs changes from https://github.com/forem/forem/pull/16216 to use in this PR

* setup packs for admin

* refactor: order the keys and add a const for the auth methods

* feat: rename the header to a more user friendlly name

* chore: move the section with Emails

* feat: add a toggle that will show and hide the SMTP form under certain conditions

* feat: add the javaScript to handle the toggles

* feat: add a better description until we convert to a dropdown

* feat: ensure that we have declared sendgrid_enabled

* chore: add  anote to the config controller

* chore: remove references of the email addresses to keep brnach scoped

* feat: tweak js

* test: cypress workflow to update smtp settings

* feat : update the smtp tests

* remove comments

* update test

* chore: rename NOTE

* feat: polisha dn test ForemInstance.only_sendgrid_enabled?

* chore: remove specs

* Update app/lib/constants/settings/smtp.rb

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

* Update spec/system/admin/config/admin_updates_smtp_settings_spec.rb

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

* Update spec/system/admin/config/admin_updates_smtp_settings_spec.rb

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

* Update spec/system/admin/config/admin_updates_smtp_settings_spec.rb

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

* Update app/javascript/packs/admin/config/smtp.js

Co-authored-by: Nick Taylor <nick@iamdeveloper.com>

* refactor js as per comments

* refactor as per comments

* Update cypress/integration/seededFlows/adminFlows/config/emailServerSettingsSection.spec.js

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

* refactor: update the Cypress tests

Co-authored-by: Julianna Tetreault <32834804+juliannatetreault@users.noreply.github.com>
Co-authored-by: Nick Taylor <nick@iamdeveloper.com>
Co-authored-by: Suzanne Aitchison <suzanne@forem.com>
2022-02-15 18:40:14 +02:00
Ridhwana
5e93d3a25e
Add a contact email address to the /admin/customization/config (#16497)
* feat: remove the default email and cobine the periodic digest and the contact email under the Email section

* refactor: rename  the email_link to contact link and use the contact_email as a default and fallback to the ForemInstance.email

* chore: alignment

* feat: use the contact_email helper

* feat: move the contact_email to the ForemInstance model

* feat: use ForemInstance.contact_email instead of the application helper method

* removed the application Helper

* feat: set the dafault on the contact_email

* fix: cypress tests

* Update app/lib/constants/settings/general.rb

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

Co-authored-by: Michael Kohl <me@citizen428.net>
2022-02-15 17:37:08 +02:00
Julianna Tetreault
8d00e27b69
Remove Creator Onboarding Feature Flags from Codebase (#15982)
* Removes FeatureFlag.enabled?(:creator_onboarding) from codebase

* Removes FeatureFlag.enabled?(:creator_onboarding) from specs

* Further cleanup, removal, and spec fixes

* Fixes the user_request_confirmation_spec.rb

* Reverts change to confirmation email button

* Revert revert after looking at designs again :(

* Removes redundant logo_png field from config + fixes test

* Rewords an expectation in user_uses_the_editor_spec.rb

* Revert removal of logo_png from Config images

* Removes CSS class from user_uses_the_editor_spec.rb

* Removes test from user_uses_the_editor_sepc.rb

* Removes unnecessary else from _logo.html.erb

* Adds back removed system spec

* Removes SVG-related code from _logo.html.erb

* Removes AsyncInfoController#use_creator_onboarding

* Fixes spec failues due to removed code

* Removes svg-related code (that I thought I removed already :/ )

* Re-removes FeatureFlag and logo_svg from _images.html.erb

* Remove newest instances of FeatureFlag(:creator_onboarding)

* remove instances where we use the creator_onboarding field from the base_data

* fix: redirect to the correct path in the reguistrations controller based on whether the user is a creator or not

Co-authored-by: Ridhwana <ridhwana.khan16@gmail.com>
2022-01-31 11:30:43 -07:00
Julianna Tetreault
8c440885a8
Adds suggested_tags to Onboarding section in Config (#16228) 2022-01-20 11:13:40 -07:00
Julianna Tetreault
615137a883
Remove the "Getting Started" Section from the Config (#16033)
* Removes the Getting Started section and related code from the config

* Removes the admin_manages_configuration_spec.rb

* Removes "Required" tags from Config

* Reverts removal of activateMissingKeysModal

* Removes mandatory.rb
2022-01-20 07:31:35 -07:00
Michael Kohl
19d6a26f7b
Update remaining Crayons icons (#16100)
Co-authored-by: Nick Taylor <nick@forem.com>
2022-01-18 13:41:04 +07:00
Ridhwana
a8fa1c916a
Creator Onboarding Logo Updates for launch [Will be merged and Deployed 17 January] (#16103)
* feat: hide the logo_svg behaind a featur flag if we've ennabled it

* feat: show the input field iis the feature flag is enabled

* feat: show the new logo when the feature fkag is enabled

* chore: change working

* feat: add a logo spec

* fix: with the updated changes we show a community name if there is no logo, hence we sometimes would need to update the community name instead of the logo on preview

* fix: use innerText

* Update app/javascript/admin/controllers/config_controller.js

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

* empty commiit

* empty commiit

Co-authored-by: Julianna Tetreault <32834804+juliannatetreault@users.noreply.github.com>
2022-01-17 16:46:06 +02:00
Andy Zhao
c812e5250f
Convert admin/config text fields with static options to dropdowns (#16094)
* Add validations and constants for feed_style and strategy

* Convert text fields w/ static options to dropdowns

* Convert Bootstrap selectpicker to native HTML select tag

* Update test to use valid feed strategy
2022-01-13 16:15:48 -05:00
Ridhwana
3f582e88c2
Update the images section in preparation for Creator Setup and Onboarding Launch [Will deploy on 10/01] (#15989)
* feat: add a section id to the images section

* feat: update the images section

* chore: add some space

* chore: update the descriptiion text for logos
2022-01-10 16:10:57 +02:00
Nick Taylor
6df9309284
Added the logo upload to the admin -> customization -> config -> images section. (#15729)
Co-authored-by: Michael Kohl <citizen428@forem.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Suzanne Aitchison <suzanne@forem.com>
Co-authored-by: Mac Siri <mac@forem.com>
Co-authored-by: Ridhwana <Ridhwana.Khan16@gmail.com>
2021-12-15 14:10:27 -05:00
Fernando Valverde
c384755bae
Enable Forem (Passport) Auth (#15141)
* Enable Forem (Passport) Auth

* Remove feature flag DUS

* Add prompt for Forem Passport in admin

* Add spec & fix broken one

* Link to docs instead of passport site
2021-11-23 14:59:00 -06:00
Michael Kohl
09828853f6
✂✂✂ Remove Connect (#14734)
* Remove Connect

* Remove more Connect specs

* Remove a lot more Connect code

* 🚮

* It all has to go

* Explicitly add httpclient

* Update application layout

* Remove messages association from User

* Start fixing specs

* reintroduce util function and refactor references

* Remove Connect Cypress test

* Fix more specs

* Remove Connect from listings

* Ignore contact_via_connect column on listings

* Remove contact_via_connect usages

* Ignore mod_chat_channel_id on tags

* Drop Connect tables

* Remove email_connect_messages from user notification settings

* Re-add httpclient 2.8.3

This was mistakenly removed as a merge conflict

* Don't need to exclude removed chat channel file

* Remove unneeded style for chat channels

* Remove unneeded channel list prop type

* Remove chat channels index/connect-link from getPageEntries

* Re-add comment from httpclient in Gemfile

* Remove connect references from mailers

Tag Moderators no longer have a chat channel

No longer will users be notified about new messages (there won't be
any)

No longer will users be notified about channel invites (you can't
invite anyone anymore)

* Don't configure Pusher and remove PUSHER_* from .env_sample

since it's removed from gemfile, the Pusher constant will not resolve, if this is
configured in the environment variables we'll fail to boot.

Co-authored-by: Suzanne Aitchison <suzanne@forem.com>
Co-authored-by: Dan Uber <dan@forem.com>
2021-11-18 08:21:00 -06:00
Jeremy Friesen
7aa9c5b0eb
Moving blocked registration domains up (#15403)
* Moving blocked registration domains up

Prior to this commit, the field "worked" but you had to toggle email
authentication to enabled, then fill it out.  You could then disable
email notification and it would work.

This builds on #15397

* Update app/views/admin/settings/forms/_authentication.html.erb

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

Co-authored-by: Suzanne Aitchison <suzanne@forem.com>
2021-11-17 11:28:37 -05:00
Jeremy Friesen
3782db891a
Adding ability to block domains from registration (#15397)
Prior to this commit, we had filtering options for email registration:

1. Specific allowed domains.
2. Implicitly allow all domains if no allowed domains specified.

With this commit, we add another option: The adminstrator may block one
or more domains from registering.

Closes forem/rfcs#281
2021-11-16 18:56:01 -05:00
Ridhwana
aa6d80bc5d
Only enable user invitations page when SMTP is enabled (#15219)
* first pass of styling of the page

* feat: scroll to the position in the config controller in stimulus

* feat: add the tooltip and a cursor thats not allowed

* feat: add a disabled property for all that needs smtp to be enabled

* feat: update the form styling

* feat: update the form

* specs: update the label name

* fix: syntax error

* chore: update the newline

* spec: test the invitation flow

* fix test

* feat: update the form as per suggestions

* spec: update the tests to match the new workflow

* oops committed debugging code

* chore: add a before to set the smtp_enabled method

* feat: update the boldness and fontsize of the link

* feat: remove size
2021-10-29 17:41:30 +02:00
Suzanne Aitchison
5069cd681a
Markdown editor toolbar (#14876)
* rough starting point, roving tabindex in toolbar, bold and italic buttons

* refactor, add link

* add ul

* add ordered list

* core formatters in place, wip

* overflow options

* add keyboard shortcuts

* tidy up some dodgy classes

* add mocks for runtime in test and storybook, use correct modifier key for tooltip

* style tweaks

* refactor tooltips

* add markdown formatters tests

* add tests for toolbar component, fix mistake in overflow menu tooltips

* undo change no longer needed to button

* fix issue accessing runtime in formatters file

* only show darkened buttons and tooltips when focus-visible is true

* mobile view

* fix for responsive buttons & roving tabindex

* tweaks from PR review

* update cursor position on link insertion

* add a new line after block selection formatting

* align icons in center

* tidy up overflow menu listeners

* small refactors

* test for new text area util

* tidy up new lines after syntaxes

* fix logic in cursor offsets for links

* prevent scroll jumps after inserting syntax

* some style tweaks

* insert level 2 heading with new lines above and below

* update icons

* use margin instead of gap
2021-10-19 09:22:54 +01:00
Fernando Valverde
c74121b0c0
Forem passport (cont) (#14759)
* Initial forem omniauth strategy setup work

* Finish basic raw proof of concept

* Some playing around

* use OAuth payloads + PASSPORT_OAUTH_URL for local dev

* Use FeatureFlag for Forem Passport Auth

* Working on tests

* Fix tests 🤞🏼 & some cleanup

* Use correct namespace within lib directory (match class namespace)

* Test to ensure Forem Passport auth is restricted by FeatureFlag

* Add broadcast + work on tests

* Update spec/lib/data_update_scripts/insert_forem_connect_broadcast_message_spec.rb

Co-authored-by: Michael Kohl <citizen428@forem.com>

* Hash format

* Schema cleanup + inline comments

* Use temprorary Heroku domain

* More cleanup

* Missed one

* Back to passport.forem.com

* Require correct path in lib

* Apply suggestions from code review

Co-authored-by: Michael Kohl <citizen428@forem.com>

* Use with_indifferent_access for symbol hash access in Forem strategy

Co-authored-by: benhalpern <bendhalpern@gmail.com>
Co-authored-by: Michael Kohl <citizen428@forem.com>
2021-09-30 06:47:45 -06:00
Daniel Uber
5678fb77f5
Remove unneeded checks for code tags when filtering articles from search indexing (#14801)
* Move logic to determine noindex from view to model

This brings attention to the code and allows for faster unit tests.

I expect we'll be modifying this soon to deemphasize the code tag as a
marker of quality.

* Replace "5" constant with home feed minimum score

* Remove check for "code" tags in low quality article check

This made sense for DEV and other devrel communities, but is no longer
necessary for Forems.

* Add UserExperience setting for minimum index score

- add setting, I used `index_minimum_score` to match the
`home_feed_minimum_score`, `minimum_index_score` feels natural but
breaks the pattern.

- use this to determine whether to include article in the sitemap

- use this to determine whether to add noindex meta to article show page

* Remove unneeded tests

Since there's no longer any check for <code> tags in the body, omit
those tests (which passed anyway).

* Add new setting to admin page
2021-09-28 13:44:35 -04:00
Ben Halpern
036d75aa6e
Admin-configurable display locale (#14620)
* Admin-configurable display locale

* Add i18n-js and namespacing

* Basic tests and clean up

* A few test adjustments

* Update vendor cache

* Fix a few tests

* Fix a few tests

* Update app/views/articles/_actions.html.erb

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

* Update app/views/articles/_comments_actions.html.erb

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

* Update app/views/articles/_single_story.html.erb

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

* Update app/views/articles/_single_story.html.erb

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

* Update app/views/comments/_comment_header.html.erb

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

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

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

* Update app/views/listings/index.html.erb

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

* Update spec/system/homepage/user_visits_homepage_articles_spec.rb

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

* Update spec/system/user/view_user_index_spec.rb

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

* Alphabetical locale page

* Add activerecord custom validation error translations

* Add i18n to webpacker

* Fix a few tests

* Adjust error messages

* Add i18n-tasks

* Adjust JS to get working with jest

* Adjust the way translations are pulled in

* Adjust jest tests

* Remove time localization

* Remove superfluous public js

* Add basic tests for i18n application controller

* Remove unnecessary content

Co-authored-by: Michael Kohl <citizen428@dev.to>
2021-09-28 11:04:35 -04:00
Daniel Uber
7147ae4053
Use a textarea for apple_pem in admin (#14744)
* Since we're pasting a multi-line key, use a textarea for apple_pem

* Update app/views/admin/settings/forms/authentication/_apple_auth_provider_settings.html.erb

set style on pem input to show expected input size.

Co-authored-by: Fernando Valverde <fernando@visualcosita.com>

Co-authored-by: Fernando Valverde <fernando@visualcosita.com>
2021-09-16 12:56:57 -05:00
Alex
a024efcc45
Add display_in_directory setting (#14733)
* Add display_in_directory setting

* Remove setting from constants

* Update spec to use change
2021-09-15 13:34:31 -04:00