fix: trigger option selection on tap down
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
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%> (ø) |
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
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.
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
@richardshiue , is this PR ready to merge? What is blocking it from closing?
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.
Hi @vedant-pandey, could you add a TODO comment for this above this fix before we merge?
Hi @richardshiue , please help expediting the fix of this issue