Skip to content
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

Support Chatwoot Expanded Bubble #124

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

billykwok
Copy link

This PR introduces support for Chatwoot Expanded Bubble.

Standard Bubble

This is what react-live-chat-loader already supports.

Standard Bubble

Expanded Bubble

This is what this PR adds.

Expanded Bubble

The text and the styles of the expanded bubble are applied when the new launcherTitle prop is specified. launcherTitle is the same name used in the official Chatwoot API.

@vercel
Copy link

vercel bot commented Mar 2, 2022

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/calibreapp/react-live-chat-loader/9viwkDhVtiWK5o9gUNiXGg5S6qHW
✅ Preview: https://react-live-chat-loader-git-fork-billykwok-cha-6c7d02-calibreapp.vercel.app

@CLAassistant
Copy link

CLAassistant commented Mar 2, 2022

CLA assistant check
All committers have signed the CLA.

@billykwok billykwok changed the title Support Chatwoot expanded bubble Support Chatwoot Expanded Bubble Mar 2, 2022
@benschwarz
Copy link
Member

@billykwok Thanks for your contribution 🙌

Could you update README to include the new configuration option, possibly link to the official chatwoot config option? (assuming there's a direct link)

@billykwok
Copy link
Author

Thanks for looking at it promptly. Updated.

README.md Outdated Show resolved Hide resolved
@benschwarz
Copy link
Member

@billykwok I added the new configuration option to the Chatwoot demo page, but it looks like when Chatwoot loads the configuration option isn't passed:

Screen.Recording.2022-03-03.at.12.31.06.pm.mov

@billykwok
Copy link
Author

billykwok commented Mar 3, 2022

To enable Expanded Bubble in the real Chatwoot widget, you also need to set the corresponding properties in the window.chatwootSettings object as per Chatwoot documentation.

It will work if you execute the following code in the dev tool console before triggering the replacement of the fake chat bubble.

window.chatwootSettings = { type: 'expanded_bubble', launcherTitle: 'Get help' };

I did not add the code for setting these properties to react-live-chat-loader because doing so would introduce a global side effect into the React component (plus the content of window.chatwootSettings also affects other features apart from Expanded Bubble).

Perhaps I could add an extra remark in README.md to remind library users to set the corresponding properties in the window.chatwootSettings object when using Expanded Bubble.

Alternatively, I can make it such that the Chatwoot component reads the window.chatwootSettings object and apply a different design automatically. But it would unfortunately make the React component depend on some global states.

@benschwarz
Copy link
Member

@billykwok I think a README update would be helpful. If you're able to add that documentation I'd be happy to copy edit and get it merged.

@aaron5670
Copy link

Hi @benschwarz and hi @billykwok what is the status of this MR? I really like to have this feature :)

@benschwarz benschwarz added the help wanted Extra attention is needed label Jul 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Development

Successfully merging this pull request may close these issues.

4 participants