Commit graph

229 commits

Author SHA1 Message Date
Michael Kohl
7c7a8dcd45
Remove experimental /call functionality from Connect ✂️✂️✂️ (#12979)
* Remove Twilio gem

* remove VideoChatsController + views and specs

* Remove /call related code

* Update spec

* More JS cleanup

* Restore wrongly deleted files

* Remove obsolete files

* More cleanup
2021-03-17 17:06:15 +01:00
Suraj Vishwakarma
3417dd5447
Fix : background box of the button on profile via chat section issue 2nd PR: #12879 (#12920)
* chat-profile

* updated-chat-profile
2021-03-12 13:32:13 +01:00
ludwiczakpawel
74894fd90e
bugfix (#12703) 2021-02-16 15:50:37 +01:00
Jacob Herrington
aae592f86c
Add JSDoc comments to Chat components (#12647)
* Add JSDoc comments to Chat components

* Expand documentation comment on ChannelImage

* Update app/javascript/chat/components/ChannelImage.jsx

Co-authored-by: Suzanne Aitchison <suzanne@forem.com>

Co-authored-by: Suzanne Aitchison <suzanne@forem.com>
2021-02-12 17:21:13 -06:00
Jacob Herrington
4b9c62e585
Extract ChannelFilterButton from Chat.jsx (#12630)
* Extract ChannelFilterButton from Chat class
2021-02-10 11:23:49 -06:00
Jacob Herrington
ae4ca6d94b
Enable eslint in chat.jsx (#12617) 2021-02-09 08:19:05 -06:00
Jacob Herrington
2c0bbe317b
Convert Connect settings menu div to nav (#12578)
* Fix typo in alt text

* Convert unsemantic div into nav

* Remove commented CSS

* Refactor connect config menu to be more usable

* Remove unused prop

* Return focus to button when config menu collapses

* Fix aria-label

* Add aria-expanded and fix aria-label text

Co-authored-by: Suzanne Aitchison <suzanne@forem.com>

* Add transparent background-color to config menu button

Co-authored-by: Suzanne Aitchison <suzanne@forem.com>
2021-02-08 14:56:35 -06:00
Jacob Herrington
e921952414
Fix a false positive test (#12561) 2021-02-08 11:41:12 -06:00
Jacob Herrington
a1799dee01
Update verbiage around connect invitations (#12558)
The phrasing of this may reflect the code, but is a little confusing. A
user might not understand what a "joining request" is, so we should
probably just keep things simple for the time being.
2021-02-03 18:15:43 -06:00
Katie Davis
76453b41fb
Updates ESLint rules to error on default imports (#12512)
* add rule

* add named imports

* more missed files

* so many files
2021-02-02 10:24:03 -05:00
Nick Taylor
86eb75cee7
Report a Message in Connect (#12229)
* Frontend Ready for Connect Report Abuse

* add feedback api

* js defination fix

* Added Hooks to the Component

* add json response in feedback

* Block popup added

* fix render issue

* Made changes in internal view

* change error message

* Added few design changes =

* add test cases

* Update app/javascript/chat/actions/requestActions.js

Co-authored-by: Nick Taylor <nick@iamdeveloper.com>

* add PR suggestions

* add backend test cases

* report abuse form close

* Update app/javascript/chat/actions/requestActions.js

Co-authored-by: Nick Taylor <nick@iamdeveloper.com>

* Update app/javascript/chat/ReportAbuse/index.jsx

Co-authored-by: Nick Taylor <nick@iamdeveloper.com>

* add test cases

* Update app/javascript/chat/ReportAbuse/index.jsx

Co-authored-by: Nick Taylor <nick@iamdeveloper.com>

* Update app/javascript/chat/ReportAbuse/index.jsx

Co-authored-by: Marcy Sutton <holla@marcysutton.com>

* Update app/javascript/chat/ReportAbuse/index.jsx

Co-authored-by: Marcy Sutton <holla@marcysutton.com>

* group the fieldset

* fix report abuse api

* fix test case

* fix request test case

* fix typo

* cleaned up markup in report abuse component.

* Fixed spacing between abuse options.

* Fixed wording in report abuse confirmation.

* Removed unnecessary data-testid and aria-label attributes.

* Added some top margin to the report abuse form.

* Update app/javascript/chat/message.jsx

Co-authored-by: Suzanne Aitchison <suzanne@forem.com>

* Added a legend to the the fieldset.

* Update app/javascript/chat/actions/requestActions.js

Co-authored-by: Michael Kohl <citizen428@dev.to>

Co-authored-by: Sarthak <7lovesharma7@gmail.com>
Co-authored-by: Narender Singh <narender2031@gmail.com>
Co-authored-by: Marcy Sutton <holla@marcysutton.com>
Co-authored-by: Suzanne Aitchison <suzanne@forem.com>
Co-authored-by: Michael Kohl <citizen428@dev.to>
2021-01-19 12:07:47 -05:00
Jacob Herrington
db335ff84b
Display message from the back end when leaving a channel (#11711)
* Display message from the back end when leaving a channel

Co-authored-by: jacobherrington <jacobherringtondeveloper@gmail.com>
Co-authored-by: Alberto Pérez de Rada Fiol <apdrf.94@gmail.com>
Co-authored-by: Michael Kohl <citizen428@dev.to>
2021-01-19 09:06:47 -06:00
narender2031
01f7dbd24f
fix mention in chat (#10493)
* fix mention in chat

* fix mention bug

* fix conflict issue

* fix load channel issue initally render

* add test case

* remove comments and add nitpick
2020-12-23 06:21:28 -05:00
Sarthak Sharma
bb532d39b3
Canvas in draw in now responsie 🚀 (#11876) 2020-12-15 13:08:09 -05:00
rhymes
174950a827
Remove duplicate test file (#11883)
* Remove duplicate membership test

* Restore single Membership.test.jsx
2020-12-14 14:59:26 +01:00
Sarthak Sharma
6dee5edd0e
🚀 Ability to allow tag moderators to create chat channels (#9741)
* 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

* UI completed for Create Channel

* API for create channel & invitations

* 🚀 Combining Backend and Frontend

* Test cases added

* UI completed for Create Channel

* API for create channel & invitations

* 🚀 Combining Backend and Frontend

* Test cases added

* fix suggestions

* add test cases

* replace mod_relations_admin to tag_moderator

* fix test cases

* refactor and fix code climate issues

* Update app/controllers/chat_channel_memberships_controller.rb

Co-authored-by: Michael Kohl <me@citizen428.net>

* fix suggestions

* renaming the methods

* Update app/javascript/chat/chat.jsx

Co-authored-by: Nick Taylor <nick@iamdeveloper.com>

* Update app/javascript/chat/components/createChatModal.jsx

Co-authored-by: Nick Taylor <nick@iamdeveloper.com>

* add jsDoc and add validation

* add PR suggestions

* renmae the file name to  PascalCase

* add styled component

* refactor channel button component

* fix specs

* fix code smell issues

* fix file name issue

* handle error message

* add jsDoc

* Update app/controllers/chat_channels_controller.rb

Co-authored-by: Michael Kohl <me@citizen428.net>

* refactor chat_channel_helpers

* update old hash to new hash

* Update app/javascript/chat/components/ChannelButton.jsx

Co-authored-by: Nick Taylor <nick@iamdeveloper.com>

* Update app/views/chat_channels/index.html.erb

Co-authored-by: Michael Kohl <me@citizen428.net>

* fix syntax error

* Update app/views/chat_channels/index.html.erb

Co-authored-by: Nick Taylor <nick@iamdeveloper.com>

* Policies changed

* The Disable Button issue 🐞

* Fixing Disabled button Issue 🐞

* New group doesn't show up 🐞

Co-authored-by: Narender Singh <narender2031@gmail.com>
Co-authored-by: Michael Kohl <me@citizen428.net>
Co-authored-by: Nick Taylor <nick@iamdeveloper.com>
2020-12-08 13:10:36 +07:00
Nick Taylor
d623157eee
Fixed some frontend tests causing unhandled rejection errors (#11627)
* 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.
2020-11-26 06:11:25 -05:00
Mac Siri
5ef6106045
Update JS dependencies with yarn upgrade (#11589) 2020-11-24 11:17:25 -05:00
Nick Taylor
bf7780cd2c
Ran prettier on *.js, *.jsx and *.md files. (#11586) 2020-11-23 20:45:50 -05:00
rhymes
f9506affb5
Use faster JS selection methods (#11409)
* Add JS tips section to frontend documentation

* Replace document.getElementsByTagName('body') with document.body

* Replace querySelectorAll with faster selecting methods where appropriate

* Replace querySelector with faster selecting methods where appropriate

* Fix typo

* Fix forEach and getElementsByClassName

* Change querySelector* to faster methods in erb files

* Change querySelector* to faster methods in ruby files

* Fix runkit tag

* Various fixes

* Update app/assets/javascripts/initializers/initializeEllipsisMenu.js

Co-authored-by: Ridhwana <Ridhwana.Khan16@gmail.com>

* Update app/assets/javascripts/utilities/slideSidebar.js

Co-authored-by: Ridhwana <Ridhwana.Khan16@gmail.com>

* Commenting out flaky spec

Co-authored-by: Ridhwana <Ridhwana.Khan16@gmail.com>
2020-11-16 17:35:50 +01:00
Sarthak Sharma
708791f986
🚀 Feature: Give Tab Notification on New Message (#9847)
Co-authored-by: Narender Singh <narender2031@gmail.com>
2020-11-04 16:34:01 -05:00
Mac Siri
8ba2c03360
[deploy] Encode domain name in pusher channels (#11136)
Co-authored-by: Nick Taylor <nick@iamdeveloper.com>
2020-10-28 14:52:38 -04:00
Rafi
c9014a7835
Removing email prop and fixing test (#11108) 2020-10-27 15:38:31 -04:00
Sarthak Sharma
e36690cdba
Making Compose's Placeholder Dynamic (#11016) 2020-10-22 12:01:40 -04:00
Ben Halpern
f428aa85fc
[deploy] Remove unnecessary email call-to-action (#10972) 2020-10-20 19:19:50 -04:00
Rafi
e3076a0852
[deploy] Removing hard-coded email (#10125)
* Removing hardcoded email

* Passing email address from siteConfig to react

* Passing modFaqEmail props in tests

* Changing webpacker compiler order
2020-10-20 18:59:51 +02:00
Nick Taylor
57f3863d09
Added the <ConnectStateProvider /> (#9799)
* Added the <ConnectStateProvider />

* Moved <ConnectStateProvider /> to chat/components.
2020-10-19 05:18:04 -04:00
narender2031
72c7aedd1f
fix bug on chat input (#10755) 2020-10-18 21:57:59 -04:00
narender2031
2461069254
fix request center UI (#10824)
* fix request center UI

* remove not require css

* removed not used classes
2020-10-15 10:46:26 -04:00
Lisa Sy
36e271e1cb
Deprecate old button stylings with Crayons buttons (#10694) [deploy]
* Deprecate old buttons.scss file

* Replace outdated button styles with Crayons button styling

* Update additional views after removing old button styling

* Update tests

* Update test

* Update test

* Fix button placements
2020-10-14 07:28:41 -07:00
Robin Gagnon
2c10fb0417
[deploy] fix: Clear chat input after Enter key submit (#10487)
* fix: Clear chat input after Enter key submit

* fix: Rename Composer component

* test: Add integration tests for input value

* After pressing Enter
* After clicking Send
* After clicking Save edit
* After clicking Close edit
2020-10-08 14:51:36 -04:00
Julianna Tetreault
d21a769bd1
Generalizes Connect welcome message and settings nav tab and refactors tests (#10741) [deploy] 2020-10-08 12:41:30 -06:00
Timothy Ng
a943f045c5
Connect: Highlight @ mentions to logged in user (#10216)
* Wrap with <mark> tags if mentioning current user

* Add test for @mention highlight

* Match @{username} mention

* Remove default param
2020-10-07 23:23:58 -04:00
Sarthak Sharma
83b3baeac3
[deploy] 🚀 Feature: Draw Command for connect with image annotations (#10136)
* 🚀 Draw Command ready for connect [Rebase]

* revert schema changes

* fix & replace Button with theme button

* fix UI

* add test cases

* fix travis issue

* on image upload enable send button

* revert schema.db changes

* revert UI changes

* fix suggestions

* Update app/javascript/chat/draw/index.jsx

Co-authored-by: Nick Taylor <nick@iamdeveloper.com>

* update test cases

* remove commented code

* Trigger Travis CI

Co-authored-by: Narender Singh <narender2031@gmail.com>
Co-authored-by: Nick Taylor <nick@iamdeveloper.com>
2020-10-07 16:06:22 +02:00
Sarthak Sharma
a282994e24
Clipboard Text Paste Issue Fixed (#10630) 2020-10-06 11:08:25 -04:00
Sarthak Sharma
8c19d5d407
Copy Paste Images in connect (#10484) 2020-10-02 15:50:32 -04:00
narender2031
f149a8fcba
auto resize on type message connect (#10378) 2020-09-22 11:37:12 +02:00
Fernando Valverde
1aa8233d9e
Adds runtime copy to clipboard (#10323) 2020-09-14 14:45:54 -04:00
Nick Taylor
f0963c1bfa
Drag and drop an image in the editor (#10145)
* 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.
2020-09-04 14:12:59 -04:00
Sarthak Sharma
b26b031616
🚀 Feature: Ability to upload images to connect by drag and drop (#9992) 2020-08-31 14:14:32 -04:00
Ben Halpern
e41a4f8968
[deploy] Include APP_NAME in Pusher channels (#10001)
* Backgend adjustments

* Fix keys

* Fix key

* Adjust style

* Fix typos

* Fix typo

* Refactor

* Fix syntax error
2020-08-31 08:28:46 -04:00
Fernando Valverde
9da71a47c7
[deploy] Introduces Runtime class for standardized & other native cleanup + replace podcast GA with ahoy (#10026) 2020-08-28 05:52:04 -06:00
Sarthak Sharma
3649c70872
[deploy] 🐞Bug Fix: Chat doesn't extend to its frame on Firefox iOS [ Fixes #4024 ] (#9801)
* 🐞Bug Fix: Bug_chat_height_issues_in_IOS

* Removing extra margin in sidecar

* 🐞 Fixing the viewport issue

* 🚀 fixing the parent box size problem
2020-08-19 08:15:15 -04:00
Sarthak Sharma
048cf874f5
[deploy] 🐞Bug Fix: Room that has been left still shows up in URL [Fixes: #9501] (#9804)
* 🐞Bug Fix: Channel_leave_and_join_redirection

* Update chat.jsx
2020-08-18 09:29:40 -04:00
Sarthak Sharma
11820aa29b
[deploy] 🐞Fixes #9503 When joining a new room, user is not taken to the new room (#9564)
* 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

* 🐞 Fixes bug #9503 When joining a new room, user is not taken to the new room

Co-authored-by: Narender Singh <narender2031@gmail.com>
2020-07-30 16:21:55 -04:00
Andy Zhao
9bdef4d4ae
[deploy] Update /ban for Connect (#9459)
* Rough MVP of /ban v2

* Make snackbar dismissable

* Make unban work

* Clean up response for happy and sad paths

* Fix tests

* Fix policy spec
2020-07-23 09:49:54 -04:00
narender2031
a0592ecfa1
[deploy] Fix bug remove searched membership (#9426)
* 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 remove membership when search

Co-authored-by: Sarthak Sharma <7lovesharma7@gmail.com>
2020-07-23 08:09:44 -04:00
Sarthak Sharma
44b8d0894d
[deploy] 🐞Hotfix: Search toggle breaks in some cases (#9454)
* 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

* Fixing the serch toggle issue

Co-authored-by: Narender Singh <narender2031@gmail.com>
2020-07-22 16:27:35 -04:00
Sarthak Sharma
89c15fd9d7
[deploy] 🐞Bugfix: Redundant messages issue in connect (#9432)
* 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

* 🐞Bugfix: Redundant messages on connect channel.

* Changes requested

Co-authored-by: Narender Singh <narender2031@gmail.com>
2020-07-22 12:23:18 -04:00
narender2031
0cfc593150
[deploy] 🚀 Feature: Chat channel request manager (#9305)
* 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

* request manager info API

* 👨🏼‍🎨 Design added for requestCenter

* integrate request manager with API

* remove unused argument

* fix request manager card UI

* fix request card UI

* add request manager button

* handle no invitaion UI

* fix badge UI

* add request specs

* add jest specs

* remove the presenter

* fix code climate issues

* fix queries

* fix runbocop issues

* fix PR suggestions

* remove empty lines

Co-authored-by: Sarthak Sharma <7lovesharma7@gmail.com>
2020-07-22 09:12:09 -04:00