* 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
* 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
* Suggested follows copy changes
* See if this makes codecov happier?
* Still trying to appease codecov
---------
Co-authored-by: Ben Halpern <bendhalpern@gmail.com>
* 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
* WIP: add a creatore settings form
* WIP: updat the controller to use the Creator Settings FOREM
* feat: use the creator settings form for the new action
* feat: add some default values for the new action
* a note about form data
* update the initiaize function to set some default values
* feat: update the form to use the model data
* feat: permit adn use the attributes within creator_settings_form
* update the flash error
* refactor: require and permit parameters
* chore: use booleans, set defaults and validate the form
* spec: update all the creator_settings tests
* chore: remove comment
* refactor: use self
* feat: aggregate failures'
* chore: remove the logo uploader in the controller
* refactor: update error handling
* feat: update the wasy the controller handles success and error
* chore: remove the resource errors
* feat: show flash message on new line
* fix: use a redirect so that we can get back to /new
* refactor: pass these values through as they seem to be caching whne setting them as default
* chore: change default values
* spec: update tests
* Fix CreatorSettingsForm specs
* fix: use a boolean for public
* spec: add another test for the success var
* fix: radio button labels to correspond + cyress specs
* spec: update based on new changes
* spec: update the params and the expected output
* spec: update the comments and status
* feat: no need for the initialize as we use Active Record Attributes
* feat: update the tac and coc to be persisted when ticked
* fix: amend spec
* blank space
* Message
Co-authored-by: Michael Kohl <me@citizen428.net>
* Set no-var eslint rule to error.
* Fixed npm script lint:frontend
* Replaced vars with lets as per new no-var erroring out rule.
* Fixed lint errors that surfaced after fixing the lint:frontend npm script.
* 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>
* 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>
* adds focusTrap wrapper to preact Modal component
* add view specific code for focus trap in admin add nav link
* add script to return a focustrap toggle, use in add nav link modal partial
* add trap to edit nav link modal
* add handlers for sign up modal
* update modal controller for admin section, update nav link modals to use
* update other admin modals with new data values for trap
* remove unneeded erb script file
* remove unneeded target
* refactor to remove extra unneeded param
* remove duplicate code, store getFocusTrapToggle in window
* trap focus in comment and bookmark showModal instances for not logged in user
* remove need for activator id
* clean up id refs no longer needed
* remove custom code and re-use focsu-trap lib
* update storybook docs
* update default export in focusTrap
* prevent close button click triggering a modal toggle twice
* ensure if user navigates from a modal the trap is deactivated
* add jsdoc comments and add dynamic import
* ensure admin controller modal traps are cleaned up on disconnect
* update sign up modal to use crayons
* update modal controller and admin nav links modals to use preact modal
* update profile fields modals for new controller
* tweak styling of sign up and admin modals to match previous
* update listings modal to use crayons modal, adapt focus trap to work with click outside
* memoize deactivate callback to ensure modal can be presented on first page load
* add missed focustrap changes
* fix focus trap issues in onboarding flow
* refactor onboarding focus trap, remove getFocusTrapToggle
* tweaks for styling and article modal toggle
* add click outside tests to modal
* add cypress tests for the login modal
* update liquid tag tests affected by change
* refactors to address review comments
* fix issue with login modal presented twice on comment add
* change ids to selectors in admin modals
* small pr comment refactors
* add listings e2e tests
* add nav link modal tests
* fix issue with help modal
* tweak to fix ui bug from merge
* remove context from showLoginModal
* rename toggleModal
* rename state property for clarity
Co-authored-by: Nick Taylor <nick@dev.to>
* Fixing link focus
1. Removing display content from link
2. Removing extra margin at the top of link
3. Adding before link
* Extending crayon-fields and removing margin-top
* Frontend Ready for Connect Report Abuse
* add feedback api
* js defination fix
* Added Hooks to the Component
* add json response in feedback
* Block popup added
* fix render issue
* Made changes in internal view
* change error message
* Added few design changes =
* add test cases
* Update app/javascript/chat/actions/requestActions.js
Co-authored-by: Nick Taylor <nick@iamdeveloper.com>
* add PR suggestions
* add backend test cases
* report abuse form close
* Update app/javascript/chat/actions/requestActions.js
Co-authored-by: Nick Taylor <nick@iamdeveloper.com>
* Update app/javascript/chat/ReportAbuse/index.jsx
Co-authored-by: Nick Taylor <nick@iamdeveloper.com>
* add test cases
* Update app/javascript/chat/ReportAbuse/index.jsx
Co-authored-by: Nick Taylor <nick@iamdeveloper.com>
* Update app/javascript/chat/ReportAbuse/index.jsx
Co-authored-by: Marcy Sutton <holla@marcysutton.com>
* Update app/javascript/chat/ReportAbuse/index.jsx
Co-authored-by: Marcy Sutton <holla@marcysutton.com>
* group the fieldset
* fix report abuse api
* fix test case
* fix request test case
* fix typo
* cleaned up markup in report abuse component.
* Fixed spacing between abuse options.
* Fixed wording in report abuse confirmation.
* Removed unnecessary data-testid and aria-label attributes.
* Added some top margin to the report abuse form.
* Update app/javascript/chat/message.jsx
Co-authored-by: Suzanne Aitchison <suzanne@forem.com>
* Added a legend to the the fieldset.
* Update app/javascript/chat/actions/requestActions.js
Co-authored-by: Michael Kohl <citizen428@dev.to>
Co-authored-by: Sarthak <7lovesharma7@gmail.com>
Co-authored-by: Narender Singh <narender2031@gmail.com>
Co-authored-by: Marcy Sutton <holla@marcysutton.com>
Co-authored-by: Suzanne Aitchison <suzanne@forem.com>
Co-authored-by: Michael Kohl <citizen428@dev.to>
* 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>
* Fixed unhandled rejection in <ImageUploader /> test.
* Fixed <FollowUsers /> tests.
* Fixed the tests for the <RequestManager /> component.
* Fixed unhandled rejection in search utilities.
* Added an unhandledRejection listener so tests will fail if a Promise fails.
* Added a comment about why you might get an unhandled rejection exception.
* Now Preact dev tools are injected into development bundles.
* Updated frontend debugging documentation.
* Updated frontend debugging documentation wording.