Skip to content

Add readme for adaptive package #880

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

addisonschultz
Copy link
Collaborator

This PR adds a readme to the @gitbook/adaptive helper package.

Copy link

changeset-bot bot commented Jun 23, 2025

⚠️ No Changeset found

Latest commit: c1efdea

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

Copy link

pkg-pr-new bot commented Jun 23, 2025

Open in StackBlitz

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

commit: c1efdea

Copy link
Contributor

@spastorelli spastorelli left a comment

Choose a reason for hiding this comment

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

LGTM on my end. Thanks for doing this 🙏 . Approving to unblock.

Added one comment on changing the intro of the SDK.

@@ -0,0 +1,158 @@
# `@gitbook/adaptive`

GitBook supports integrations with popular feature flag providers like [LaunchDarkly](https://launchdarkly.com) and [Bucket](https://bucket.co), making it easy to personalize your documentation based on active feature flags.
Copy link
Contributor

@spastorelli spastorelli Jun 24, 2025

Choose a reason for hiding this comment

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

I wonder if we should be more general at the start of the readme when describing what the SDK does as it also exposes generic utils like writeGitBookVisitorCookie to allow devs to also write cookies with their own data in case they don't use LD or Bucket. It may also intro additional helpers in the future to be used on the backend side for writing signed cookies (not yet implemented).

Also we should maybe have the first paragraph to introduce adaptive content (maybe link to the docs) and mention that this SDK provide utils to help facilitate passing data to GitBook for adapting their content.

And then add 2 sections:

  • first one that talks specifically about FF helper
  • another one that talks about the generic one writeGitBookVisitorCookie

@taranvohra what do you think?

Make sure you have:

* A GitBook site with adaptive content enabled
* An active project on LaunchDarkly or Bucket
Copy link
Contributor

Choose a reason for hiding this comment

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

I think we should only talk about LD and omit Bucket as we do in the UI:
https://gitbook.slack.com/archives/C08J001JLCD/p1750286067406389

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