feat: add deskcrew module - #1556
Conversation
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughAdds a Estimated code review effort: 1 (Trivial) | ~2 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
looking at this, I think it should probably use https://scripts.nuxt.com - and/or maybe this could just be replaced by adding deskcrew to the nuxt/scripts registry? wdyt @harlan-zw? |
|
@danielroe agreed, this is a better fit than a standalone module. DeskCrew is one third-party script tag, and everything a module adds on top (deferred loading past hydration, a typed API, dev-time validation) is what a registry entry already gives you. I've gone through how an entry is actually built: the @harlan-zw two things before I write any of it. First, config shape. DeskCrew takes its config from data attributes rather than a JS init call: <script src="https://deskcrew.io/desk.js" data-key="pub_xxx" data-board="tenant-slug"></script>Crisp and Intercom both configure through pre-load globals in Related, and worth flagging rather than you finding it: Second, bundling. Our script derives its API origin from its own I saw nuxt/scripts#177 is the route for new registry scripts, and that the bar is deliberately high. Would you like a request posted there first, or is it fine to open the PR off the back of this thread? Either way I'm happy to do the work: entry, docs page, playground page and a public test id for |
|
Please open a PR if you'd like :) |
Adds
@deskcrew/nuxt, a module that puts a support widget (live chat, answers drawn from the site's own help articles, and a help center) on every page of a Nuxt app.The module appends one script tag to
app.head.script. The widget renders in a Shadow DOM, so it cannot inherit or leak app CSS. Works with Nuxt 3 in both SSR and static (nuxi generate) modes. A missing or malformed key produces a build-time warning and adds nothing, so the app still builds.Filed under
AIsince the widget's answers are generated from the site's own knowledge base.