Coder Social home page Coder Social logo

Comments (6)

zaptrem avatar zaptrem commented on July 2, 2024

My background color workaround is imperfect because it briefly shows blue before switching to my color. However, it seems that could be solved just removing this setTimeout?

// Allow intercom to complete loading before removing fake widget
() =>
setTimeout(() => {
setState('complete')
onReady()
}, 2000)

Why is there an extra two seconds of wait time when waitForLoad has already waited?

Thanks.

from react-live-chat-loader.

benschwarz avatar benschwarz commented on July 2, 2024

Hey @zaptrem, in the repo README we say:

You can customise the color of the Intercom widget by passing a color prop to the Intercom component.

Have you tried using the color prop? I noticed you've said:

I'd like for either the color prop to also apply to the background

Looking at the implementation, the color property is applied to the background..

Did you want to give that a try and let me know how it goes?

Why is there an extra two seconds of wait time when waitForLoad has already waited?

To be perfectly honest, I don't remember. Casting back to when it was implemented (and reading the code comment), I think it was because waitForLoad fired before all resources were ready, so there was a visual glitch. The 2 second delay was likely a workaround for that.

from react-live-chat-loader.

zaptrem avatar zaptrem commented on July 2, 2024

Looking at the implementation, the color property is applied to the background..

It seems to be applied to the background of the button, not the actual Intercom interface. If I were to remove the two second wait for you what should I test to verify it doesn't break anything?

from react-live-chat-loader.

benschwarz avatar benschwarz commented on July 2, 2024

Ah, I understand. Thanks for the clarification. To set Intercom properties, you should use window.intercomSettings messenger settings. You can find the docs for that here.

On our README.md we say:

User or Company context data can be set using window.intercomSettings. See the official Intercom documentation for more details.

Which is misleading, because messenger settings can be set also. I've updated the README (#135) to reflect that.

from react-live-chat-loader.

zaptrem avatar zaptrem commented on July 2, 2024

Ah, I understand. Thanks for the clarification. To set Intercom properties, you should use window.intercomSettings messenger settings. You can find the docs for that here.

On our README.md we say:

User or Company context data can be set using window.intercomSettings. See the official Intercom documentation for more details.

Which is misleading, because messenger settings can be set also. I've updated the README (#135) to reflect that.

I was able to use that to fix my issue. Thanks!

from react-live-chat-loader.

benschwarz avatar benschwarz commented on July 2, 2024

Great news! Thanks for reporting back @zaptrem

from react-live-chat-loader.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.