-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Show cookie toggle for embedded landing pages #7358
Show cookie toggle for embedded landing pages #7358
Conversation
✅ Deploy Preview for apollo-server-docs ready!Built without sensitive environment variables
To edit notification comments on pull requests, go to your Netlify site settings. |
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit 794215b:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes lgtm! I was able to test this using the codesandbox link on this PR. I see the include cookies toggle and can configure the default setting to true if I provide a configured version of the plugin myself.
Can you add a minor changeset please?
This PR was opened by the [Changesets release](https://github.com/changesets/action) GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated. # Releases ## @apollo/server@4.4.0 ### Minor Changes - [#7358](#7358) [`f2d433b4f`](f2d433b) Thanks [@esilverm](https://github.com/esilverm)! - Show "Include Cookies" toggle in Embedded Sandbox landing page. ## @apollo/server-integration-testsuite@4.4.0 ### Patch Changes - Updated dependencies \[[`f2d433b4f`](f2d433b)]: - @apollo/server@4.4.0 Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
|
||
includeCookies?: boolean; // defaults to 'false' | ||
hideCookieToggle?: boolean; // defaults to 'true' | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@esilverm @trevor-scheer we don't support hideCookieToggle
for the embedded Explorer, only Sandbox.
This section of code should be reverted iiuc. I am adding it to this PR #7431
JIRA
Related embed PR
This code relies on several other PRs to be approved/merged, so I will keep it as a draft until it is ready.
Context
Users are getting confused because the embedded sandbox doesn't show the
includeCookies
toggle. This toggle should be visible for AS4 users when they are in embedded sandbox.What Changed
This adjusts the way the getEmbeddedHTML helpers use the landing page config options. These options should stay the same and the user shouldn't experience any changes to how they need to configure their Apollo Server configuration.
Instead, we use the
includeCookies
value as an initial value for the cookie toggle in explorer, pass it toinitialState
, and turn off ahideCookieToggle
flag to expose this value to users in explorer.How to test
Use codesandbox link below