-
Notifications
You must be signed in to change notification settings - Fork 489
Changes to enable eventing to sidebar component #755
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes to enable eventing to sidebar component #755
Conversation
* adding missing translation + switch * snack will dissapear after 2.5 secs * New translations en.yml (Catalan) * New translations en.yml (Ukrainian) * New translations en.yml (Turkish) * New translations en.yml (Chinese Simplified) * New translations en.yml (Vietnamese) * New translations en.yml (English) * New translations en.yml (Romanian) * New translations en.yml (Greek) * New translations en.yml (Korean) * New translations en.yml (Japanese) * New translations en.yml (Italian) * New translations en.yml (Hungarian) * New translations en.yml (Hebrew) * New translations en.yml (Finnish) * New translations en.yml (German) * New translations en.yml (Norwegian) * New translations en.yml (Danish) * New translations en.yml (Czech) * New translations en.yml (Arabic) * New translations en.yml (Afrikaans) * New translations en.yml (Spanish) * New translations en.yml (French) * New translations en.yml (Dutch) * New translations en.yml (Polish) * New translations en.yml (Swedish) * New translations en.yml (Portuguese) * New translations en.yml (Serbian (Cyrillic)) * New translations en.yml (Russian) * bots translations fix
* rubocoped , rubocop-rails * provisory revert * editor fix, avoid deep nesting of schema controls + task for clean * cy bot tasks fix * adding missing translation + switch * snack will dissapear after 2.5 secs * New translations en.yml (Catalan) * New translations en.yml (Ukrainian) * New translations en.yml (Turkish) * New translations en.yml (Chinese Simplified) * New translations en.yml (Vietnamese) * New translations en.yml (English) * New translations en.yml (Romanian) * New translations en.yml (Greek) * New translations en.yml (Korean) * New translations en.yml (Japanese) * New translations en.yml (Italian) * New translations en.yml (Hungarian) * New translations en.yml (Hebrew) * New translations en.yml (Finnish) * New translations en.yml (German) * New translations en.yml (Norwegian) * New translations en.yml (Danish) * New translations en.yml (Czech) * New translations en.yml (Arabic) * New translations en.yml (Afrikaans) * New translations en.yml (Spanish) * New translations en.yml (French) * New translations en.yml (Dutch) * New translations en.yml (Polish) * New translations en.yml (Swedish) * New translations en.yml (Portuguese) * New translations en.yml (Serbian (Cyrillic)) * New translations en.yml (Russian) * bots translations fix
* New translations en.yml (Catalan) * New translations en.yml (Polish) * New translations en.yml (Portuguese) * New translations en.yml (Russian) * New translations en.yml (Serbian (Cyrillic)) * New translations en.yml (Korean) * New translations en.yml (Dutch) * New translations en.yml (Norwegian) * New translations en.yml (Chinese Simplified) * New translations en.yml (Vietnamese) * New translations en.yml (Swedish) * New translations en.yml (Turkish) * New translations en.yml (Ukrainian) * New translations en.yml (Japanese) * New translations en.yml (Afrikaans) * New translations en.yml (Arabic) * New translations en.yml (Czech) * New translations en.yml (Romanian) * New translations en.yml (French) * New translations en.yml (Spanish) * New translations en.yml (Danish) * New translations en.yml (Hebrew) * New translations en.yml (Hungarian) * New translations en.yml (Italian) * New translations en.yml (German) * New translations en.yml (Greek) * New translations en.yml (Finnish) * New translations en.yml (Spanish)
* New translations en.yml (Catalan) * New translations en.yml (Polish) * New translations en.yml (Portuguese) * New translations en.yml (Russian) * New translations en.yml (Serbian (Cyrillic)) * New translations en.yml (Korean) * New translations en.yml (Dutch) * New translations en.yml (Norwegian) * New translations en.yml (Chinese Simplified) * New translations en.yml (Vietnamese) * New translations en.yml (Swedish) * New translations en.yml (Turkish) * New translations en.yml (Ukrainian) * New translations en.yml (Japanese) * New translations en.yml (Afrikaans) * New translations en.yml (Arabic) * New translations en.yml (Czech) * New translations en.yml (Romanian) * New translations en.yml (French) * New translations en.yml (Spanish) * New translations en.yml (Danish) * New translations en.yml (Hebrew) * New translations en.yml (Hungarian) * New translations en.yml (Italian) * New translations en.yml (German) * New translations en.yml (Greek) * New translations en.yml (Finnish)
* dark mode ready * cy specs fix, use data-cy * format * conversation buttons
* New translations en.yml (Catalan) * New translations en.yml (Polish) * New translations en.yml (Portuguese) * New translations en.yml (Russian) * New translations en.yml (Serbian (Cyrillic)) * New translations en.yml (Korean) * New translations en.yml (Dutch) * New translations en.yml (Norwegian) * New translations en.yml (Chinese Simplified) * New translations en.yml (Vietnamese) * New translations en.yml (Swedish) * New translations en.yml (Turkish) * New translations en.yml (Ukrainian) * New translations en.yml (Japanese) * New translations en.yml (Afrikaans) * New translations en.yml (Arabic) * New translations en.yml (Czech) * New translations en.yml (Romanian) * New translations en.yml (French) * New translations en.yml (Spanish) * New translations en.yml (Danish) * New translations en.yml (Hebrew) * New translations en.yml (Hungarian) * New translations en.yml (Italian) * New translations en.yml (German) * New translations en.yml (Greek) * New translations en.yml (Finnish)
* monorepo, components / docs / messenger * packages set * hints + prettier * shared components into component * shared code * store + conversation port * components reference single file * store decoupled * editor decouple * update dante
* sliping away, fixes chaskiq#415 * change campaign name , tackles chaskiq#416 * field renderer fix
* campaign inbound email, disable reply from * quick replies fixes
* editor video less on mailing + phone attribute missing
* package validation phase * article update mutation permit null content * dialogflow integration event * peer deps on packages * issue template
* remove jsrassign * Remove hard coded email address * dialogflow query-params * days_ago translations * user state Co-authored-by: Kips <patrickjdavenport@gmail.com>
* New translations en.yml (Romanian) * New translations en.yml (Polish) * New translations en.yml (Portuguese) * New translations en.yml (Russian) * New translations en.yml (Serbian (Cyrillic)) * New translations en.yml (Korean) * New translations en.yml (Dutch) * New translations en.yml (Norwegian) * New translations en.yml (Chinese Simplified) * New translations en.yml (Vietnamese) * New translations en.yml (Swedish) * New translations en.yml (Turkish) * New translations en.yml (Ukrainian) * New translations en.yml (Japanese) * New translations en.yml (Arabic) * New translations en.yml (Catalan) * New translations en.yml (Czech) * New translations en.yml (Afrikaans) * New translations en.yml (Danish) * New translations en.yml (Hebrew) * New translations en.yml (Hungarian) * New translations en.yml (Italian) * New translations en.yml (Greek) * New translations en.yml (Finnish)
* New translations en.yml (Chinese Simplified) * New translations en.yml (Chinese Simplified) * New translations en.yml (Chinese Simplified) * New translations definitions.en.yml (Chinese Simplified) * New translations doorkeeper.en.yml (Chinese Simplified) * New translations hints.en.yml (Chinese Simplified) * New translations subscriptions.en.yml (Chinese Simplified) * New translations en.yml (Chinese Simplified) * New translations definitions.en.yml (Chinese Simplified) * New translations doorkeeper.en.yml (Chinese Simplified) * New translations definitions.en.yml (Chinese Simplified) * New translations doorkeeper.en.yml (Chinese Simplified) * New translations devise_invitable.en.yml (Chinese Simplified) * New translations hints.en.yml (Chinese Simplified)
* New translations devise.en.yml (Chinese Simplified) * New translations doorkeeper.en.yml (Chinese Simplified) * New translations devise_invitable.en.yml (Chinese Simplified) * New translations subscriptions.en.yml (Chinese Simplified) * postcss 8, tailwind 2.1 * modal translations * New translations en.yml (Italian) * New translations en.yml (Italian) * New translations en.yml (Italian) * New translations en.yml (Italian) * New translations en.yml (Italian) * complete missing translations * more on translations * more missing translations * google fonts support on banners * chinesse two letters change * closed at and allow replies on closed conversation settings * specs on inbound * inbound settings refactor, other tweaks * update gemfile * contact manager cc issue fix * button tab switch refactor * esm remove package * handle state change on conversation * conversation part delegate broadcast key
* New translations devise.en.yml (Chinese Simplified) * New translations doorkeeper.en.yml (Chinese Simplified) * New translations devise_invitable.en.yml (Chinese Simplified) * New translations subscriptions.en.yml (Chinese Simplified) * New translations en.yml (Italian) * New translations en.yml (Italian) * New translations en.yml (Italian) * New translations en.yml (Italian) * New translations en.yml (Italian) * New translations en.yml (Romanian) * New translations definitions.en.yml (Finnish) * New translations definitions.en.yml (Hebrew) * New translations en.yml (Hebrew) * New translations en.yml (Finnish) * New translations en.yml (Hungarian) * New translations definitions.en.yml (Greek) * New translations en.yml (Greek) * New translations definitions.en.yml (Hungarian) * New translations definitions.en.yml (German) * New translations definitions.en.yml (Japanese) * New translations definitions.en.yml (Korean) * New translations en.yml (Korean) * New translations definitions.en.yml (Romanian) * New translations definitions.en.yml (Italian) * New translations en.yml (Italian) * New translations en.yml (Japanese) * New translations en.yml (German) * New translations en.yml (Spanish) * New translations definitions.en.yml (Afrikaans) * New translations en.yml (Afrikaans) * New translations definitions.en.yml (Spanish) * New translations en.yml (French) * New translations definitions.en.yml (French) * New translations en.yml (Arabic) * New translations definitions.en.yml (Czech) * New translations definitions.en.yml (Arabic) * New translations en.yml (Danish) * New translations definitions.en.yml (Danish) * New translations en.yml (Czech) * New translations en.yml (Catalan) * New translations definitions.en.yml (Catalan) * New translations definitions.en.yml (Ukrainian) * New translations en.yml (Ukrainian) * New translations definitions.en.yml (Turkish) * New translations en.yml (Turkish) * New translations en.yml (Chinese Simplified) * New translations en.yml (Swedish) * New translations definitions.en.yml (Vietnamese) * New translations en.yml (Vietnamese) * New translations definitions.en.yml (Chinese Simplified) * New translations definitions.en.yml (English) * New translations en.yml (English) * New translations definitions.en.yml (Swedish) * New translations en.yml (Polish) * New translations definitions.en.yml (Norwegian) * New translations definitions.en.yml (Polish) * New translations en.yml (Norwegian) * New translations definitions.en.yml (Dutch) * New translations en.yml (Dutch) * New translations definitions.en.yml (Serbian (Cyrillic)) * New translations en.yml (Serbian (Cyrillic)) * New translations en.yml (Portuguese) * New translations definitions.en.yml (Russian) * New translations en.yml (Russian) * New translations definitions.en.yml (Portuguese) * fix translations
* playground components * reports sections + new dashboard view * adjust dark colors * disable renderer app package on agent conversation (chat) * new switch control on sidebar / sidebar toggle children * csat package + reports * fix specs + rubocop
Bumps [addressable](https://github.com/sporkmonger/addressable) from 2.7.0 to 2.8.0. - [Release notes](https://github.com/sporkmonger/addressable/releases) - [Changelog](https://github.com/sporkmonger/addressable/blob/main/CHANGELOG.md) - [Commits](sporkmonger/addressable@addressable-2.7.0...addressable-2.8.0) --- updated-dependencies: - dependency-name: addressable dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* put some packages on dev * updated yarn deps * internal package socket * put on hold event, kredis access simplification * handlers api, on hold behavior * Update app/services/message_apis/twilio_phone/api.rb
…e), name and email. (chaskiq#744)
* Twilio thread slicing * start conversation from the inbox * initiator channel on start conversation, handle fail on Graphql client, * clean editor EEDropdown * handle errors on email hook and action trigger * new conversation state refactor
* use ruby 2.7.5 * revert hash syntax on cop * remove borales yarn * bundler version and uri fix
Co-authored-by: Johnny Hsiao <johnny.hsiao@thinkresearch.com>
|
@@ -12,6 +12,7 @@ import I18n from '../../shared/FakeI18n'; | |||
import RestrictedArea, { | |||
allowedAccessTo, | |||
} from '@chaskiq/components/src/components/AccessDenied'; | |||
import { useEventBroker } from '../../shared/EventBroker'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why not use the messages from cableApp in Appcontainer.tsx?
| 'PresenceChannel' | ||
| 'AgentChannel'; | ||
|
||
export function useEventBroker( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Function useEventBroker
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
07c132b
to
b8ee42f
Compare
@@ -19,14 +19,43 @@ function localeDate(date) { | |||
return new Date(date).toLocaleString(); | |||
} | |||
|
|||
export const eventsSubscriber = (appId, cableApp, callback) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @johnny-hsiao I still not sure why is there is a new subscription to cable instead of leveraging the events provided on AppContainer.tsx.
b261976
to
e844eb0
Compare
e844eb0
to
428b61c
Compare
@@ -83,6 +84,7 @@ export const eventsSubscriber = (appId, cableApp, dispatch, fetchApp) => { | |||
?.contentWindow; | |||
popup && popup.postMessage(data, '*'); | |||
default: | |||
dispatch(appEventReceived(data)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would prefer to add a specific type of handling for this, appEvent is too general, if this event is intended for AppPackages let's name this AppPackage event, and handle this with app_package on the data.type
6512dcb
to
c599188
Compare
…n package definitions to have events added
Code Climate has analyzed commit 7652ed4 and detected 0 issues on this pull request. View more on Code Climate. |
We have plugins in the sidebar that needs to receive events from the backend to refresh on changes made.
To verify this change, you can make these changes:
app/models/conversation.rb
include Syncable
app/services/message_apis/inbox_sections/presenter.rb
in rails console:
Conversation.last.notify_events_subscribers(, 'new_item_received',
{ conversation_key: })