-
-
Notifications
You must be signed in to change notification settings - Fork 2k
[breaking] add embedded option, turned off by default #7969
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
Conversation
Closes #7940 Adds a new option which defaults to false. If true, events related to navigation etc are listened to on the target element rather the html root
🦋 Changeset detectedLatest commit: 9e7c889 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
🎉🥳🎊🍾 |
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.
we need a docs change still for this one
I'm not sure how best to add docs for this beyond https://kit-svelte-e9gz8bfaa-svelte.vercel.app/docs/configuration#embedded? (Though I guess it should probably mention the This is a niche enough thing that it probably doesn't warrant a new section of the docs — I think it's probably enough that people can find it via the config docs, and we can point people to it as and when needs arise. |
I'm in favor of not documenting this further than this note in the configuration docs, especially since the old default behavior was (it would seem) solely for the benefit of the NY Times and I'm sure they have other out-of-band ways of complaining to you. |
Should we investigate which irresponsible individual at the NYT was shipping things to production using a pre-beta application framework? |
Awesome, I just got SvelteKit 1.0.0-next.584 and can confirm #4935 is resolved. By the way, this is for a SvelteKit app related to the recently announced Apple Music Sing feature. |
I came here from the docs, trying to figure out what |
Migration
If you relied on the new behavior introduced in #7766, you can get that back by adding
embedded: true
to yoursvelte.config.js
:export default { kit: { + embedded: true } }
PR description
Closes #7940
Closes #4935
Adds a new option which defaults to false. If true, events related to navigation etc are listened to on the target element rather the html root
Open questionssolved:approach sensible? I figured using theit isdefine
feature for this is the most straightforward and treeshakes nicelyusingoption is the way to godata-sveltekit-root
instead (as discussed in the issue)? Advantage: no config option, more control ("I use popper.js with embedded Kit, and it adds itself to some tag higher than the target). Disadvantage: feels clunky, a little more startup code that might not be as reliable.Please don't delete this checklist! Before submitting the PR, please make sure you do the following:
Tests
pnpm test
and lint the project withpnpm lint
andpnpm check
Changesets
pnpm changeset
and following the prompts. All changesets should bepatch
until SvelteKit 1.0