mirror of
https://github.com/windmill-labs/windmill.git
synced 2026-09-05 16:03:47 +00:00
fix(cli): add Svelte 5 event delegation guidance and safe push to raw-app skill (#8466)
- Add documentation about the $.delegated runtime error that occurs when the Svelte runtime version in node_modules doesn't match the compiler version used by wmill sync push. - Change the push command in CLI reference to use --extra-includes for targeted pushes instead of blanket wmill sync push. Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.6
parent
fb2bdc6a53
commit
911df958e7
@@ -4602,9 +4602,18 @@ Tell the user they can run these commands (do NOT run them yourself):
|
||||
| \`wmill app dev\` | Start dev server with live reload |
|
||||
| \`wmill app generate-agents\` | Refresh AGENTS.md and DATATABLES.md |
|
||||
| \`wmill app generate-locks\` | Generate lock files for backend runnables |
|
||||
| \`wmill sync push\` | Deploy app to Windmill |
|
||||
| \`wmill sync push --extra-includes "f/<folder>/<app>.raw_app/**" --yes\` | Deploy this specific raw app to Windmill (never do a blanket \`wmill sync push\`) |
|
||||
| \`wmill sync pull\` | Pull latest from Windmill |
|
||||
|
||||
## Svelte 5 Event Handling
|
||||
|
||||
When building Svelte 5 raw apps, be aware of event delegation:
|
||||
|
||||
- The Svelte runtime version in \`node_modules/svelte\` **must match** the compiler version used by \`wmill sync push\`. If you get \`$.delegated is undefined\` errors at runtime, run \`npm install svelte@latest\` in the raw app folder and re-push.
|
||||
- \`onclick\` on \`<div>\`, \`<span>\`, and other non-interactive elements uses Svelte's event delegation system. If the runtime doesn't support it, you'll get errors.
|
||||
- \`onclick\` on \`<button>\` elements is native and generally works fine.
|
||||
- For modal overlays or click-outside patterns, prefer using \`<button>\` elements styled as overlays, or ensure the Svelte runtime is up to date.
|
||||
|
||||
## Best Practices
|
||||
|
||||
1. **Check DATATABLES.md** for existing tables before creating new ones
|
||||
|
||||
Reference in New Issue
Block a user