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

Hubspot #281

Merged
merged 11 commits into from Jan 9, 2024
Merged

Hubspot #281

merged 11 commits into from Jan 9, 2024

Conversation

jucallej
Copy link
Contributor

This is using the work of @drwlrsn #130 but I moved it into my own fork, as I didn't have permissions to push to your repo @drwlrsn hope that's ok. Thanks for the work 🙏

What does this PR introduce?

In a few bullet points, please describe the changes this Pull Request makes. e.g.:

  • Adds hubspot support

Related issues

Are there any related issues or feature requests this work will resolve? Please mention them here. e.g.:

Screenshots

167025070-2d1eb53b-863e-4d04-90e3-3f7d3e9341f2

@vercel
Copy link

vercel bot commented Jun 14, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
react-live-chat-loader ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 30, 2023 8:18am

@CLAassistant
Copy link

CLAassistant commented Jun 14, 2023

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
1 out of 2 committers have signed the CLA.

✅ jucallej
❌ drwlrsn
You have signed the CLA already but the status is still pending? Let us recheck it.

@jucallej
Copy link
Contributor Author

CLA assistant check Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.1 out of 2 committers have signed the CLA.✅ jucallej❌ drwlrsnYou have signed the CLA already but the status is still pending? Let us recheck it.

@drwlrsn when you have some time, would you ming signing that CLA (it just asks clicking a checkbox) to be able to merge this? Thank you 🙏

@jucallej jucallej mentioned this pull request Jun 14, 2023
1 task
@jucallej
Copy link
Contributor Author

Having a look now to update this with an example and updating the readme as per the lastest changes on the repo

@jucallej
Copy link
Contributor Author

Having a look now to update this with an example and updating the readme as per the lastest changes on the repo

Just added the example and the readme instructions. This is how it looks locally:
Screenshot 2023-06-14 at 11 57 49
Screenshot 2023-06-14 at 11 57 59

const Page: NextPage = () => (
<LiveChatLoaderProvider
provider="hubSpot"
providerKey=""
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will need a correct value to work, but I haven't found a public one that I could share

@jucallej
Copy link
Contributor Author

Hey @drwlrsn 👋, when you have some time (if at all possible), would you be ok to sign https://github.com/calibreapp/react-live-chat-loader/pull/281#issuecomment-1590928909🙏

@benschwarz and @thefoxis when you have some time, do you have any feedback for this PR? 😀

@benschwarz
Copy link
Member

@jucallej Thank you for this work 🙌

@robmorieson will complete a code review.

We'll have to figure something out for the Hubspot demo key, at the moment I'm not sure how to handle that!

@benschwarz benschwarz requested review from robmorieson and removed request for thefoxis June 20, 2023 05:28
Copy link
Member

@thefoxis thefoxis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it’s a 👍🏻 from me on copy updates 🎉

@benschwarz
Copy link
Member

@drwlrsn Hello! @jucallej completed work on the react-live-chat-loader Hubspot branch that you commenced a while back. Could you sign the CLA so we can merge the completed work? Thank you 🤗

Copy link
Contributor

@robmorieson robmorieson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jucallej Thanks for submitting this PR 🙌 The code itself looks solid, I've just left a few review comments/suggestions.

In regards to the implementation itself, I did run into some runtime errors while testing on mobile (iOS 16.4 simulator) so that might require some investigating:

Simulator Screenshot - iPhone 14 Pro Max - 2023-06-27 at 11 12 53

</g>
</g>
</g>
</svg>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like this svg might benefit from being run through SVGO for optimisation. There's also a handy online tool for this: https://jakearchibald.github.io/svgomg/

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great catch! I've just updated it in the last commit 😀

backgroundColor?: string
loader?: ReactElement
}): JSX.Element | null => {
const [state, loadChat] = useChat({ loadWhenIdle: false })
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Generally we would want loadWhenIdle to be true, unless there is a specific reason HubSpot needs this set to false?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds good! I've just changed that in the last commit 😀

window.HubSpotConversations.widget.status().loaded
)
},
// Allow intercom to complete loading before removing fake widget
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a minor typo in the comment here ✍️

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great catch! I've just updated it in the last commit 😀

},
// Allow intercom to complete loading before removing fake widget
() => {
console.debug({
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can probably strip out the console.debug instances prior to merge

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great catch! I've just updated it in the last commit 😀

@jucallej
Copy link
Contributor Author

@jucallej Thanks for submitting this PR 🙌 The code itself looks solid, I've just left a few review comments/suggestions.

In regards to the implementation itself, I did run into some runtime errors while testing on mobile (iOS 16.4 simulator) so that might require some investigating:

Simulator Screenshot - iPhone 14 Pro Max - 2023-06-27 at 11 12 53

Thanks for the review 🙌! I've refactored it to use a method called isHubspotWidgetDefined and use it throughout, and seems to work at least on safari on mac. Is it still failing with the latest changes? What emulator are you using to test? 😀

src/providers/index.ts Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
Co-authored-by: Christopher Van <203725+cvan@users.noreply.github.com>
@robmorieson
Copy link
Contributor

@jucallej finally got around to testing (apologies for the very long wait!) — all looks good - thanks! However, unfortunately it appears we're still waiting for to @drwlrsn sign the CLA before we can merge this one...

@robmorieson
Copy link
Contributor

Merging this one as it's been several months since the callouts for CLA approval.

@drwlrsn — if any objections, please let us know.

Otherwise, thank you @drwlrsn and @jucallej for your contribution here! 🙌

@robmorieson robmorieson merged commit e9c9537 into calibreapp:main Jan 9, 2024
2 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants