* 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>
* starting doc update
* ongoing
* progressing
* still updating
* continue doc update
* note about old liqtags
* add link to create bug-issue
* remove tabular list of supported embeds
* do away with the table!
* address PR review comments
* nudge Travis
* add default placeholder, remove focus on first load
* fix some bugs re autofocus and mouse click to select
* allow custom selected styles to be passed in
* operate on objects with name property rather than plain strings
* WIP main functionality in place
* set default selections, allow a max to be placed on selections
* switch help context
* bug fixes to edit mode, static suggestions
* make sure suggestion resumes when edit begins
* cleanup and docs
* update existing form test
* add component tests
* add more component test cases
* refactor max selections flow, ensure default tag data only loads once
* stop removing combobox properties now the input stays visible
* add max selections test
* refactor
* make sure input refocus happens after blur event
* update cypress tests
* some small renames and doc changes
* only fetch exact matches from added tags
* fix test, update dark theme background
* set a max height on the popover, and ensure options can be scrolled into view
* woops - max height
* Update app/javascript/article-form/components/TagsField.jsx
Co-authored-by: Ridhwana <Ridhwana.Khan16@gmail.com>
* refactors
* stop dropdown from flickering
* use ButtonNew
* remove redundant variant
* nudge PR checks
Co-authored-by: Ridhwana <Ridhwana.Khan16@gmail.com>
* add missing unique key to fragment created with map
* add appropriate key for fragment
* Remove files removed from main
* After merge cleanup
Co-authored-by: Michael Kohl <me@citizen428.net>
* initial add of toolbar to v2 editor WIP
* fix Form test knocked out by rebase
* basic image upload functionality added to toolbar
* add cypress tests for toolbar
* move image tests to previous cypress spec
* test markdown insertion from buttons in jest
* small tidy up
* remove right padding in scrollable layout, hide scrollbar
* update tests following new line changes
* add more doc comments
* tweak padding css
* create constant for image placeholder
* add image uploader change missed in staging after merge conflict resolution
* Preventing author profile from going transparent
Prior to this change, when you would hover over an author profile that
was "close to" the bottom of the page, the card would be transparent
instead of the expected opaque.
With this change, when you hover over an author profile that is "close"
to the bottom of the page, the card renders as an opaque card.
Now why does this work? I don't really know, except to say that a
`display: table` imperative is a more "chunky" display element than a
block. I would love for someone to explain why this works.
Tested against on MacOS Safari, Firefox, and Chrome.
https://developer.mozilla.org/en-US/docs/Web/CSS/displayFixes#15290
* revert table
* fix
* missed spot
* actions dropdown
Co-authored-by: Paweł Ludwiczak <ludwiczakpawel@gmail.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>
* style updates
* author and tools
* overflow hidden for avatars because geeeez
* font smoothing
* reverting little change
* specs
* preview
* css fix
* avatar fix'
* No longer eager load user profile when showing articles.
articles show view no longer needs user profile, as it no longer
renders the user profile preview.
* tags
* tags
* tags reverts
* typo
* dropping initializer for user cards previews on article page
* spec
* remove spec
* revert
* Update app/decorators/article_decorator.rb
Co-authored-by: Michael Kohl <me@citizen428.net>
* Update spec/requests/stories_show_spec.rb
Co-authored-by: Michael Kohl <me@citizen428.net>
* yoloing outline change on buttons because i couldn't see any visual difference
Co-authored-by: Dan Uber <dan@forem.com>
Co-authored-by: Michael Kohl <me@citizen428.net>
* enable debug for warnings in dev env
* remove preact/devtools call no longer needed
* fix majority of proptype errors on home page
* sweep up proptype errors from listings page
* fix article form error
* use the dropdown initializer in post editor options
* use dropdown initializer in comment subs dropdown
* use Dropdown component in listings
* show the dropdown button when it's focused
* update storybook notes and components
* add cypress tests for post options dropdown
* add comment subscription tests
* make sure page is properly initialized before setting button functionality
* add jsdoc comments, props types, rely on optional chaining
* Update app/javascript/crayons/Dropdown/__stories__/dropdowns.md
Co-authored-by: rhymes <github@rhymes.dev>
* Update app/javascript/crayons/Dropdown/__stories__/dropdowns.md
Co-authored-by: rhymes <github@rhymes.dev>
Co-authored-by: rhymes <github@rhymes.dev>
* replace inline attribute defer with external js - show.html.erb
* fix typo in filename
* disable no-undef and bail if not defined
* put js on subfolder utilities
* refactor jsx instead of loading chunk with defer
* fix typo in desc
* better name for global gist helper
* use InstantClick
* working script on preview AND single view, not dynamic import, though
* embed only if gists
* combine all approaches to make dynamic import work
* make gist embeds work on submit comment form
* make gist embeds work on preview comment
* refactor - preview comments and submit
* add pack editComment + helper embedGistsInComments
* comment gist helper
* delete useless file utility
* use new syntax for events
* put code in method embedGistsInComments
* delete older pack gist
* handle edge case 'view full discussion'
* resolve conflict with package ibm-openapi-validator
* resolve conflict with package husky
* empty commit to test random error travis
* better name for class dismiss
* handle future events submit
* delete test code on click toggle form
* delete unused file
* rename pack as js file, not jsx
* Added POC using MutationObserver.
* missing case: notification page
* use custom pack notification page
* add e2e test for comment with embed gist
* add e2e test for preview post with embed gist
* add an extra step in tests to check gist is present
Co-authored-by: Nick Taylor <nick@dev.to>
Co-authored-by: Suzanne Aitchison <suzanne@forem.com>
* 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 error handling to clipboard promise - post editor
* Adds a reload when rendering the Editor to get missing navigator.clipboard
* Remove reload logic from Post Editor
* Adds Honeybadger notify on error handling
* update storybook example and docs
* update desktop home feed tabs with a11y enhancements
* update storybook to reflect buttons usage, update post editor buttons
* update admin html variants tabs
* update admin sponsorships tabs
* re-add flex to the crayons-tab class to prevent regression in tab components not updated
* Revert "update admin sponsorships tabs"
This reverts commit d9e4a5e4b0d362e38a11c795b35ceb4442bc4d90.
* Revert "update admin html variants tabs"
This reverts commit 3d9f119e88dc2f2f102d664c57a1f56413490a36.
* update search tabs
* update v2 form erb html
* update tag index tabs
* update notifications tabs
* label the notifications nav
* update mod sidebar tabs
* update main analytics page tabs
* add cypress tests for home feed tabs
* add tab tests for the post editor
* add cypress tests for tags index navigation
* fix UI issue with search tabs, add search cypress tests
* add tests for the analytics dashboard tabs
* add mod nav tests
* add notifications navigation tests
* get new handles after view switch
* replace hardcoded mod paths
* apply review suggestions
* Refactoring Help component
* Fixing typo
* Adding missing prop types
* Removing setCommonProps
* Moving show to parent component
* Renaming Format component
* Converting help component to functional component
* Removing html from state
* Fixing modal toggle and eslint errors
* Adding arria hidden
* Using optional chaining
* Fixing variable names
* Renaming state variable
* Adding jsdoc
Co-authored-by: Nick Taylor <nick@dev.to>