* Navigate back to dashboard instead of article.path
* Set mainImage to null to remove image properly
* Use dashboard_path over string path
Co-authored-by: Michael Kohl <me@citizen428.net>
* Handle apostrophe edge cases
* Allow main image to be set
* Add new test for removing article cover img
* Use potentially less flaky find
* Use findByAltText instead of get
Co-authored-by: Michael Kohl <me@citizen428.net>
* WIP - initial exploration into post mentioon autocomplete
* replace the autosize textarea with mention autocomplete, adjusting height
* add cypress tests for mentioning in a post
* fix resizing of text areas
* refactor text area resize hook
* refactoring
* update cypress tests
* remove mergeRefs from utils, extract UserListItemContent
* allow useTextAreaAutoResize elements to have height greater than minimum, apply styles to container
* Trigger Travis CI
* Travis plz
* small refactors
* add comments and constants as per PR feedback
Co-authored-by: Nick Taylor <nick@dev.to>
* 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>
Co-authored-by: Nick Taylor <nick@iamdeveloper.com>
Co-authored-by: ludwiczakpawel <ludwiczakpawel@gmail.com>
Co-authored-by: Nick Taylor <nick@dev.to>
Co-authored-by: Suzanne Aitchison <suzanne@forem.com>
* First working version to integrate native bridge image upload
* ImageUploader base64 experiment
* Adds message handling
* Adds support for cover image
* Revert pre-commit hook changes
* Revert pre-commit hook changes
* Better native image upload logic + mock Runtime class in tests
* Dont render hidden fields unless necessary
* Better test coverage & inline comments for better context/documentation
* Added an a11y test for when native iOS image upload is available.
* Added more test
Co-authored-by: Nick Taylor <nick@dev.to>
* Convert index.jsx to index.js as they are just barrel files.
* Removed prop types and eslint configs from code coverage.
* Using <root_dir> in test ignore patterns now.
* Added app/javascript/storybook-static to eslint's ignore list.
* Now .storybook is excluded from code coverage.
* Bumped coverage thresholds
* Fixed to <rootDir>
* 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.
* Move to new keyboard shortcuts
* No longer required
* Import order
* Import order
* Add trailing comma
* Remove keyboardShortcutsHandler from exports
* Remove pointless arrow function
* 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
* Refactored drag n drop functionality to a hook and component.
* Add the snackbar to the article editor.
* Now you can drag and drop images in the post body content.
* Cleaning up a few things.
* Now post cover images can be dragged and dropped.
* Removed unused empty function.
* Added @testing-library/preact-hooks so that we can test hooks.
* Some renaming, small refactor.
* Added tests
* Added more tests.
* Added more tests.
* Added message about dropping only one image in post body.
* Added message about dropping only one image for cover image.
* put onDrop into it's own meethod.
* More tests.
* Added some API documentation.
* Updated editor help with drag and drop image help.
* drag and drop styling
* .
* revert
* Fixed broken test.
Co-authored-by: Nick Taylor <nick@dev.to>
* Refactored drag n drop functionality to a hook and component.
* Add the snackbar to the article editor.
* Now you can drag and drop images in the post body content.
* Cleaning up a few things.
* Now post cover images can be dragged and dropped.
* Removed unused empty function.
* Added @testing-library/preact-hooks so that we can test hooks.
* Some renaming, small refactor.
* Added tests
* Added more tests.
* Added more tests.
* Added message about dropping only one image in post body.
* Added message about dropping only one image for cover image.
* put onDrop into it's own meethod.
* More tests.
* Added some API documentation.
* Updated editor help with drag and drop image help.
* Changed wording.
* Now the alt text for markdown removes the file extension.
* Updated help wording. Thanks @rhymes
* Now the image markdown adds a new line at the end as we currently do not support inline images.
* flare tag line height
* .
* dropdown fix + actions bar fix
* actions bar on mob
* fixing typography and improving font handling
* cleanup
* variables naming
* fonts swapping
* Makes user's default font render as SiteConfig.default_font
* Trigger checks
* Fixes missing user model specs
* Fixes storybook CI error import & logged out user font set with default
* Limits default_font config to serif, sans-serif & open-dyslexic
* Default font description text
Co-authored-by: Fernando Valverde <fdov88@gmail.com>