Skip to content

fix(hbs-gestures): scope touch-action, cancel hold on app switch, guard numeric options - #23

Merged
HyperCriSiS merged 2 commits into
mainfrom
fix/hbs-gestures-review
Nov 14, 2026
Merged

HyperCriSiS merged 2 commits into
mainfrom
fix/hbs-gestures-review

Conversation

@HyperCriSiS

@HyperCriSiS HyperCriSiS commented Nov 14, 2026 •

Copy link
Copy Markdown
Owner

What

Follow-up to the independent review of #22.

  • touch-action: pan-x only on buttons that have a real swipe action (not none), so vertical page drags and pinch zoom stay possible elsewhere on the bar.
  • A press is canceled when the page is hidden, so a hold no longer fires after returning to the app.
  • Non-numeric or too small swipe_distance and hold_time fall back to their defaults.
  • Docs: note on the small space below the bar and on gestures that open the button's own link pop-up.
  • E2E: the HBS test imports test_lovelace as a module, so discovery no longer runs the base suite twice; down drags end further inside the viewport.

Verification

  • Node check of the module code: hidden page cancels the hold, invalid numbers fall back to defaults, CSS scoping per button and for the fallback entry, plus the earlier gesture cases.
  • Offline fixture tests pass. Real HA E2E runs in this PR's CI.

CI fix included

The E2E run of #22 failed on main: the horizontal buttons stack rejects duplicate links ("You can't use #hbs-native twice"), so the fixture card rendered as a configuration error. Each button now has its own link, and the swipe tests also assert that the Bubble Card pop-up is visible, not only the hash. Run 43640661092: 38 tests passed against isolated HA 2026.10.1 with Bubble Card v3.4.2; the same 8 HBS tests also passed against a local isolated container.

@HyperCriSiS
HyperCriSiS merged commit 7450b3a into main Nov 14, 2026
1 check passed
@HyperCriSiS
HyperCriSiS deleted the fix/hbs-gestures-review branch November 14, 2026 21:06
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