Skip to content

Conversation

mdjastrzebski
Copy link
Member

@mdjastrzebski mdjastrzebski commented Jul 24, 2023

Summary

Fixed small issues with UserEvent.press():

  • longPress should call onLongPress on Text element
  • avoid calling onPress on TextInput as it's not supported
  • consider Text to pressable if it has any press-related event handler

Test plan

Added longPress tests for Text and TextInput

@mdjastrzebski mdjastrzebski changed the title fix: user event text long press fix: user event text long press [WIP] Jul 24, 2023
@mdjastrzebski mdjastrzebski force-pushed the fix/user-event-text-long-press branch from 6a11b18 to a140658 Compare July 24, 2023 10:25
@codecov
Copy link

codecov bot commented Jul 24, 2023

Codecov Report

Patch coverage: 100.00% and project coverage change: +0.01 🎉

Comparison is base (574205a) 97.53% compared to head (a140658) 97.55%.

❗ Current head a140658 differs from pull request most recent head b20eee2. Consider uploading reports for the commit b20eee2 to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1436      +/-   ##
==========================================
+ Coverage   97.53%   97.55%   +0.01%     
==========================================
  Files          72       72              
  Lines        4225     4254      +29     
  Branches      624      630       +6     
==========================================
+ Hits         4121     4150      +29     
  Misses        104      104              
Impacted Files Coverage Δ
src/user-event/press/press.ts 100.00% <100.00%> (ø)

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@mdjastrzebski mdjastrzebski changed the title fix: user event text long press [WIP] fix: user event text long press Jul 24, 2023
@mdjastrzebski mdjastrzebski changed the title fix: user event text long press fix: UserEvent longPress on Text component Jul 24, 2023
@mdjastrzebski mdjastrzebski merged commit b9a3fb2 into main Aug 2, 2023
@mdjastrzebski mdjastrzebski deleted the fix/user-event-text-long-press branch August 2, 2023 21:25
@mdjastrzebski
Copy link
Member Author

🎉 This PR has been released in v12.2.0 🚀

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.

2 participants