Skip to content

[DOC] - Click-to-call widget example missing explicit height #806

@LittorWired

Description

@LittorWired

Describe the requested update
Add to the Click-to-call widget documentation a note that the CSS height property on the C2C parent container must be explicitly set. If not the user would see the C2C button, but after clicking, they will only see a "white screen" as the C2C widget is collapse to 0px.

Reason for the request
This information is not noted or included in the C2C widget example. A customer was confused as to why they could not visualize the widget but could hear it make calls.

Sections to be updated
https://developer.signalwire.com/tools/c2c/#prepare-your-website
https://developer.signalwire.com/tools/c2c/#add-the-c2c-script-to-your-website

Additional context
The following example should work as the parent has an explicit height: 500px:

    <!-- the parent container with the `id=call` and `height: 500px`--> 
    <div id="call" style="height: 500px;">

    </div>

    <!-- C2C embeddable script below--> 
    <script>// Place this script anywhere in the header or body of the HTML document
    (a => {
      var i, s, k, n = "Signalwire C2C API", o = "sw", c = "spawn", x = "Loaded", h = "authenticate", y = a["apiKey"],
     // ...
     // ...
    </script>

It should be noted that the C2C widget currently does not have a min-height or fallback height. However, there is a ticket open to address that issue. I will circle back to update this issue should that min-height be added.

Related Issues or PRs
Issue from Customer: https://github.com/signalwire/cloud-product/issues/17667

min-height default issue https://github.com/signalwire/cloud-product/issues/17696

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions