* 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>
* make connect message dropdown accessible
* add a cypress test
* use crayons buttons throughout
* fix some unhandled error affecting cypress
* make message options a list
* minor tweak to test
* guard against filter error being triggered in test
* utilise newer dropdown helpers
* wait for message to fully send
* use optional chaining
* 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>
* use dropdownutils in dashboard and manage pages
* add tests for the toggle menu on dashboard
* add test for archiving from manage post view
* small tweak to avoid unhandled errors
* small tweaks to form methods
* 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
* WIP - basic init of comment dropdowns with open and close on click
* WIP - initialize the share dropdown
* initialize all post dropdowns within packs, init copy to clipboard announcer
* refactor and add JSDocs to helper
* undo changes to base jsx
* update accessible name of post actions button in cypress test
* make sure dropdowns pack loaded on comment index page
* undo prettier changes in base jsx
* undo prettier changes in base jsx
* initialize comment dropdowns in podcasts
* add test for the post actions
* add article comment tests
* add cypress tests for comment dropdowns
* 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>
* Revert "Revert "Add (updated) mention autocomplete to post comments (#13061)" (#13116)"
This reverts commit e28bde043c.
* Fix issues with editing comments and arrow key navigation, update tests
* Update app/javascript/crayons/MentionAutocompleteTextArea/MentionAutocompleteTextArea.jsx
Co-authored-by: Nick Taylor <nick@forem.com>
* refactor adding of attributes
* destructure
Co-authored-by: Nick Taylor <nick@forem.com>
* add mention autocomplete functionality to article and notification comments
* add cypress tests
* make sure entry transitions dont replay
* undo change to async useeffect covered in other pr
* move search into dynamic import
* exit search if enter pressed in middle of search term
* refactor button activation code
* add a space after a mention is selected
* tweak cypress test for reply to ensure it awaits combobox
* small refactor
* initial setup of component
* initial styles applied
* add some initial docs
* small tweaks to story
* add some very initial tests
* tweaks to styles to add border bottom
* add some preact tests
* import default style in jsx, ignore in jest
* WIP - create MentionAutocompleteListener, attempt to position popover
* position dropdown correctly, exit selection in various scenarios
* refactor
* make sure cursor placed correctly after selection
* only import autocomplete when needed
* rename files, add jsdoc
* update tests and story notes
* tidy up scss file
* fix story styling
* fix aria label in story
* fix issue with key event not triggering in mobile
* position dropdown at input left if small screen
* fix issue with deleting and re-entering
* don't trigger search if directly following a letter or number
* stop change event being fired with highihted text
* move regex out of function into constant
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>
* Prep work to sync mobile search in #10424
* Added a comment about the custom search event.
* Refactor to fix already defined error caused by const and InstantClick.
* Moved <SearchFormSync /> out of the pack file.
* Fixed broken tests.
* Renamed getInitialSearchTerm utility function to getSearchTermFromUrl
* Added some API docs to getSearchTermFromUrl
* Fixed a typo.
* Added some more API docs.
* Switched to a custom event so a custom payload can be passed.
* Added some API docs.
* Fixed bad destructuring statement.
* wip for some more tests.
* Refactored getSearchTermFromUrl to use URLSearchParams
* lazy loaded state for search term initial value.
* test broken still. Need to think on it.
* filterXSS is now set up in testSetup.js
* Fixed tests.
* Added the @utilities alias to Storybooks webpack config.
* Almost 100% coverage with two useful tests.
* Added some comments explaining document.body usage in the tests.
* Fixed issue where search attemps to get results on first load.
* Small refactor for setting the window.location in tests.
* Clarified an explanation in a comment.
* 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.
* 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.
* Feature 🚀 : Ability to delete messages in chat channels
- Sending message ID to frontend
- Deleting Message
- Use pusher to delete message realtime
* Minor Bug 🐞: Show message action only for current user
- User can delete or edit their own messages
* Test cases added
* Bug 🐞: Update message id for receiver
Message id was not sent to receiver by pusher
* Refactoring🛠: Message controller refactoring
* Test Cases📝 : Specs for Delete message added
* Feature 🚀 : Ability to edit messages
* Test Cases📝 : Specs for Edit message added
* Merge conflict resolved
* fix video content issue
* add UI for membership management
* add api to update memberahip role
* add methods for manage membership
* Add integration test cases
* add emoji for admin
* Open member profile in sidecar only
* 🐞 Problem with direct channel sidecar
* 🐞 Few other UI enhancements
* fix mod typo
* add limit upto 4 for display active memberships
* fix UI issues
* fix action ui for membership
* fix sidebar redirection issue
* fix svg buttons
* add test cases
* fixed broken spec
* fix PR suggestions
* remove not used code
* fix typo
* fix PR suggestion
* fix typos
* add invitation url expiry
* fix specs
* fix PR suggestions
* removed unused gem
* remove presenter format
* handle invitation link expiry with redis
* fix PR suggestions
* user can view non-discoverable channel invitation link
* fix typos
* remove commented code
* add spacing
* PR suggestions
* remove class from button
* replace componentDidMount with commen function
* remove action button for single membership
* add chat message on update role
* add spece between lines
Co-authored-by: Narender Singh <narender2031@gmail.com>
Co-authored-by: Fernando Valverde <fdov88@gmail.com>
* Implement search ordering by allowing sort_by and sort_direction
params to be passed through from the search form/page.
* Change ID of select to 'sort' instead of 'order' for consistency
* Fix styling and data attributes of select options
* Enable front end to pass sort_by and sort_direction params for searches to the back end
* Ensure that only query string params that are supposed to be changed are changed in each function
* Respond to review comments (additional commits to come but these were the quick changes)
* Move options for select into template
* Use addEventListener instead of using onchange in response to review comments
* Add tabs for sorting search results
* Finish implementing tabs for ordering search results
* Remove CSS rule applying to element that no longer exists
* Remove more rules created for an element that has been removed
* Remove more code added for the select dropdown that I've removed
* Remove duplicate jobs banner