* initial rough version
* link to relevant rules, extract image text, only show if more than 0 errors
* jsdoc and tweaks
* refactors
* add tests
* open info links in new tab
* add new window link icon
* 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>
* Try to fix preview bug
* Now an error is thrown client side if HTTP status isn't 200
* Now the JSON response is thrown instead of the response when preview fails.
* Linter test
Co-authored-by: Nick Taylor <nick@dev.to>
Co-authored-by: Fernando Valverde <fdov88@gmail.com>
* Move to new keyboard shortcuts
* No longer required
* Import order
* Import order
* Add trailing comma
* Remove keyboardShortcutsHandler from exports
* Remove pointless arrow function
* Fix Runkit tags not being activated when comment is added
* Runkit tag activation was ran once, on page load. I've changed it to
run on on comment preview and submit.
* It was necessary to add a check to skip already activated Runkit
tags. The code didn't take into account that a tag could be already
processed, and would just crash.
* Fix Runkit tags and add tests
* Add test for previewing article with Runkit tag
* "Fix CodeClimate not finding waitForRunkitAndActivateTags()
* Refactor a test for readability
* Make Rubocop happy
* Improve test for previewing article with Runkit tag
* Use one method for determining active Runkit tags
* Defer loading of JS from embed.runkit.com
* Add utility function dynamicallyLoadScript(url)
* Switch to dynamic loading of Runkit
* parsed content code block is also hidden now to avoid displaying <code /> block before runkit iframe loads.
* Fix Runkit test
* Remove Runkit script caching in v2 form
* Use <%== instead of .html_safe in v2 form
* Update app/assets/javascripts/utilities/dynamicallyLoadScript.js
Co-authored-by: Nick Taylor <nick@iamdeveloper.com>
Co-authored-by: Nick Taylor <nick@iamdeveloper.com>
* 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
* 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
* 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
* Initial work on v2
* Initial changes merger
* Work to finalize v1/v2 editor adjustments
* Clean up styling
* Fiddle with form margins
* Fix some tests
* Change video
* skip a couple tests
* Modify tests to work with new code
* Add myself to core contributors
* add myself to the core contributors
* implement autosave in sessionStorage
* clear sessionstorage on save
* add new changes flag
* add clear button and css for it
* add clear button functionality
* make clear session storage only run if save is successful
* update jest snapshot for autosave
* add a few tests
* add a few tests
* add test for clear button
* make autosave work for title, tags, and cover image
* remove console.log
* make clear button into a message instead
* move to button with no styling instead of span
* remove warning on refresh
* remove warning on refresh
* move to localstorage so that persists across tabs
* fix blip on change from HTML to JSX
* make confirm work properly
* fix css jump for v2 editor
* fix v2 editor height jump
* remove unused onKeyUp prop
* indent _v2_form.html.erb file
* indent v2 editor erb
* Update package.json with missing package
* add myself to the core contributors
* add comment template
* merge upstream
* make sure the template re-appears for top level comments after submission
* make interface admin only
* Adjust comment template form
* Fix merge conflicts
* Remove unnecessary comment template from json
* Add myself to core contributors
* add myself to the core contributors
* fix to issue 1574 with the V2 editor
* fix tag bug in v2 editor
* fix v2 editor bug
* remove unused code