* Async append user suspended status pill
* Rubocop
* Relocate JS tests, for build & coverage
* Better error-handling for this controller
* Refactor HTML to render pill outside h1
* Continuing to tweak design
* JS class prepended
* Basic implementation
* Nit fix
* Using existing profile update api
* API call working
* Basic full implementation
* Nit fixes in design
* UI changes
* Image upload limit set
* Removed drag & drop
* Image size issue fix
* Minor naming fixes
* Removed native mobile code
* Nit fix
* Added few tests
* Added test
* Added test
* Added image upload error
* Added validateFileInput test failure case
* Updated code to test fix
* Revert db changes
* Minor design fixes
* Minor updated test
* Added validateFileInputs test temporarily
* Added processImageUpload test temporarily
* Aded files count test
* Minor warning fixes
* Updated placeholder text
* Added tests for TextInput and TextArea
* Removed un-required test file
* Removed un-required code
* Minor code cleaning
* Prepare: relocate user suggestions
* Prepare: relocate users suggestion service -> query
* Organization query for orgs with above-average scores
* Rubocop
* Limit to last 3 weeks
* Tweak recent scope, limit to 5 orgs
* Onboarding routes are also always JSON
* Divide by zero makes NaN means
* Add Orgs suggester into suggestions
* Rubocop
* select distinct orgs
* Fix for weird edge-case with bad local data
* Include type_identifier in JSON payload
* Update follows API to allow org_ids as input
* Update onboarding front-end to distinguish users/orgs
* Fix: i18n issues
* Fix: type_identifier in json output
* Fix: distinct is weird
* Fix: JS linter
* Continue tweaking front-end
* Audit import order
* Cleanup @todo note
* Try renaming controller action
* Move Article average calculation to postgres and fix math
* Refactor decorated type_identifier
* Refactor SuggestProminent, return more orgs, fix spec math
* Use FeatureFlag for organization suggestions
* This might fix the jest
* Allow trusted user to access response templates
* Add request specs for trusted user templates
* WIP: was just investigating...
* Move permission check to authorizer
* Revert "WIP: was just investigating..."
This reverts commit c38c60f7ab19ce43c174729c2542a9041e9322e2.
* Improved accessibility
Co-authored-by: Suzanne Aitchison <suzanne@forem.com>
Co-authored-by: Suzanne Aitchison <suzanne@forem.com>
* 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>
* Don't set saw_onboarding automatically
This should be set by the onboarding checkbox update (user accepted
terms of service and code of conduct).
The issue is a PATCH request to track the last seen page is sent on
the first page, _before_ the user consents to the terms via the
checkboxes.
This issue is masked by a 422 unprocessable entity response when we
don't get a username in the patch request (next commit).
* Only validate username on the username page
Every other "last page seen" dialog was returning a 422 because the
username is only submitted in the 3rd dialog "build your profile".
Only validate the username field when it's submitted, process other
onboarding updates normally.
* Remove failing test
Since the onboarding_update action no longer sets saw
onboarding (since we send the patch before they've accepted the code
of conduct), don't test that we do.
There's a parallel test for the onboarding checkbox update later in
this file that covers the checkboxes have been accepted.
* overwrite instead of merging user_params
We now initialize it empty, no need to merge params here.
* tokenize settings menu and add French translations
* add quotes around tokens
* add tokens in alphabetical order
Co-authored-by: Ben Halpern <bendhalpern@gmail.com>
* Remove hardcoded instances of education field
* WIP Access display_email_on_profile via User Settings
* Remove unused profile column
* WIP Fix reference to bg_color_hex and text_color_hex
* WIP fix issues revealed by systems specs
* WIP fix issues revealed by services specs
* WIP Fix failing tests
* WIP Fix spec failures
* wip
* Move two attributes from controller to decorator
* Update comment
* Match user settings changes
* More consistently use user.tag_line
Even before the profile changes we sometimes used the user.summary
attribute directly but used the user.tag_line method in other places.
* Remove delegation, rename inline concern
* Drop profile columns from users table
* Remove duplicated work display from header
* Update work profile field handling
* Update DUS + spec
* Delegate more carefully
* Update delegation guard
* Adapt for removed delegation
* Undo accidental schema changes
* Fix seeds
* Remove accidentaly change
* Fix User#processed_website_url
* Update guard clause
* Update profile card content
* Add Organization#profile
* Be more conservative with profile fields
* Spec fixes round 1
* Fix typo
* Update spec
* Limit number of header fields and update card content
* Decorate correct model
* Update factory
* Update schema.rb
* Fix validation
* How bad could this possibly be?
* Pretty bad, nevermind
* Remove obsolete code
* Reset profile fields during test runs
* Move profile fields back to before(:suite)
* Spec fixes
* Remove accidentally re-added files
* More spec fixes
* Specs
* Change User#tag_keywords_for_search
* More spec fixes
* Add comment
* Undo accidental schema changes
* Attempt spec fix
* Remove fix attempt
* Fix e2e test
* Update spec
* Remove guard clause
* Remove hardcoded instances of education field
* WIP Access display_email_on_profile via User Settings
* Remove unused profile column
* WIP fix issues revealed by systems specs
* WIP fix issues revealed by services specs
* WIP Fix failing tests
* WIP Fix spec failures
* wip
* Move two attributes from controller to decorator
* Update comment
* More consistently use user.tag_line
Even before the profile changes we sometimes used the user.summary
attribute directly but used the user.tag_line method in other places.
* Remove education
* Add comment
* WIP
* Clean up mostly_work_with
* WIP
* Update work profile field handling
* More work-related changes
* Remove settings_only from display_area enum
* Remove quickfix from _metadata partial
* Remove special attributes
* Remove leftover spec
* Retrieve location from profile, not user
* Profile.special_attributes no longer exists
* Update specs
* More spec fixes
* Update UsersController
* Update UsersController and spec
* Fix e2e seeds
* Minor cleanup
* More e2e seed fixes
* Fix profile field CSV
* Fix e2e seeds
* Move one more attribute in e2e seeds
* Remove duplicate line
* Clear inputs before typing in them
* Fix formatting issues
* Profiles::Update -> Users::Update
* Remove RegistrationsController#resolve_profile_field_issues
* Fix schema.rb
* More cleanup
* Fix specs
* Fix remaining spec
Co-authored-by: Jacob Herrington <jacobherringtondeveloper@gmail.com>
* schema file undelete description
* feat: v1 of the script
* Flesh out remaining enums under their categories
* complete UsersSettings data update script
* complete DUS for relevant attributes in users and profiles tables
* complete DUS for users_notification_settings
* alphabetize user_settings sql file
* safeguard against null values for "null: false" settings
* Set up actual UsersSettings DUS and specs files
* fix broken DUS script
* complete specs for UsersSetting DUS
* Address QA of specs
* complete specs for users_notification_settings DUS
* fix the typos (thanks Julianna!)
* begin implementation
* still building
* add missing attribute "email_membership_newsletter"
* complete sync code (except race condition for user profile)
* complete implementation, remains tests
* Address PR review and fix Travis fails
* remove superfluous Profile.new
* fix travis fails
* feat: update the users_notification_setting attributes from the user model
* feat: use the config fonts enums to display the fonts
* feat: loop through the keys
* fix profile = nil blowing up; add specs for notification_setting model
* remove unneeded spec
* remove feed validation until after sync code removed; fixes feed_import spec failures
* remove spec associated with feed_url validation in user_setting model
* fix failing spec 😅
* add TODO
* feat: set the user settings in the user controller and use it in the customization form
* feat: move some update logic to the users settings controller thats being used from customization
* feat: show the updated values form the users_settingd and not the user instance
* Generalize redirect back to current tab
* still trying to reflect changed theme upon refresh
* customizations take effect on refresh
* remove 'with_feed' scope from user model
Co-authored-by: Jamie Gaskins <jamie@forem.com>
* start with takeover for fields previously in profiles table
* Takeover code for `publishing_from_rss` section in Settings (#13914)
* implement takeover code part 1
* implement takeover code
* fix feed fetch
* need rhymes help
* complete implementation; specs pending
* fix STUPID omission that caused so many headaches 😫
* implement profile fields pointing to users_settings 🎉
* run migrations
* implement inbox type & guidelines takeover code; specs pending (#13911)
* Point changes in notification settings to `users_notification_settings` table (#13910)
* implement takeover code; remains specs
* address PR feedback; remove related sync code
* address PR review feedback
* need help with routing and specs
* address pr review
* addressing pr review
* Treat implementation edge cases and omissions 😅
* fix uncommented comment
* fixing implementation cases
* address more PR review feedback
* fixing notifications use-cases
* refactor settings controller
* more pr review changes
* solving bugs
* fix broken onboarding
* handle eperience_level calls
* more fixes
* remove unneeded mappings
* add To-dos for quety updates
* remove done TODO
* purge done TODOs
* update notification_settings-related queries
* start fixing specs
* fixing specs
* fix notification and lrg_forem specs
* fixing broken specs
* still fixing
* fix line dif and remove reloads from user.rb
* run specs
* silence bullet and other fixes
* remove setting migration scripts and specs, fix more settings for specs
* handle missing user for article builder and fix notification specs
* fix some final controller specs and re-add incorrectly removed specs
* remove deprecated data update scripts and related workers, put travis back
* refactor admin tags mods controller, write/move specs for users notifications settings controller
* schema cleanup and other small refactors for consistency
* set field we can invalidate in spec via active record instead of at the db level
* remove I think an uneccessary hook call from subscribe_to_mailchimp_newsletter
* use bnefore_create to setup settings, please dont blow up the test suite
* mailchimp bot fix
* remove decorator in favor of single model method
Co-authored-by: Arit Amana <msarit@gmail.com>
Co-authored-by: Ridhwana <ridhwana.khan16@gmail.com>
Co-authored-by: Arit Amana <32520970+msarit@users.noreply.github.com>
Co-authored-by: Jamie Gaskins <jamie@forem.com>
* Replaced granular emails with the default one
* Set reply to header in emails
* Extract shared_examples from NotifyMailer
* Removed unused code
* Replaced SiteConfig with Settings::General
* Fixes related to replacing SiteConfig with Settings
* Removed duplicate line from specs
* Rename SiteConfig
* More renaming
* Update spec
* Update mandatory settings mapping
* More renaming
* e2e test fixes
* You have a rename, and you have a rename
* Spec fix
* More changes
* Temporarily disable specs
* After-merge update
* Undo rename for migration
* undo rename of DUS
* Fix DUS
* Fix merge problem
* Remove redundant DUS
* Fix specs
* Remove unused code
* Change wrong class name
* More cleanup
* Re-add missing values to constant
* Fix constant
* Fix spec
* Remove obsolete fields
* Add accidentally removed field
* Update spec
* Move methods from Settings::General to ForemInstance
* Remove unneeded model
* Change mentions of 'site config'
* Add username to onboarding
* Add margin to profile form error alert
* Update user controller for onboarding
Co-authored-by: Michael Kohl <me@citizen428.net>
* Log params[:token] and destroy_token to Honeycomb when token mismatch
* Refactor #confirm_destroy and add Honeycomb fields for error logging
* Add tests around Honeycomb error logging in #confirm_destroy to spec
* Remove logging of user to Honeycomb in #confirm_destroy and in spec
* Adds guard clauses and better error messages to UsersController #confirm_destroy
* Adds tests around guard clauses in UsersController #confirm_destroy
* Adds a custom error for invalid tokens in UsersController#confirm_destroy
* Refactor user_destroy_token.rb initialize method to be more succinct
* Removes unnecessary code from user_self_destroy_spec.rb and fixes failing InvalidToken spec
* Reworks code in #confirm_destroy to be consistent with other #destroy methods
* Adjust token mismatch test to use mismatched tokens
* Refactors #confirm_destroy and adds a before_action to Users::Controller
- Reworks the logic within #confirm_destroy and removes excess code
- Adds set_or_sign_in_user before_action for #confirm_destroy
- Removes custom InvalidToken error message
* Cleans up spec and adds an additional test around logged out user edge case
* Fixes failing tests due to changes in #confirm_delete flow
* Adjusts test logic in user_self_destroy_spec.rb
* Refactors code by removing custom before_action and rewriting conditionals
* Add script to remove feature flag
* Remove :feeds_import feature flag and RssReader and related classes
* Change Feeds::ImportArticlesWorker signature to support Sidekiq Cron serialization
* Replace RssReader::Assembler with Feeds::AssembleArticleMarkdown
* Removing Assembler
* Add earlier_than to Feeds::Import
* Ignore feeds that have been imported in the last 4 hours
* Make earlier_than mandatory in Feeds::ImportArticlesWorker
* Remove GitHub repositories when user deletes their own GitHub identity
* Remove GitHub repos also from the admin remove identity
* Add a notice in Settings/Extension
* Add data update script to cleanup orphan GitHub repos
* feat: v1 of the profile form
* feat: fix inputs and create a handleChange event
* feat: update the submit values to represent values from the form
* feat: ensure that errors and success is handled on send
* refactor: remove unused code
* feat: replace the old profile form with a new one
* fix: use the renames file
* refactor: safety net for groups
* chore: fix code climate issue
* tests: amend + add tests
* test: fix broken spec
* feat: update the setup for the test
* tests: refactored them to move the fake response into the before all
* feat: clunky way to quickly cater for color field since it was a quick and easy implementation
* feat: add a field.description to the color field
* refactor: pull some duplicate code into a new function
* chore: cater for a textarea field
* overflow issue
* refactor: use FormField instead of manual divs
* Update spec/requests/users_onboarding_spec.rb
Co-authored-by: Vaidehi Joshi <vaidehi.sj@gmail.com>
* Update spec/requests/users_onboarding_spec.rb
Co-authored-by: Vaidehi Joshi <vaidehi.sj@gmail.com>
* refactor: move out of method and into a constant
* refactor: user_onboarding_update to be more readable
* refactor: use current.save instead of declaring a new variable
* refactor: remove explicit check for bookean
* refactor: use request from '@utilities/http' instead :)
* refactor: no need for if with destructured groups
* refactor: move color field to its own component
* chore: remove colorfield now thats its a component
* fix: forgot about field
* feat: a text area component
* chore: remove textField function in favor of component
* refactor: checkbox refactor
* refactor: add a switch statement
* chore: move into a more organized folder
* fix: move the handler to props and off from field
* fix: add a conditional so we dont hit an error undefined method `success?' for nil:NilClass
* refactor: change from component to function
* feat: add a key attribute
* refactor: add role for readers
* refactor: remove unnecessary guard clauses
* refactor: use function instead of an arrow
* chore: document components
* test
* padding
* fixes
* test: fix the tests by using more general matchers
Co-authored-by: Paweł Ludwiczak <ludwiczakpawel@gmail.com>
Co-authored-by: Vaidehi Joshi <vaidehi.sj@gmail.com>
* Add explanatory comment to how RssReaderFetchUserWorker works
* Add Feeds::ImportWorker worker
* Enable Feeds::Import for single user feed fetching behind a feature flag
* Add Feeds::ValidateUrl service
* Add feature flag to user's validate feed URL feature
* Remove todo notices
* Add feature flag to fetch_all_rss task
* Add feature flag to RssReaderWorker
* Bring back short-circuit for Articles::RssReaderWorker
* 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>
* Update data exporter to handle admin send
* Match button with everything else
* Use proper redirect path
* Stub SiteConfig definition instead of setting it
Co-authored-by: Mac Siri <krairit.siri@gmail.com>
* Removed if statement by accident oops
* Remove non-functional boolean param and pass email directly
* Use refinement to conv to boolean instead of JSON.parse
* Rename to StringToBoolean
* Use 'using' in proper scope (not in method)
* Rename to_bool to to_boolean
* Refactor if statement, thanks rhymes!
* Fix small bugs in tests
* Remove tracking for export_email b/c no @user
Co-authored-by: Mac Siri <krairit.siri@gmail.com>
* chore: update the profile to be more dynamic. Maps out the group + field name + value for field
* feat: add the correct input type to the form tying it to the correct method to update
* feat: update the value and the label
* feat: update the profile with a submit
* refactor: ensure we dont show empty groups on the settings/profile
* fix: this shoudl be dribbble
* fix: use attributes! to refresh the cache to ensure that we font run into the case where Profile.attributes is []
* feat: show group description only when it exists
* chore: add some classes
* feat: use the profile update service to update the relevant user information
* chore: rename variable
* chore: use a scope to not return empty groups
* fix: only update user if the profile sync is update is successful. Also capture errors
* feat: style the crayons field checkbox
* refactor: rename the attribute to user instead of profile
* refactor: service object
* Fix CodeClimate warning and rearrange code
* Fix service object, add missing attribute
* Fix flash and add redirect
* Fix service object + spec
* Fix user edits profile spec
* Disable spec
* Fix more specs
* Undo vim fail
* Add data update scripts
* Update where clause in data update script
* Rename method
* Make sync_to_user conditional
* Add after update actions and Honeycomb
* feat: handle checkbox allow chcekbox to check
* Don't set experience cookie in ProfilesController
* Clean up Profiles::Update object
* Fix spec
* Remove Twitch integration (#10732)
* Remove Twitch integration
* Ignore columns
* Change admin password in docs (#10735)
Update default admin password in documentation
* Do not require meta_keywords to be set (#10721)
* Remove extra character from meta_keywords in /listings/index.html.erb
* Remove meta_keywords from MANDATORY_CONFIGS
* Add and use meta_keywords_tag helper
* Use modern tag syntax instead of deprecated syntax
* Add and use meta_keywords_default helper
* Add and use meta_keywords_article helper
* Remove * from meta_keywords_field.label
* Update meta_keyword specs to account for no keywords being set
* Generalizes Connect welcome message and settings nav tab and refactors tests (#10741) [deploy]
* [deploy] fix: Clear chat input after Enter key submit (#10487)
* fix: Clear chat input after Enter key submit
* fix: Rename Composer component
* test: Add integration tests for input value
* After pressing Enter
* After clicking Send
* After clicking Save edit
* After clicking Close edit
* Remove tabindex of -1 on upload image input in the write a post editor (#10543)
* Remove tabindex of -1 on upload image input in the write a post editor
* Remove negative tabindex on image uploader's outer button
* Give tabindex of -1 to outer button on image uploader
* Update buttons.scss
* [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>
* Add Section for Series/Collections (#10719)
* Add Section for Series/Collections
I added a small section in this area of the docs to share some information about collections/ series.
There is not much information in the documentation about collections or series and I felt like this would be beneficial to others looking to help with the Series feature of the website.
* Updated wording of collections section.
* Articles API: filtering by tags (#3654) (#10614)
* Articles API: filtering by tags (#3654)
* Address CR comments (#3654)
* Add test case
* Move tests
* Update docs
* Use _any_ option for querying by tags (#3654)
* Move Imgproxy endpoint config to Images::Optimizer (#10742)
* 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
* Add forem meta tags (#10747)
* Add forem meta tags
* Add docs
* Update docs/technical-overview/compatibility.md
Co-authored-by: Jacob Herrington <jacobherringtondeveloper@gmail.com>
* Update docs/technical-overview/compatibility.md
Co-authored-by: Jacob Herrington <jacobherringtondeveloper@gmail.com>
* Update docs/technical-overview/compatibility.md
Co-authored-by: Jacob Herrington <jacobherringtondeveloper@gmail.com>
* Update docs/technical-overview/compatibility.md
Co-authored-by: Jacob Herrington <jacobherringtondeveloper@gmail.com>
* Remove Twitch-related columns from users table (#10750)
* [deploy] Long text goes outside cards (#10740)
* Add word-break to crayons-card
Add word-break to crayons-card this will allow words to be broken if the word is too long but will wrap normally otherwise.
* Use overflow-wrap: anywhere;
`break-word` is deprecated though `anywhere` does not work in IE
* Removes superfluous sign_in from users_onboarding_spec.rb (#10757) [deploy]
* [deploy] Allow glitch id starting with ~ (#10544)
* [deploy] crayons prep (#10737)
* Add DEV special case for following hiring tag
* Move image validation to Profiles::Update object
* spec: move over the tests for validating images
* Move follow_hiring_tag into the service object
Co-authored-by: Ridhwana <ridhwana.khan16@gmail.com>
Co-authored-by: Andrew Bone <AndrewB05@gmail.com>
Co-authored-by: Vaidehi Joshi <vaidehi.sj@gmail.com>
Co-authored-by: Julianna Tetreault <32834804+juliannatetreault@users.noreply.github.com>
Co-authored-by: Robin Gagnon <me@reobin.dev>
Co-authored-by: Manaswini <58681405+Manaswini1832@users.noreply.github.com>
Co-authored-by: Andy Zhao <17884966+Zhao-Andy@users.noreply.github.com>
Co-authored-by: Christopher Wray <53663762+cwray-tech@users.noreply.github.com>
Co-authored-by: Rafal Trojanowski <rt.trojanowski@gmail.com>
Co-authored-by: Mac Siri <mac@dev.to>
Co-authored-by: Josh Puetz <josh@dev.to>
Co-authored-by: Ben Halpern <bendhalpern@gmail.com>
Co-authored-by: Jacob Herrington <jacobherringtondeveloper@gmail.com>
Co-authored-by: irmela <irmela@berlin-coding.de>
Co-authored-by: ludwiczakpawel <ludwiczakpawel@gmail.com>