Commit graph

73 commits

Author SHA1 Message Date
Philip How
eb452078e3
Update confirmation email wording (#20806) 2024-03-28 11:10:26 -04:00
Ben Halpern
caa7b5a63a
[Hot fix] Fix style bugs with registration page (#20656)
* Fix style bugs with registration page

* Small additonal style tweak

* Final style tweak
2024-02-19 18:48:50 -08:00
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
Rajat Talesra
5fb94d372b
Reset password design and Signup page update for invite-only forems. (#20145)
* Private forem signup issue fix

* Minor design fixes

* Added click on logo

* Reset password design

* UX fix

* Updated dynamic contact

* Padding fix and test fix

* Complete translations

* Skipped flay test 'should show Feature Post button on an unfeatured post'
2023-09-22 14:49:31 +05:30
Ben Halpern
a079434397
Add new invitation params (#20074)
* Add new invitation fields

* SMTP enabled check

* Update spec/requests/api/v1/admin/users_spec.rb

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

* Add devise_mailer spec

* Add devise_mailer spec

* Update spec/mailers/devise_mailer_spec.rb

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

* Update spec/mailers/devise_mailer_spec.rb

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

* Update spec/mailers/devise_mailer_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>
2023-09-13 13:01:39 -04:00
Rajat Talesra
a679486572
Redesign sign-up and login pages (#20065)
* Signin Signup screen update

* Design for signin signup finished

* On hover effect

* Fixed few tests

* Fixed rSpec tests

* Minor design fixes

* Design changes suggested by Anuj

* Test fixes

* Updated test

* Nit fixes

* Path changes and footer and topbar hidden

* A bit simplified css

* Removed custom css

* Updated tests

* Nit css fixes

* Updates as per Ridhwana's review

* CSS fixes

* Used js-registration
2023-09-13 21:46:57 +05:30
Suzanne Aitchison
25bf8a0711
Remove name from invitation flow (#17438)
* remove name from invite user flow

* remove name from invitation instructions

* update invitations spec

* update specs and invitation actions overflow menu name

* allow users to set name when accepting invite
2022-05-03 09:33:12 +01: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
Ridhwana
4ef0949263
Update the User Invitation email copy (#15501)
* feat: update the invitation text and translations

* chore: oops french in english

* chore: translation

* fix: name fr
2021-11-29 09:29:36 -05:00
Ridhwana
8060f78893
Dynamically update the brand colors (#15432)
* Added alias for app/javascript/controllers

* Added hooks for Stimulus controller.

* Fixed eslint issue with @controllers alias.

* Initial working logo preview.

* Added explicit accept values for png and svg files only for a logo.

* Fixed content layout shift issue and resize to max height 80px.

* Cleaned up logo preview resizing.

* Added focus style to Upload logo label.

* Now the logo preview image has empty alt text as it's visual only.

* Fixed position of upload logo button.

* Removed tooltip for logo.

* Fixed check to load client-side controller.

* Put back tooltip, minus the aria-describedby

* Fixed E2E tests I broke.

* Made the logo preview visible to the accessibility tree.

* feat: update the brand colors on the page when we select a new one

* feat: update the radio button_tags to use crayons-radio

* feat: remove the fill attributes in the svg

* Added support for JPG image upload.

* Fixed height adjustment when width exceeds max preview width.

* feat: add form-background class with an accent

* feat: update the briightness accent on the page

* Fixed JS error if user cancelled file selection for a logo.

* Added the @routes webpack alias for routes.js.erb.

* Fixed data tooltip for assistive technologies.

* Fixed preview logo alignment with upload logo button.

* remove required as it's not doing anything

* feat: update the code brigtness code

* Opting to not show friendly error message if route fails to load.

* Fixed validation message not appearing for logo.

* Revert "Added the @routes webpack alias for routes.js.erb."

This reverts commit 3b6621dcde541f2fa05df6ff75af38955842b88e.

* Reverted to default styling of input[type="file"].

* Moved creator_settings_controller to admin/controllers.

* Updated E2E test for logo preview on the creator settings page.

* create tests for the brand color updates

* feat: update the description

* Update cypress/integration/creatorOnboardingFlows/creatorSettings.spec.js

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

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

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

* feat: do not update branding if an invalid color is provided

* feat: move the brightness code to its own accent calculator file in js utilities

* test: brightness ratios

* chore: remove whitespace

Co-authored-by: Nick Taylor <nick@dev.to>
Co-authored-by: Nick Taylor <nick@iamdeveloper.com>
Co-authored-by: Suzanne Aitchison <suzanne@forem.com>
2021-11-23 09:46:17 +02:00
Nick Taylor
bf2d673492
Created the Forem creator confirmation email template (#14659)
Co-authored-by: Michael Kohl <citizen428@forem.com>
Co-authored-by: Ridhwana <Ridhwana.Khan16@gmail.com>
2021-10-21 14:56:09 -04:00
Ben Halpern
1d62d30853
Consolidate and internationalize various 'contact us' prompts (#14951)
* Consolidate and internationalize various 'contact us' prompts

* Update spec/requests/user/user_settings_spec.rb

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

Co-authored-by: Michael Kohl <citizen428@forem.com>
2021-10-07 12:05:21 -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
Ridhwana
9a5d354b65
Remove header and footer from signup/email confirmation pages (#14816)
* feat: remove header and footer on the signup and email confirmation page

* refactor: move into css file

* trigger travis
2021-09-28 08:29:58 +02:00
ludwiczakpawel
d6aa9e058b
Forem background (#14700)
* forem background styles

* cleanup

* layout updates

* couple fixes

* cypress
2021-09-14 14:47:48 +02:00
Ridhwana
5827be4ecc
RFC 190: Forem Creator Signup Page (#13875)
* chore: add my name to the chaore so that I can search after cleanup

* feat: update the forem creator signup template and copy over some stuff from the email_resgistration

* feat: update the fields

* feat: make sure that it saves

* feat: add an eye svg to the password input

* feat: update eye and eye-off svg

* feat: update the placeholder for the password field

* reveak and hide the password when clicking on the icon

* eye visiblibility functionality

* feat: display the username

* feat: show the username row when we click edit

* feat: update the interaction design

* chore: remove extra line

* chore: remove unneeded function

* feat: never show the username hint when the user field is not hidden

* feat: ensure that the username works

* chore: update the existing specs

* feat: move to packs

* refactor: manage the visibility with a avariable and not with the password type

* optimize the way we use password visibility

* chore: validate the username field

* chore: update the statement

* feat: add a background

* feat: accessibility changes

* feat: set a max length on the username

* feat: some more accessibility changes

* feat: validate the length of the password

* chore: add some margin to the error box

* feat: by_email shows the error states and we should cater for the Forem Creator

* feat: tackle any errors

* WIP/test: first pass of some integration specs

* feat: update the Cypress tests

* Update app/views/shared/authentication/_forem_creator_signup.html.erb

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

* Update app/views/shared/authentication/_forem_creator_signup.html.erb

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

* chore: temporarily disable the background on large screens

* chore: remove title

* prevent default

* feat; update the style of the button

* feat: update the tests to use accessibility tags

* feat: update icons

* chore: oops

* little forntend updates

* Update app/views/shared/authentication/_forem_creator_signup.html.erb

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

* Update cypress/integration/creatorOnboardingFlows/creatorSignup.spec.js

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

* fea: change the aria label and pressed

* feat: change to just John

* feat: update  cypress tests

* test if this is causing the test to fail

* feat: add some margin

* feat: mostly for Cypress - required is true or false based on whether the field is needed

* refactor: use the password label and skip last test

* Update app/views/shared/authentication/_forem_creator_signup.html.erb

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

* Update app/views/shared/authentication/_forem_creator_signup.html.erb

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

* fix: do not toggle  the label (accessibility)

* fix: add a comma

Co-authored-by: Suzanne Aitchison <suzanne@forem.com>
Co-authored-by: Michael Kohl <me@citizen428.net>
Co-authored-by: Paweł Ludwiczak <ludwiczakpawel@gmail.com>
Co-authored-by: Nick Taylor <nick@iamdeveloper.com>
2021-08-24 10:33:26 +02:00
Ridhwana
4966790512
Add Missing Class Name (#14404)
* fix: update the class name

* feat: update some css
2021-08-03 14:51:05 +02:00
Ridhwana
4337ce9d91
Creator Onboarding Confirmation Page (#14259)
* feat: add a first version of the confirmation page - still a wip

* feat: style the modal properly

* chore: update the text

* chore: update from master

* fix: add the correct text and layout for the feature flagged confirmation email

* feat: use the view_class functionality to assign some css styling to the confirmations class

* feat: add the Forem background

* feat: add some styling to "Click Here"

* feat: polish styles

* feat: the padding will be used for mobile

* chore: some blank lines

* feat: add some more styles

* feat; use media queries

* feat: add a callback to the modal

* feat: handle all javascript on the confirmation form

* feat: change back to a button

* feat; change from button to span for accessibility

* feat: add the callback in an if condition

* feat: add a main-content

* feat: update the confirmation page html

* feat: add Cypress test

* minimal seeded flows

* fix: rename the file

* feat: update confirm email spec

* fix: remove mistake

* refactor: rename the files appropriately

* feat: change some text

* fix: typo

* fix: update as per suggestions
2021-08-03 14:21:56 +02:00
Fernando Valverde
16ddcb74dc
Avoid showing social login options in ForemWebView (#14260)
* Minimal diff commit

* Add helper specs for display_social_login?

* Fixing some specs

* Fixing specs

* Add system specs for flow A vs flow B

* Add aria-live polite

* revert unnecessary change to spec

* Update spec/system/authentication/conditional_registration_spec.rb

Co-authored-by: rhymes <github@rhymes.dev>

* Tweaks to fix specs

* Apply review feedback

* Apply suggestions from code review

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

* Extract helper function + refactor Regexp from display_social_login?

* Small tweak to condition

Co-authored-by: rhymes <github@rhymes.dev>
Co-authored-by: Michael Kohl <citizen428@dev.to>
2021-07-21 09:59:12 -06:00
Julianna Tetreault
e1e18aa0aa
[15-Minute Fix] Ensure "Locked Screen" Checkbox Conditionally Renders (#14161)
* Uses Settings::UserExperience.public to conditionally render btn

* Updates landing page-related specs to account for private forem

* Uses Settings::UserExperience in place of ForemInstance in admin_creates_new_page_spec.rb

* Reverts Settings::UserExperience.public? changes throughout codebase
  - Removes any changes to ForemInstance.private?
  - Adds a new helper method, self.invitation_only?
  - Updates self.private? logic

* Updates landing page specs and reverts unnecessary changes
  - Reverts any changes that removed the check for
ForemInstance.private?
  - Updates landingPage.spec.js to use findByRole rather
than findByText

* Reverts a change to admin_manages_pages_spec.rb

* Updates landingPage.spec.js per PR review comment

* Updates #private_forem_or_no_enabled_auth_options and spec

* Uses .invite_only? in _providers_registration_form.html.erb

* Adjusts authenticationSection.spec.js to test that FB is enabled

* Updates necessary specs to check .invitation_only?

* Consistently uses invite_only_mode_or_no_enabled_auth_options
  - Updates all necessary places within the codebase to use
reverted method name, invite_only_mode_or_no_enabled_auth_providers
  - Updates #self.enabled to check ForemInstance.invitation_only?
rather than ForemInstance.private?
  - Reverts change to Facebook assertion within authenticationSection
e2e test

* Removes superfluous .to from authenticationSection.spec.js
2021-07-12 14:14:43 -06:00
Mac Siri
84114694b9
Provide way to resend comfirmation email via log-in page (#14110) 2021-07-02 09:50:35 -04:00
Michael Kohl
7fe5c54161
Consistently use ForemInstance.private? (#14021) 2021-06-22 08:16:19 +07:00
Michael Kohl
b7ff9aadd1
Clean up SiteConfig (#13738)
* Remove obsolete SiteConfig values

* Remove DUS

* fixup! Remove obsolete SiteConfig values

* fixup! Remove obsolete SiteConfig values

* Add DUS for removing SiteConfig values

* Fix specs

* Fix specs

* Clean up more DUS

* Update DUS

* Fix remaining spec

* Remove leftover spec

* Fix more specs

* Fix spec

* Remove deprecated spec

* Rearrange specs

* Temporarily disable specs
2021-05-18 09:38:31 +07:00
Vaidehi Joshi
5e6aad98e3
Replace MAX_USER_MENTIONS with Settings::RateLimit.mention_creation (#13736)
* Replace MAX_USER_MENTIONS with Settings::RateLimit.mention_creation

* Remove Vaidehi-specific TODOs

* Remove unnecessary constant stubs

* Remove rate_limit_mention_creation from SiteConfig
2021-05-12 08:16:38 -07:00
Andrew Bone
c9e4227c59
crayons-notice accessibility improvements (#13273)
* Add roles to crayons-notice

* Add roles to crayons-notice

* Add roles to crayons-notice

* Add roles to crayons-notice

* Add roles to crayons-notice

* Add roles to crayons-notice

* Add roles to crayons-notice

* Add roles to crayons-notice

* Add roles to crayons-notice

* Add roles to crayons-notice

* Add roles to crayons-notice

* Add roles to crayons-notice

* Add roles to crayons-notice

* Add roles to crayons-notice

* Add roles to crayons-notice

* Add roles to crayons-notice

* Add roles to crayons-notice

* Add roles to crayons-notice

* Add roles to crayons-notice

* Add roles to crayons-notice

* Add roles to crayons-notice

* Add roles to crayons-notice

* Add roles to crayons-notice

* Add roles to crayons-notice

* Add roles to crayons-notice

* Add roles to crayons-notice

* Add roles to crayons-notice

* Add roles to crayons-notice

* Add roles to crayons-notice

* Add roles to crayons-notice

* Add roles to crayons-notice

* Add roles to crayons-notice

* Add roles to crayons-notice

* Add roles to crayons-notice

* Add roles to crayons-notice

* Add roles to crayons-notice

* Add roles to crayons-notice

* Add roles to crayons-notice

* Add roles to crayons-notice

* Add roles to crayons-notice

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

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

* Update app/views/admin/badge_achievements/award.html.erb

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

* Update app/views/admin/broadcasts/index.html.erb

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

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

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

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

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

* Update app/views/pages/sponsors.html.erb

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

* Update app/views/shared/authentication/_email_registration_form.html.erb

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

* Update app/views/users/_account.html.erb

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

* Update app/views/shared/authentication/_initial_account_wizard.html.erb

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

* Update app/views/users/edit.html.erb

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

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

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

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

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

* Update app/views/admin/feedback_messages/_feedback_message.html.erb

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

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

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

* Update app/views/admin/pages/index.html.erb

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

* Update app/views/admin/pages/index.html.erb

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

* Update app/views/liquids/_user_subscription.html.erb

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

* Update app/views/admin/profile_fields/index.html.erb

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

* Update app/views/admin/tags/edit.html.erb

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

* Update app/views/admin/users/gdpr_delete_requests/index.html.erb

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

* Update app/views/admin/users/_notes.html.erb

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

* Update app/views/dashboards/following_tags.html.erb

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

* Update app/views/devise/invitations/edit.html.erb

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

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

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

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

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

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

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

* Update app/views/pages/_editor_frontmatter_help.html.erb

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

Co-authored-by: Suzanne Aitchison <suzanne@forem.com>
2021-04-14 13:32:57 +01:00
Michael Kohl
5406b0576e
Split Settings::Authentication from SiteConfig (#13095)
* Split Settings::Authentication from SiteConfig

* Move specs

* Sort fields

* Update settings usages

* Update recaptcha usages

* Add data update script

* Update spec

* Rename SiteConfigParams concern

* Fixes, new route, new controller

* Controller and service refactoring

* More controller and service updates

* Spec updates

* More spec fixes

* Move file

* Fix FeedbackMessagesController

* Update admin/configs_spec

* Fix remaining specs in admin/configs_spec

* Fix configs API

* Formatting

* Clean up old service object

* Various fixes

* Update DUS

* Add model argument to admin_config_label

* Fix key name

* Fix specs

* Add distinct request caches for settings classes

* Fix e2e tests

* Fix remaining system spec

* Make DUS idempotent

* Move routes block

* Cleanup

* Switch to ActiveSupport::CurrentAttributes

* Pinned rails-settings-cached

* Update e2e test

* Update lib/data_update_scripts/20210316091354_move_authentication_settings.rb

Co-authored-by: rhymes <rhymes@hey.com>

* Add guard to DUS

* Temporarily re-add two SiteConfig fields

* Fix config show view

Co-authored-by: rhymes <rhymes@hey.com>
2021-04-12 09:41:09 +02:00
Michael Kohl
d1d4c00114
Update OmniAuth to 2.0 (#12715)
* Update gems

* Remove Omniauth CVE from bundle-audit ignore list

* Add omniauth-rails_csrf_protection gem

This is recommended in the OmniAuth upgrade guide:
https://github.com/omniauth/omniauth/wiki/Upgrading-to-2.0#rails

* Temporarily bundle Devise from master

* Pin Devise commit in Gemfile

* Fix CSRF cookie workaround

As suggested by @fdoxyz

* Remove CSRF workaround

* Add DataDog counter

* Add request path tag

* Remove rendering of devise shared links

* Remove unused Devise partial
2021-02-25 12:46:13 -06:00
narender2031
06a6191424
fix ui issue to display bug (#12365) 2021-01-22 15:47:19 -05:00
Nick Taylor
c24cf73b28
Fixed initial e2e test now that data updates are run. (#11958)
* Fixed initial e2e test now that data updates are run.

* Clearing any indices created in ES during E2E tests.

* Fixed a typo.

* Fixed env vars not being loaded.

* Prefixed data updates command with bundle exec.

* Promoted setting secret to the global section of the Travis config.

* Stopped sourcing .env and promoted ELASTICSEARCH_URL to global section of Travis configuration.

* Had to fix cc reporter in my PR to get PR to work.
2020-12-21 08:40:11 -05:00
Vaidehi Joshi
d008f89399
Forem creator feature flag + onboarding signup form (#11031)
* Add initial forem creator signup form

* Fix label typos in various stylesheets :)
2020-10-23 10:52:21 -04:00
Jacob Herrington
ff177b0c09
[deploy] Only show user count for large userbases (#11021)
This is a request from one of our early adopter Forems. We should only
render the user count that appears on most of our sign up CTAs when a
Forem has a large userbase (initially, I'm setting that to 1000 users).

The change also removes a lot of duplicated markup by using some
partials to render the copy in the various auth CTAs.

Hopefully, this is written in such a way that changing opening up more
fine-grained control of these partials is trivial.
2020-10-23 09:00:59 -05:00
Jacob Herrington
d32c557e5b
Replace deprecated Devise method (#10856) 2020-10-15 07:39:00 -04: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
ludwiczakpawel
dd6e2246ab
[deploy] crayons prep (#10737) 2020-10-09 18:07:49 -04:00
Josh Puetz
37b40c9b04
Link Email Account creation UI to existing Create Account UI (#10746) [deploy]
* Conditional button to link to email accout creation

* Rename email signup state param

* Test for email account creation button scenarios
2020-10-09 10:29:09 -05:00
Vaidehi Joshi
3d169b5e6f
Do not require SiteConfig.tagline (#10623) [deploy]
* Fix incorrect formatting in admin/configs/show.html.erb

* Only render SiteConfig.tagline if it exists

* Fix typo in _signup_modal.html.erb

* Remove tagline from VerifySetupCompleted::MANDATORY_CONFIGS

* Improve signup_modal tagline specs

* Tiny fixes to address @citizen428's comments
2020-10-06 10:34:34 -07:00
Ben Halpern
7e9a6b848d
Add multiple entry options (#10117) 2020-09-01 08:59:52 -04:00
Lisa Sy
5ff2ad7437
Update main authentication view to improve visual design (#9856) [deploy]
* Update mobile version of /new registration view

* Optimize styles for desktop view

* Fix typo

* Fix typo

* Add twemojis in footer area

* Update messaging to fulfill all intents

* cache

* cache

* hr-label fix on mobile

* hr-label fix on mobile

* crayons for checkbox

* crayons for checkbox

* remove old styles

* move signin to appropriate folder

* Remove schema changes

* Fix registraction specs and hide password hint for no SSO enabled

* Disable email hint for password reset page

* Fix specs

* Revert "Disable email hint for password reset page"

This reverts commit b33a6dda4c13534541294281f83f7ad5a4864c0d.

* Transfer User.registered.estimated_count to the controller

* Fix import path

Co-authored-by: ludwiczakpawel <ludwiczakpawel@gmail.com>
Co-authored-by: rhymes <rhymes@hey.com>
2020-08-31 09:55:27 -07:00
Ben Halpern
dba151915b
[deploy] Allow initial user to sign up and configure app (#10073)
* Allow initial user to sign up and configure app

* Fix added value unneeded

* Make siteconfig public in tests

* Remove deprecated method and adjust seed default

* Add new controllers not to redirect for public

* Modify tests

* Edit test defaults

* Fix linting

* Add starter mode to seed file
2020-08-31 12:54:22 -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
Mac Siri
76de9a0317
[deploy] Replace #cloudinary with #optimized_image_url (#9876) 2020-08-21 14:46:00 -04:00
JUNO_OKYO
320f54f984
Add "required" attribute to the login form (#9792)
* Add required to email field

* Add required to password field
2020-08-18 10:14:11 +02:00
JUNO_OKYO
1b4e5014ae
Add "autofocus" and "required" attributes to the email field (#9790)
* Add autofocus

* Add required
2020-08-17 16:08:05 +02:00
rhymes
b94dea9b70
Upgrade erb_lint to support latest Rubocop and fix violations (#9663)
* Upgrade erb_lint to support latest Rubocop and fix violations

* Wrong template name
2020-08-07 15:36:48 +02:00
Sai Bhargav
56aea91e45
Fix self closing div tag (#9661) 2020-08-07 15:07:38 +02:00
Ben Halpern
da6a6739e5
[deploy] Invite users to join and create password (#9294)
* Initial invitation work

* Add more invitation code

* Add proper registration page

* Fix up tests

* Fix failings

* Fix spec

* Add self-serve auth config

* Add registered condition

* Change profile image call and registered_at test

* Change comment

* Fix copy test

* Stub emojipedia

* Linting

* Add registered at to factory

* Ensure registered for user tag

* Update app/views/internal/invitations/index.html.erb

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

* Update app/controllers/internal/invitations_controller.rb

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

* Slight changes

* Update recover password flow

* Update app/views/internal/invitations/index.html.erb

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

* Update app/controllers/internal/invitations_controller.rb

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

* Update db/schema.rb

Co-authored-by: Michael Kohl <citizen428@dev.to>
2020-07-15 11:37:19 -04:00
Ridhwana
f37ffc0be9
[deploy] Replace hardcoded logo with secondary logo config (#9219)
* chore: replace the logo with secondary logo

* update the html classes
2020-07-09 09:58:28 -04:00
ludwiczakpawel
75c81b542f
[deploy] Branded authentication buttons (#8679)
* flare tag line height

* .

* init styling

* social buttons

* no need for inverted

* other places

* more

* Fix specs

Co-authored-by: rhymes <rhymesete@gmail.com>
2020-06-15 17:34:07 +02:00
rhymes
883eb170de
[deploy] Authentication refactoring: add available and enabled providers (#7505)
* Add Providers(.available|.enabled|.enabled?)

* Add provider_sidebar partial

* Add providers_signup_modal partial and Providers.sign_in_url

* Use path helpers

* Add providers_nav_menu partial

* Add providers_registration_form partial

* Generalize users/additional_authentication

* Refactor sign_in_path and authentication_path

* Add .official_name and fix specs

* Preload authentication providers correctly and use less Ruby magic

* Put require_dependency in the correct place
2020-04-28 16:16:28 +02:00