* Add tooltip for cover image button
* Add cover img tooltip to v1 editor
* Use a slightly different message
* Fix tests
* Use proper comment syntax for front matter
* Fix Cypress test
* Use regex to find matching label
* test(cover-image): uses correct queries for ui unit tests
* test(form): replaces queries to getByRole and adds expect where necessary
* feat(help): adds expect assert and uses within to test inside specific block
* feat(image-uploader): uses correct queries to validate behaviour
* test: corrects queries and adds expect assertions to some unit tests
* add runtime utilities in webpack land, refactor webpack JS using old class
* access Runtime in legacy JS code via window.Forem namespace
* refactor
* make sure data-runtime added only after page does initial load
* Re-enable imageUpload native integration
* remove temporary inline comments
* move addEventListener to useEffect hook
* console.log on native messages from image upload integration
* Debug suggestions
* store text area in ref rather than state
* call error callback from native message handler
* Remove debug logs
Co-authored-by: Suzanne Aitchison <suzanne@forem.com>
* window.ForemMobile namespaced functions
* Fix broken Buildkite
* Wait for data-loaded before using Runtime in pack
* Bring back sprockets base
* Better error handling
* Smal fixes to ConsumerApp to support Android platform
* Fix typo
* utilities/waitForDataLoaded.js
* Update app/javascript/utilities/waitForDataLoaded.js
Co-authored-by: Nick Taylor <nick@forem.com>
* Review feedback
* Fix failing spec
* Cleanup promise
* Remove old utility file
* Add Cypress check for namespaced availability
* More specs
* Refactor to rely on ForemMobile for native bridge messaging
* Fix spec/requests/api/v0/instances_spec.rb
* Fix devices spec
* Remove changes to /api/instance
* Refactor to dynamic import
* Fix typo
* Fixed custom event detail payload for tests.
* mock ForemMobile function instead of webkit call directly
* failing jest test debug
* Another attempt
* Fixed broken test that was missing an onMainImageUrlChange prop on the component.
* Fixed mobile bridging E2E tests.
* Move Cypress tests to mobileFlows
* Add JSDocs + cypress spec for injectJSMessage when logged out
* Cleanup + Disable native image upload until AppStore approval
Co-authored-by: Nick Taylor <nick@forem.com>
Co-authored-by: Nick Taylor <nick@dev.to>
* 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>
* 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.