Skip to content

Conversation

@SpawnAtis
Copy link
Contributor

No description provided.

@codecov
Copy link

codecov bot commented Oct 31, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (aa2594b) to head (cde467e).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##              main     #2585   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          416       416           
  Lines        20176     20211   +35     
  Branches      3386      3394    +8     
=========================================
+ Hits         20176     20211   +35     
Flag Coverage Δ
unittests 100.00% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@SpawnAtis SpawnAtis force-pushed the VIV-2876-add-long-press-on-0-dial-pad branch from 05778ab to bdeaa96 Compare November 4, 2025 07:26
const target = event.currentTarget as HTMLElement | null;

this._longPressTimeoutId = window.setTimeout(() => {
this._suppressNextClick = true;
Copy link
Contributor

Choose a reason for hiding this comment

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

There is a problem if click is not fired, then the next button click will be ignored

return event;
}

it('tapping 0 adds "0"', async () => {
Copy link
Contributor

Choose a reason for hiding this comment

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

Let's follow our naming convention with 'should'

Suggested change
it('tapping 0 adds "0"', async () => {
it('should add "0" when tapping 0', async () => {

@pointerdown="${(x, c) =>
c.parent._startLongPress(x.value, c.event as PointerEvent)}"
@pointerup="${(_, c) => c.parent._endLongPress()}"
@pointercancel="${(_, c) => c.parent._cancelLongPress()}"
Copy link
Contributor

Choose a reason for hiding this comment

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

I think pointercancel will always fire pointerleave as well

Suggested change
@pointercancel="${(_, c) => c.parent._cancelLongPress()}"

@pointerup="${(_, c) => c.parent._endLongPress()}"
@pointercancel="${(_, c) => c.parent._cancelLongPress()}"
@pointerleave="${(_, c) => c.parent._cancelLongPress()}"
@click="${onDigitClick}">
Copy link
Contributor

Choose a reason for hiding this comment

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

What about long-pressing with the keyboard? It should probably long-press with space as well
Maybe it would be easier to track the time when the pointer or keyboard press started and determine in the click handler if it was a long press. Just note that pointer/keyup is fired before click

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