Skip to content

fix(vue): preserve Steps and Select caller events - #169

Merged
elonehoo merged 1 commit into
mainfrom
fix/vue-steps-select-events
Nov 5, 2026
Merged

elonehoo merged 1 commit into
mainfrom
fix/vue-steps-select-events

Conversation

@elonehoo

@elonehoo elonehoo commented Nov 5, 2026 •

Copy link
Copy Markdown
Member

Summary

  • Wire the existing Steps Root emit bridge so step changes, model updates and completion callbacks reach Vue consumers.
  • Run caller-provided ordinary same-key listeners before core handlers in the Steps and Select wrappers, while preserving Vue-native listener arrays, identity deduplication, dynamic replacement/removal, error handling and asChild behavior.
  • Preserve Select presence, refs and conditional mounting. Add 320 focused regression cases.

This PR contains the exact reviewed 15-file candidate. Shared factory/Dynamic, core dependencies, versions, lockfiles and workflows are unchanged. It does not publish a release. The separate core Steps/Select keyboard and focus changes are not included; this PR's existing CI uses the unchanged published core 0.3.3 pins.

Validation

  • Full local Vue unit suite: 611/611.
  • Existing Vue SSR suite: 170/170.
  • Vue typecheck, TypeScript ESLint, build and diff checks passed. The repository ESLint configuration does not lint these Vue SFCs; they were compiled and typechecked.
  • The 320 focused regressions replayed against released source produce 229 failures and 91 passing controls, and all pass on this candidate.
  • Actual packed-artifact checks cover released core and the separate unpublished core candidates. Mixed sibling/nested native/asChild roots preserve SSR hydration identity, callback isolation and cleanup in DOM emulation.
  • Existing repository CI and browser accessibility smoke passed. Node 22 and Node 24 each passed 7,578 tests (48 skipped), including the existing Chromium Steps (27) and Select (46) suites. The added listener regressions run in Happy DOM. Three-engine smoke fixtures do not specifically cover Steps/Select, so these results are not exhaustive browser or assistive-technology acceptance.

Known limits

  • Option-suffixed listeners such as onClickOnce / onKeydownOnce remain separate native registrations. Wrapper .once.prevent can still run after the core action on the first event. Nine exploratory Steps failures remain unresolved; six Select tests explicitly characterize that existing limit. Capture/passive semantics are not rewritten.
  • Ordinary listener ordering does not add a new cancellation contract to core focus/pointer handlers that do not inspect defaultPrevented.
  • Local checks do not establish trusted keyboard activation, physical Tab traversal, native default actions, rendered layout/animations, accessibility-tree or assistive-technology behavior.
  • A separate React Select harness discrepancy was traced to Happy DOM 21.0.1's stale selectedOptions cache. The corrected local oracle verifies every option flag and callback history; native emulator regressions retain that failure and additional multi/disabled/empty FormData limitations. No product workaround or dependency patch is included.

The existing checks are green and squash merge is now authorized. Release preparation will separately align the chosen published core version, catalog/lockfile, exact-core gate, synchronized UI versions and migration notes before a release tag is pushed. No version is published by this PR itself.


Autofix with [code]smith
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.


Note

Medium Risk
Touches event wiring on heavily used Select/Steps parts and changes listener order/cancellation semantics app code may rely on; mitigated by extensive regression tests but not full browser/a11y coverage.

Overview
Fixes Vue Select and Steps wrappers so parent attrs/listeners compose correctly with core machine props instead of being dropped or running in the wrong order.

Both libraries get shared composables (useSelectPartProps, useStepsTriggerProps) that mergeProps core + useAttrs(), set inheritAttrs: false, and rebuild same-key handlers so caller listeners run before core, with Vue-style listener arrays (vetoes, dedup, reactive swap/remove, errors, asChild). Select parts (Trigger, Content, Item, Label, ClearTrigger) and Steps triggers (Trigger, Next, Prev) bind through getMergedProps(); Select.Content still merges Presence first, then attrs.

Steps.Root now defineEmits and passes emits into useSteps, so stepChange, update:modelValue, and stepComplete reach consumers.

Adds large listener-contract and runtime unit suites (~320 cases) for ordering, cancellation, controlled state, lazy mount, and Presence cleanup; documents limits for onClickOnce / modifier keys.

Reviewed by Cursor Bugbot for commit 2c7d304. Bugbot is set up for automated code reviews on this repo. Configure here.

Wire Steps root emits and compose ordinary same-key native listeners before core handlers in component-scoped wrappers. Preserve native listener arrays, identity deduplication, asChild behavior and Select presence lifecycle. Add focused listener and runtime regressions without changing versions, dependencies or workflows.
@vercel

vercel Bot commented Nov 5, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
destyler-ui Ready Ready Preview Nov 5, 2026 11:30am UTC
destyler-ui-dev Ready Ready Preview Nov 5, 2026 11:30am UTC

@elonehoo
elonehoo marked this pull request as ready for review November 5, 2026 12:01
@elonehoo
elonehoo merged commit 133dc38 into main Nov 5, 2026
14 checks passed
elonehoo added a commit that referenced this pull request Nov 5, 2026
Synchronize all four public UI packages at0.0.3 and consume verified core0.3.4 artifacts. Preserve the Vue Steps/Select event fixes from #169 and update the frozen lockfile and exact-core gate.

BREAKING CHANGE: Core0.3.4 changes Steps roving Tab order, keyboard navigation and completion roles, and Select default composite focus ownership. Existing Vue wrapper .once.prevent cancellation remains limited; capture/passive semantics are unchanged.

Migration and known-limit notes: https://github.com/destyler/ui/blob/v0.0.3/docs/releases/0.0.3.md

The scoped changelogithub configuration renders these notices in the generated release body. Actual-generator proof and all final-head CI/reviews passed. No package publication is performed by this merge.

Pull request: #170
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.

1 participant