Skip to content

docs(upgrade): document event attributes, signal widening, testing and devInput changes - #8889

Open
c0deZ3R0 wants to merge 3 commits into
QwikDev:mainfrom
c0deZ3R0:docs/upgrade-guide-gaps
Open

docs(upgrade): document event attributes, signal widening, testing and devInput changes#8889
c0deZ3R0 wants to merge 3 commits into
QwikDev:mainfrom
c0deZ3R0:docs/upgrade-guide-gaps

Conversation

@c0deZ3R0

@c0deZ3R0 c0deZ3R0 commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

Overview

Documents v1 → v2 changes missing from the upgrade guide. None of these produce a build-time signal, so they surface as runtime or test failures.

What is it?

  • Docs / tests / types / typos

Description

Behavioral Changes

  • Event attribute names changed — v1 on: / on-document: / on-window: → v2 q-e: / q-d: / q-w:, plus new passive variants (q-ep:/q-dp:/q-wp:), the -- escape and DOMContentLoaded rules, and a note warning against : inside custom event names (produces an invalid attribute selector that throws on dispatch)
  • Signal is a wider type — v2 Signal<T> adds untrackedValue and trigger(), so { value } shims no longer type-check; points at the public createSignal()
  • client.devInput removed from qwikVite() options

Deprecated APIs

  • ReadonlySignalReadonly<Signal<T>>

New Tests section

  • event.target is null under trigger() — use the element argument
  • No re-render over an existing q:container — create a fresh DOM per test
  • trigger() returns the Event and accepts { waitForIdle }

Troubleshooting — three new entries keyed to the error messages, cross-linked to the sections above.

All claims verified against v2 source (event-names.ts, signal.public.ts, element-fixture.ts, dom-render.ts, vite.ts) and the v1 branch.

Checklist

  • My code follows the developer guidelines of the project
  • I performed a self-review of my own code
  • Prettier passes; MDX compiles

🤖 Generated with Claude Code

…d devInput changes

Fill v1->v2 migration guide gaps that produce no build-time signal:
renamed event attributes (q-e:/q-d:/q-w: plus passive variants) and the
colon-in-event-name pitfall, the wider Signal type and ReadonlySignal
deprecation, null event.target under trigger() in tests, and the
removal of client.devInput.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@changeset-bot

changeset-bot Bot commented Jul 31, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 4d95dd0

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

@c0deZ3R0
c0deZ3R0 marked this pull request as ready for review July 31, 2026 14:02
@c0deZ3R0
c0deZ3R0 requested a review from a team as a code owner July 31, 2026 14:02

@wmertens wmertens left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looking good but let's fix the selector bug first

The event name itself is still lowercased unless you opt into case sensitivity with a leading `-`, but v2 adds two rules: `--` is a literal `-` (`dbl--click` → `dbl-click`), and `DOMContentLoaded` is stored as `-d-o-m-content-loaded`.

<Note title="COLONS IN CUSTOM EVENT NAMES">
Don't put a `:` inside a custom event name (`useOnDocument('my:event', ...)`). The name becomes part of an attribute selector and an unescaped colon makes it invalid CSS. Use a camelCase name instead (`useOnDocument('myEvent', ...)` → `q-d:my-event`).

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I guess this one is just a bug in the selector creating, so we shouldn't document it

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.

Yes, sorry, I've updated it.

8b09a33

I've also filed the related issue as #8901.

c0deZ3R0 and others added 2 commits August 1, 2026 21:40
…tead

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…ade-guide-gaps

# Conflicts:
#	packages/docs/src/routes/docs/upgrade/index.mdx
@pkg-pr-new

pkg-pr-new Bot commented Aug 1, 2026

Copy link
Copy Markdown

Open in StackBlitz

@qwik.dev/core

npm i https://pkg.pr.new/QwikDev/qwik/@qwik.dev/core@8889

@qwik.dev/router

npm i https://pkg.pr.new/QwikDev/qwik/@qwik.dev/router@8889

eslint-plugin-qwik

npm i https://pkg.pr.new/QwikDev/qwik/eslint-plugin-qwik@8889

create-qwik

npm i https://pkg.pr.new/QwikDev/qwik/create-qwik@8889

@qwik.dev/optimizer

npm i https://pkg.pr.new/QwikDev/qwik/@qwik.dev/optimizer@8889

@qwik.dev/devtools

npm i https://pkg.pr.new/QwikDev/qwik/@qwik.dev/devtools@8889

commit: 4d95dd0

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