-
Notifications
You must be signed in to change notification settings - Fork 228
[NEW] Show/Hide Agent information #279
[NEW] Show/Hide Agent information #279
Conversation
- New API's to minimize/maximize the Widget; - Deal with a new setting to hide Agent information;
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 think we have 2 different features here, and maybe would be better if we splitted into 2 different prs
its better to revert if we had some problem, and helps our release process...
what do you think @tassoevan ?
There is no problem creating two pull request, I'll do it. |
Does this maximize and minimize open and close the widget? Or, just make it full screen width and height? I'm looking for a way to open the live chat programmatically with something like RocketChat.livechat.open(), .close(). |
Yeah, it will do exactly what you're looking for, but I'm moving that implementation to another pull request. |
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 don't like the idea of piercing the showAgentInfo
prop through the components... That's why Context API exists. Also, in some presentational components, just omitting the agent
prop does the trick. What about implement an AgentInformationContext
and wrap the ChatContainer
with the AgentInformationContext.Provider
?
There are other events where we need to deal with the permission, like the |
In addition: What I can do is not send the |
Well, at least we must give a try to the |
@ggazzo, this PR is ready to review/merge, as well as the related PR on the backend side. |
@@ -23,7 +23,7 @@ export const loadConfig = async () => { | |||
|
|||
await store.setState({ | |||
config, | |||
agent, | |||
agent: agent && agent.hiddenInfo ? { hiddenInfo: true } : agent, // TODO: revert it when the API is updated |
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.
Should we keep this TODO?
…into new-setting-show-hide-livechat-agent
This PR adds a new feature into the Livechat Widget:
Related to RocketChat/Rocket.Chat#15216