Skip to content

Remove the click and touch hydration modes#5331

Merged
habdelra merged 1 commit into
mainfrom
cs-11617-unified-search-remove-the-click-and-touch-hydration-modes
Jun 25, 2026
Merged

Remove the click and touch hydration modes#5331
habdelra merged 1 commit into
mainfrom
cs-11617-unified-search-remove-the-click-and-touch-hydration-modes

Conversation

@habdelra

Copy link
Copy Markdown
Contributor

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. HydrationMode defined four modes; this reduces it to the two we actually want:

export type HydrationMode = 'none' | 'hover';

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 — a tap meant to open a result got consumed to hydrate it instead. Lazy hover hydration (pointer-hover + keyboard focusin) already makes a result live ahead of the interaction that opens it, so click / touch were a footgun with no upside.

Changes

  • runtime-common/search-results-component.ts — drop 'click' / 'touch' from the HydrationMode union and update the explanatory comments.
  • host/app/components/card-search/hydratable-card.gts — remove the click / touch branches from the hydrationTrigger modifier: hover keeps its mouseenter + focusin listeners, none keeps the early return.
  • host/tests/integration/components/hydratable-card-test.gts — drop the @mode='click' case (with click removed it is mechanically the existing no-overlay hover case) and the now-unused click import; none / hover coverage is unchanged.

Defaults are unaffected: <SearchResults> defaults to hover and HydratableCard falls back to none.

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 across host and runtime-common; eslint + ember-template-lint clean.

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>
@github-actions

github-actions Bot commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

Preview deployments

Host Test Results

    1 files      1 suites   2h 0m 59s ⏱️
3 199 tests 3 184 ✅ 15 💤 0 ❌
3 218 runs  3 203 ✅ 15 💤 0 ❌

Results for commit f516c4f.

Realm Server Test Results

    1 files      1 suites   10m 30s ⏱️
1 733 tests 1 733 ✅ 0 💤 0 ❌
1 826 runs  1 826 ✅ 0 💤 0 ❌

Results for commit f516c4f.

Copilot AI 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.

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 HydrationMode to 'none' | 'hover' and update related inline documentation.
  • Simplify HydratableCard’s hydrationTrigger modifier to only wire mouseenter + focusin for hover.
  • Remove the click hydration 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.

@habdelra
habdelra requested a review from a team June 24, 2026 23:39
@habdelra
habdelra merged commit 2840828 into main Jun 25, 2026
72 of 74 checks passed
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.

3 participants