Remove the click and touch hydration modes#5331
Merged
habdelra merged 1 commit intoJun 25, 2026
Merged
Conversation
Hydration mode is a per-surface host-UX choice for how an HTML-backed search result becomes a live card. `click` and `touch` hydrated on the same gesture a user makes to select / navigate to a result, so the hydration gesture collided with the result's primary interaction. Lazy `hover` hydration (pointer-hover + keyboard `focusin`) already makes a result live ahead of the interaction that opens it, so `click` / `touch` added a footgun with no upside. Reduce `HydrationMode` to `'none' | 'hover'`: drop the click/touch branches from the `hydrationTrigger` modifier (`hover` keeps its `mouseenter` + `focusin` listeners; `none` keeps the early return) and the corresponding integration-test case. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Contributor
Contributor
There was a problem hiding this comment.
Pull request overview
This PR simplifies search-result hydration behavior by removing the click and touch hydration modes (which could conflict with primary “open/navigate” interactions) and standardizing on HydrationMode = 'none' | 'hover' across runtime and host.
Changes:
- Narrow
HydrationModeto'none' | 'hover'and update related inline documentation. - Simplify
HydratableCard’shydrationTriggermodifier to only wiremouseenter+focusinforhover. - Remove the
clickhydration integration test and its now-unused helper import.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| packages/runtime-common/search-results-component.ts | Reduces HydrationMode union to none/hover and updates mode docs in the shared signature. |
| packages/host/app/components/card-search/hydratable-card.gts | Removes click/touch event branching so only hover attaches listeners (and none remains inert). |
| packages/host/tests/integration/components/hydratable-card-test.gts | Drops the removed click mode test case and cleans up the unused click import. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
backspace
approved these changes
Jun 25, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hydration mode is a per-surface host-UX choice for how an HTML-backed search result becomes a live, running card — it never travels on the wire.
HydrationModedefined four modes; this reduces it to the two we actually want:clickandtouchhydrated on the same gesture a user makes to select / navigate to a result, so the hydration gesture collided with the result's primary interaction — a tap meant to open a result got consumed to hydrate it instead. Lazyhoverhydration (pointer-hover + keyboardfocusin) already makes a result live ahead of the interaction that opens it, soclick/touchwere a footgun with no upside.Changes
runtime-common/search-results-component.ts— drop'click'/'touch'from theHydrationModeunion and update the explanatory comments.host/app/components/card-search/hydratable-card.gts— remove theclick/touchbranches from thehydrationTriggermodifier:hoverkeeps itsmouseenter+focusinlisteners,nonekeeps the early return.host/tests/integration/components/hydratable-card-test.gts— drop the@mode='click'case (withclickremoved it is mechanically the existing no-overlayhovercase) and the now-unusedclickimport;none/hovercoverage is unchanged.Defaults are unaffected:
<SearchResults>defaults tohoverandHydratableCardfalls back tonone.The project's Decision #9 ("Hydration mode") has been reconciled to
none/hover.Testing
ember test --path dist --filter 'hydratable-card'— 13/13 pass.ember-tsc(glint) type-check clean acrosshostandruntime-common; eslint + ember-template-lint clean.