-
Notifications
You must be signed in to change notification settings - Fork 2.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix contextMenu on Mobile #3659
fix contextMenu on Mobile #3659
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Viacheslav80 There is far too much code duplication between the native + web implementation here. It should be very obvious what the difference between these two files are. It depends on circumstances, but a common pattern in this repo is to do something like this:
RenderHTML/
---| BaseRenderHTML // cross-platform implementation
---| index.js // lightweight web implementation wrapping cross-platform base component
---| index.native.js // leightweight native implementation wrapping cross-platform base component
Right now, it's very difficult to review this PR because the difference between the web and native implementation is not obvious.
@roryabraham thanks. I am fix it |
Updated |
Updated |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Almost done! Only a couple very minor comments remaining.
Also, there are merge conflicts |
Updated |
exactly, something broke(( |
defaultProps, | ||
} from './renderHTMLPropTypes'; | ||
|
||
const RenderHTML = ({html, debag}) => ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
const RenderHTML = ({html, debag}) => ( | |
const RenderHTML = ({html, debug}) => ( |
Updated |
Updated |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice, this seems to be working well now!
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
* @param {touchstart} e - TouchEvent. | ||
* https://developer.mozilla.org/en-US/docs/Web/API/TouchEvent | ||
*/ | ||
preventDefault = (e) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think we support this pattern in Class component yet.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch! I will create a follow-up to clean this up!
Just a heads up, I don't think we should have blocked the touch on the Web devices that support the Touch interface. So a check for small screens while preventing touch would have been great. |
Well, this is only for |
Oh yeah. But May it will block the context menu on WEb-touch devices while using touch. Anyways we can keep it as it is for now. |
Follow-up here |
🚀 Deployed to staging in version: 1.0.74-1🚀
|
@roryabraham Serious regression from blocking the touch event.
|
Revert PR here. So @Viacheslav80 this means that you'll need to create a follow-up PR to fix the context menu on mobile web without causing other regressions. |
@roryabraham ok. I am do it today |
@Viacheslav80 I think it's fine if you don't include the fix for blue screen/ full-page highlight. I will tackle that in #2705. But you can share your findings here about that if you want. It would be a great help, Thanks. |
iOS - Chat - Context menu flickers continouslyExpected Result:No visual issues and context menu opens without any issue Actual Result:Context menu flickers continuously Actions Performed:
Platform:iOS ✔️ Build:1.0.75-0 Notes/Images/Video:Bug5134006_RPReplay_Final1625058835.mp4 |
Confirmed this is fixed #3659 (comment) 🎉 |
Details
/Users/syva80/Expensify.cash/src/pages/home/report/ReportActionItemFragment.js
I'm removing the prop "selectable"
components/RenderHTML.js. --> components/RenderHTML/index.js and index.native.js (remove prop "textSelectable")
Fixed Issues
Fixes #2279
Tests
QA Steps
Same as above
Tested On
Screenshots
Web
Mobile Web
Desktop
iOS
Android