Skip to content

Conversation

@dugjason
Copy link

Fixes script injection issue.
The script now appends to the <body> element as recommended by Front, and a duplicate appendChild call has been removed.

Refer to Front docs https://help.front.com/en/articles/2049#install_front_chat_on_your_website

…e script now appends to the `<body>` element as recommended by Front, and a duplicate `appendChild` call has been removed.
@changeset-bot
Copy link

changeset-bot bot commented Nov 18, 2025

⚠️ No Changeset found

Latest commit: 1461580

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@pkg-pr-new
Copy link

pkg-pr-new bot commented Nov 18, 2025

Open in StackBlitz

bun add https://pkg.pr.new/GitbookIO/integrations/@gitbook/api@1054

commit: 1461580

@dugjason
Copy link
Author

dugjason commented Nov 18, 2025

👇 Not sure what I can do about that failing Check integrations check (looks like it wants 1Password access?)

@addisonschultz
Copy link
Collaborator

Hi @dugjason

Thanks for investigating this with us! And thanks for starting this PR. I’ve tested this out, but it’s still not working.

After debugging a little more, it looks like it’s coming from the color-scheme set from the actual front widget.

It’s currently injecting normal, which for some reason isn’t respecting the inherited color scheme set on the page.

It looks like updating it to light dark (allowing both color schemes to go through) fixes the problem. Is this something you’d be able to look at with your product team?

CleanShot.2025-11-18.at.18.18.17.mp4

@dugjason
Copy link
Author

Good find - thanks @addisonschultz
I'll share with our design engineers.

That being said - the way the chat widget is currently implemented (loading in the <head> rather than towards the bottom of <body>) can cause various other issues. I would still advise we implement this if we can (unsure what to do about that failing CI check)

@addisonschultz
Copy link
Collaborator

@dugjason yes - thanks again for making this PR to fix the script injection. The 1password check is an ongoing issue we have from external PRs, I’ve verified the changes are valid and it’s good to go since the other checks are passing.

I will leave this PR open for now, in case we have a resolution from the product team soon? If we need to make any additional changes here?

@dugjason
Copy link
Author

Thanks Addison - sounds like a plan. We'll get back to you as we have news

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants