Skip to content

fix: improve demo experience - #1203

Open
sacrosanctic wants to merge 18 commits into
sveltejs:mainfrom
sacrosanctic:unpleasant-orca
Open

fix: improve demo experience#1203
sacrosanctic wants to merge 18 commits into
sveltejs:mainfrom
sacrosanctic:unpleasant-orca

Conversation

@sacrosanctic

@sacrosanctic sacrosanctic commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Closes #1169

Description

Reopened from #1188 due to a glitch.

Checklist

  • Update snapshots (if applicable)
  • Add a changeset (if applicable)
  • Allow maintainers to edit this PR
  • I care about what I'm doing, no matter the tool I use (Notepad, Sublime, VSCode, AI...)

@pkg-svelte-dev

pkg-svelte-dev Bot commented Jul 30, 2026

Copy link
Copy Markdown

Install the latest version of sv from adf26ee:

pnpm add https://pkg.svelte.dev/sv/c/adf26ee7d6f923c34fb5412cddf2498dab3c9de7

Open in pkg.svelte.dev: https://pkg.svelte.dev/repos/cli/pr/1203

Note

This PR is from a fork. A maintainer must approve approve each commit before it can be built and installed.

@changeset-bot

changeset-bot Bot commented Jul 30, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: adf26ee

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

@sacrosanctic sacrosanctic changed the title fix: improve demo experience- #1188 fix: improve demo experience Jul 30, 2026
Comment thread packages/sv/src/addons/better-auth.ts Outdated
],
required: false
required: false,
condition: ({ template }) => template !== 'demo'

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@jycouet the general idea of this PR is this, thoughts?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

  • I find it strange to not allow better-auth demo in demo template

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

The logic got lost during the rebasing. It's supposed to be "when template is demo, don't ask, always use template"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The logic got lost during the rebasing. It's supposed to be "when template is demo, don't ask, always use template"

I guess you meant when template is demo, don't ask, always use demo ?
I don't really see the value there and it's doing a big breaking, and it's only for create.

@sacrosanctic
sacrosanctic marked this pull request as ready for review July 31, 2026 02:53

@jycouet jycouet left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

All in all, I'm not a big fan.

I re read the issue a few times, and:

On the demo template, add a fourth header called addon which links to the /demo page.

It could also be /demo as a 4th tab?

Actually, in the minimal template, I would love to have a link to the demo page from the root layout! (It's maybe VERY intrusive... but very visible for people adding something in their app!)

when sv create, addons should not prompt to add demo if the template is demo

I think that this is not necessary. Why doing "soooo much work" for so small outcome? Maybe I'm missing somehting?

rename /demo to /addon

Possible yes, but I don't really see the cool thing about it

Comment thread packages/sv/src/addons/tests/better-auth/test.ts Outdated
Comment thread packages/sv/src/core/options.ts Outdated
@sacrosanctic

Copy link
Copy Markdown
Contributor Author

changes:

  • removed the breaking change by making it additive
  • /addon back to /demo

Overall, the cumulative diff has been reduced so its easier to see the intend. I think less prompting is better. Especially when it comes to demos, which is used by new users. And it's a redundant question.

api changes

  • Regardless of this PR, I do think we should have access to template from within the addon
  • widening of type for svelte.addFragment

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.

update demo experience

2 participants