* Add name to tags component
* Remove old form field
* Update Jest snapshots
* Put form field back in
* Remove explicit name from form field
* Add comment explaining keeping tag_list form field
* Typo - faciliate --> facilitate
* JavaScript MVP
- First round of linting
- Use for testing
* Add some default UI error handling
* Add file validation to updating profile image
* Add type validation and fix size bug
* Refactor and add file validation to article cover
* Add file validation to body images
* Add accept field to profile image form
* Add parseInt to maxFileSizeMb
* Add accept and max-file-size-mb to article images
* Change parseInt to Number
* Add file validations to podcast form
* Add accept image to podcasts
* Add file validation and accept field to org form
* Use appendChild for error message
* Add file validation to comment form
* Add JS Docs comments
* Remove redundant format check
* Add documentation to override default values
* Update documention (spelling, formatting, etc.)
* Update max-file-size-mb to 25
* Bump default max file size for images to 25
* Change appendChild to append
* Refactor remove error message
* Refactor JS, remove console logs, update error msg
* Remove video from permitted file types
* Update error messaging
* Update docs for funciton params...oops 🙈
* Fix file size check logic
- Allow for 0 maxFileSizeMb
- Use JSON.parse() for permittedFileTypes to get an Array
* Add specs
* Change blackbox to black box
* Remove wait_for_javascript
* Remove comments from spec
* Remove Algolia from comments
* Remove more references to ordered_comments index
* Remove more references to Comments Algolia index
* Fix index_worker_spec
Previewing a main image on an article was broken in v2 of the editor :(
We had some tests for this (which I wrote), but the setup for the tests weren't quite right!
This commit fixes the bug, and also refactors and cleans up our tests quite a bit.
Also adds some snapshots for both v1 and v2 editors in a "no image" preview state.
* Refactored to use a common <OrganizationPicker /> component.
* Small refactor to organization <option />s.
* Renamed files from OrgSettings* to OrganizationPicker*
* Brought orgsettings inline to article form.
* Brought orgsettings inline to listings form.
* Rename onBlur to onToggle for org picker instances. Ooops.
* Updated <OrganizationPicker /> test.
* fix eslint issues in article-form's jsx files
* Use e.key instead of deprecated e.keyCode
* Put back whitespace but in html format
* use re-usable SetupImageButton comp, use window.confirm, put back console.log temporarily
* import deep
* fix CoverImage className prop issue
* update jest snap files
* remove no-restricted-globals from eslint-disable-next-line
* Add tag rules to article v2 editor
* Add bottom phrase to tag dropdown
* Remove console logs
* Remove empty space in css
* Remove commented code and clean up css
* Add type='button' for a11y
* Add Stack Exchange Liquid tag
* Add Stack Exchange/Overflow tag
* Convert to integers
* Add better error handling
* Make all links open in new tab
* Adjust names and refactor a bit
* Use key for every API call
* Add new lines to end of svg files
* Add better error handling
* Fix edge case where input is not numeric
* Finalize Stackexhange tag design and functionality
* Fix css typo
* Update snapshots
* Fix snapshot back
* set up refactored onboarding
* create onboarding page
* add in first slide and change slide functionality
* fix test suite
* profile refactor
* profile refactor
* refactor to api
* add checkbox fields
* add checkbox fields
* remove puts
* add basic css
* add styling
* add redirect
* hide back and next at first and last slides
* test refactored onboarding
* test refactored onboarding
* remove article edits
* Fix schema
* Add deleted file back in
* Add default value for checked_t&c column
* Adjust HTML structure to keep nav buttons in place
* Fix ESLint issues on Onboarding.jsx file
* Handling for undefined or empty followedTags on getUserTags
* Fix codeclimate issues
* Fix codeclimate issues
* Fix more codeclimate issues
* Fix more codeclimate issues
* Update Onboarding snapshots
* Uncheck the CoC and T&C checkboxes on render
* Update snapshots
* Return false instead of raising error
* Update spec to use new onboarding
* Redirect to onboarding if haven't seen it yet
* Prevent redirect to onboarding from /signout_confirm
* Use assign_attributes instead of saving twice
* Move COC and T&C checkbox page to second slide
* Add 'go back to original page' functionality
* Reuse ready prototype logic
* Keep track of the last visited onboarding page
* Fix email subscription bug
* Fix overflow issue for tags page
* Remove height to prevent page container scrolling
* Check for CoC and T&C for displaying onboarding
* Add InstantClick redirect and preserve referrer in client
* Fix async update + check by using localStorage
* Turn off onboarding for tests
* Finalize design for onboarding
* Finalize design for onboarding
* Make bulk follows during onboarding
* Fix bulk follow test
* Allow user to have many orgs
* Allow users to handle multi orgs in settings
* Make rounded buttons inline
* Add multi org function to dashboards
* Fix merge conflicts
* Fix mistake in merge conflict fix oops
* Display the correct membership level
* Fix accessibility issues
* Display organizations for article editors
* Handle submitting org id with preact editors
* Make listings work with multiple organizations
* Allow listings to have multiple orgs on create
* Display the correct number of credits for each org
* Move script tag to Webpack
* Allow multi orgs for purchasing and viewing credits
* Use OrganizationMembership as authorization check
* Display multiple organizations for notifications
* Allow dashboard to be viewable under multi-orgs
* Remove unused method
* Add multi-org functionality for article editors
* Show pro dashboard buttons for member+ org levels
* Leave the correct organization
* Allow article API to change org id
* Add left-out authorization method oops
* Make nav buttons a bit more clear
* Fix merge conflict
* Fix adding org id for /api/articles and tests
* Fix tests for org policy
* Use proper logic for displaying org members
* Update org actions with new authorization
* Use correct org when creating a listing
* Remove additional payment charge oops
* Mark org notifications as read with authorization
* Remove deprecated post_as_organization attribute
* Use new org_admin syntax
* Remove deprecated org logic for article create and update
* Default all RSS posts to not belong to any org
* Render org_member page for guest users
* Update org policy spec to work with multi orgs
* Use org_membership for org traits and move identity code
* Use org_member trait
* Update to work with multi-orgs
* Validate article's org_id if param org_id is blank
* Make a let variable
* Remove unnecessary eager load for credits
* Fix HTML structure and org logic for non-org users
* Update credits spec for multi-org
* Add test for failed payment when purchased by org
* Lint listings_spec
* Test that the listing was created under the user
* Add tests for POST /listings multi-org
* Use double quotes for classes
* Fix /manage and a few other multi-org bugs
* Fix test for multi org
* Use correct method SQL exists? not Rails exist?
* Fix reads spec for multi-org
* Fix org_controller actions to work with multi org
* Test only multi org and not old usage and fix leave_org
* Fix org showing user profile img test for multi-org
* Fix org logic for users with no orgs
* Remove switch org functionality
* Update tests and add hidden param for org id
* Redirect to the specific organization
* Test other org button actions
* Use settings_notice instead of legacy notice and refactor
* Fix weird extra end issue prob from merge conflicts
* Test for with new flash key
* Fix user_views_org tests for multi-org
* Test for new flash message
* Update snapshot with new a11y html
* Move styling to stylesheet
* Add site admins functionality
* Move org_member? method in user model and refactor
* Use unspent_credits_count for organizations
* Add tests for /listings/new and minor bug fixes
* Use .present? in case of empty array
* Fix a lingering deprecated method
* Use greater than 1 for random numbers
* Add tests for counting spent and unspent credits
* Add system test to create article from the editor
* Move article creation from API to app controller
* Fix system test to edit posts
* Move article update from API to app controller
* Rewrite create article API using API key
* Add main_image and canonical_url to allowed creation params
* Rewrite update article API using API key
* Fix tests and have Comments API inherit from API
* Simplify article show page reactions
* Clean up styling and adjust zen mode logic
* Remove unused variables
* Update app/views/articles/_actions.html.erb
Co-Authored-By: Nick Taylor <nick@iamdeveloper.com>
* Small style mods
* Slight padding change
* Finalize new show page button design