AppFlowy icon indicating copy to clipboard operation
AppFlowy copied to clipboard

fix: trigger option selection on tap down

Open vedant-pandey opened this issue 2 years ago • 4 comments

Closes #2832

This appears to be related to an issue in Flutter wherein onTapUp is not triggered correctly leading to onTap not firing. As a possible fix, I have moved this to use onTapDown.

Feature Preview


PR Checklist

  • [x] My code adheres to the AppFlowy Style Guide
  • [x] I've listed at least one issue that this PR fixes in the description above.
  • [x] This PR only contains semantic changes.
  • [x] All existing tests are passing.

https://github.com/AppFlowy-IO/AppFlowy/assets/25723331/c052ea36-ae4b-406e-9da6-76139f9ea458

vedant-pandey avatar Jun 30 '23 07:06 vedant-pandey

CLA assistant check
All committers have signed the CLA.

CLAassistant avatar Jun 30 '23 07:06 CLAassistant

Codecov Report

Patch coverage: 100.00% and project coverage change: +0.07% :tada:

Comparison is base (df8642d) 68.38% compared to head (b698a64) 68.46%. Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2915      +/-   ##
==========================================
+ Coverage   68.38%   68.46%   +0.07%     
==========================================
  Files         474      474              
  Lines       22059    22059              
==========================================
+ Hits        15085    15102      +17     
+ Misses       6974     6957      -17     
Flag Coverage Δ
appflowy_flutter_integrateion_test 66.32% <100.00%> (+0.09%) :arrow_up:
appflowy_flutter_unit_test 12.61% <0.00%> (ø)

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

Files Changed Coverage Δ
...idgets/row/cells/select_option_cell/extension.dart 67.10% <100.00%> (ø)

... and 5 files with indirect coverage changes

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov[bot] avatar Jun 30 '23 09:06 codecov[bot]

Hello @vedant-pandey, thanks for the contribution. It seems to me the linked issue is describing a different scenario from the one here. Is there perhaps an alternative solution? Listening to onTapDown instead of onTap isn't a user interaction that is usually expected.

richardshiue avatar Jul 02 '23 02:07 richardshiue

Hi @richardshiue, thank you. The linked flutter issue is slightly different in what seems to be happening, but it mentions Inkwell.onTap not working which is what seems to be happening here too. Although, I do agree onTapDown isn't accurate to be used here, but found this to be most suitable workaround. Let me know if you think we should stick to onTap

vedant-pandey avatar Jul 02 '23 03:07 vedant-pandey

@richardshiue , is this PR ready to merge? What is blocking it from closing?

annieappflowy avatar Aug 19 '23 07:08 annieappflowy

It fixes the bug but with side effects. I don't mind getting this is in, but it would be better if there is a TODO added saying this is a hack.

richardshiue avatar Aug 19 '23 14:08 richardshiue

Hi @vedant-pandey, could you add a TODO comment for this above this fix before we merge?

richardshiue avatar Aug 25 '23 06:08 richardshiue

Hi @richardshiue , please help expediting the fix of this issue

annieappflowy avatar Sep 01 '23 08:09 annieappflowy