-
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
[HOLD for payment 2023-10-27] [$500] Double tap on emoji selects am/pm of the time of the message #29021
Comments
Job added to Upwork: https://www.upwork.com/jobs/~0149fb66dc1d8f480d |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @narefyev91 ( |
ProposalPlease re-state the problem that we are trying to solve in this issue.Double tap on emoji selects am/pm of the time of the message What is the root cause of that problem?The problem occurs because in the rendering, am/pm and the emoji become the same word and when double-clicking both are selected as if they were one. What changes do you think we should make in order to solve the problem?We must separate the words by adding a Non-breaking space at the end of the date (am/pm in the rendering) and add a style of userSelect: none so that the selection is clean.
The modification would occur on this line
It would be something like this
What alternative solutions did you explore? (Optional)Alternatively the style can be moved to styles.js or another file of convenience Final Result4052c31f-61a2-415d-80ea-404717bbb1c5.webm1adebe6f-45d1-4d96-aeec-3a7504007c39.mp4 |
ProposalPlease re-state the problem that we are trying to solve in this issue. What is the root cause of that problem?The problem is related to the way Chrome handles text selection in some cases. It can happen when there are overlapping elements or unusual styling applied to the content. What changes do you think we should make in order to solve the problem?We must add a simple css style to am/pm div What alternative solutions did you explore? (Optional) Contributor details Your Expensify account email: thekunwarsingh@gmail.com |
📣 @KunwarSingh! 📣
|
Contributor details Your Expensify account email: thekunwarsingh@gmail.com |
ProposalPlease re-state the problem that we are trying to solve in this issue. What is the root cause of that problem?The problem is related to the way Chrome handles text selection in some cases. It can happen when there are overlapping elements or unusual styling applied to the content. What changes do you think we should make in order to solve the problem?We must add a simple css style to am/pm div What alternative solutions did you explore? (Optional) Contributor details Your Expensify account email: thekunwarsingh@gmail.com |
@narefyev91 I can quickly resolve this and push a fix to web and desktop app fixed.mov |
@KunwarSingh what is the css you are adding? Can you still select PM after adding css? |
separately PM can be selected, but if we double click its not |
ProposalPlease re-state the problem that we are trying to solve in this issue.Upon selecting the emoji app selects AM/PM as well What is the root cause of that problem?The problem occurs because during rendering browser is unable to differentiate between text, it thinks it as one single word What changes do you think we should make in order to solve the problem?
We can store this style in styles.js, just for the proposal adding styles directly We can return right after the above component <View style = {{userSelect:"none"}} > <ReportActionItemDate created={props.action.created} />
<View style = {{userSelect:"none"}} ></View> What alternative solutions did you explore? (Optional)If we don't want to select AM/PM at all, we can directly pass userSelect:"none" in Lines 1594 to 1600 in 73dcafd
|
ProposalPlease re-state the problem that we are trying to solve in this issue.In the web app and desktop app, in the chat listing, if the first chat of each group begins with an emoji as the first character, double-clicking it selects the last word of the previous line. What is the root cause of that problem?The root cause of this issue is the default behavior of Chromium, which selects emojis along with one extra word. This behavior is inherent in all browsers built using Chromium. Here are additional examples from other sites: What changes do you think we should make in order to solve the problem?We can avoid this issue by:
To implement this, add the following code to EmojiUtils.js:
Then, in App/src/pages/home/report/ReportActionItemMessage.js Lines 54 to 57 in 389d7b0
Next at line 116, in App/src/pages/home/report/ReportActionItemFragment.js Lines 113 to 116 in 389d7b0
Now, before
The result can be seen here: Untitled.mp4What alternative solutions did you explore? (Optional)The Another approach is to use window.getSelection and apply ranges to change selected text. However, this method is primarily suitable for web browsers, as the copy-paste functionality in native apps has a completely different implementation. Additionally, when working with mobile browsers, it's crucial to ensure that window.getSelection doesn't cause any issues, as support for the selection API is limited in mobile browsers. |
Proposal from @ayazalavi looks good to me #29021 (comment) But again not sure that we should fix browser normal behaviour. - will wait decision from assigned internal engineer to review |
Triggered auto assignment to @Li357, see https://stackoverflow.com/c/expensify/questions/7972 for more details. |
@narefyev91 When you select an emoji in your browser, it's not just one character; it's a combination of multiple characters, or "Unicode code points," that make up the emoji. The browser selects all of these code points to ensure the emoji is displayed correctly, which might appear as selecting one extra token causing issue mentioned in this ticket. We need to explicitly tell browser to stop collecting tokens in order to avoid this issue. Zero-Width Characters: While this can technically work, it might not be the most intuitive solution and can make the code less readable for developers. It's generally better to use other methods if possible. window.getSelection API: This is a more robust and standard way to manipulate text selection in the browser. You can use it to programmatically select and manipulate text without relying on special characters. This is a cleaner and more maintainable approach if you need to control text selection within your web application. |
@narefyev91 Could you review my Proposal?, I think that using userSelect: none applied to a space is the best option since it solves the problem, while still allowing time selection without overcomplicating the problem and ensuring compatibility with all engines, not just chromium. |
Triggered auto assignment to @anmurali ( |
Bug0 Triage Checklist (Main S/O)
|
@narefyev91 I would say usually we wouldn't fix browser-normal behavior but I think we should fix this. As for proposals, I do think @ayazalavi has the better RCA, but it does seem quite complicated. Is there a downside to |
@narefyev91 user-select: none has no problems other than readability, I proposed it in the simplest way in am/pm to avoid space problems in rendering, but it can also be transported to the text area (before the emoji) , and readability can be improved by sending it to its own component. |
@ayazalavi, @Li357, @anmurali, @narefyev91 Whoops! This issue is 2 days overdue. Let's get this updated quick! |
@anmurali still waiting for payments. |
@ayazalavi, @Li357, @anmurali, @narefyev91 Whoops! This issue is 2 days overdue. Let's get this updated quick! |
@ayazalavi, @Li357, @anmurali, @narefyev91 Huh... This is 4 days overdue. Who can take care of this? |
@ayazalavi, @Li357, @anmurali, @narefyev91 6 days overdue. This is scarier than being forced to listen to Vogon poetry! |
any updates guys?
…On Fri, Nov 10, 2023 at 6:51 PM melvin-bot[bot] ***@***.***> wrote:
@ayazalavi <https://github.com/ayazalavi>, @Li357
<https://github.com/Li357>, @anmurali <https://github.com/anmurali>,
@narefyev91 <https://github.com/narefyev91> 6 days overdue. This is
scarier than being forced to listen to Vogon poetry!
—
Reply to this email directly, view it on GitHub
<#29021 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAF3LT4ZA2UQYUHVHUD24RDYDYWNRAVCNFSM6AAAAAA5WEF622VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMBVG43DOMZZGQ>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
@ayazalavi, @Li357, @anmurali, @narefyev91 Whoops! This issue is 2 days overdue. Let's get this updated quick! |
2 similar comments
@ayazalavi, @Li357, @anmurali, @narefyev91 Whoops! This issue is 2 days overdue. Let's get this updated quick! |
@ayazalavi, @Li357, @anmurali, @narefyev91 Whoops! This issue is 2 days overdue. Let's get this updated quick! |
Any updates here? |
@ayazalavi, @Li357, @anmurali, @narefyev91 Now this issue is 8 days overdue. Are you sure this should be a Daily? Feel free to change it! |
@ayazalavi, @Li357, @anmurali, @narefyev91 10 days overdue. Is anyone even seeing these? Hello? |
@ayazalavi, @Li357, @anmurali, @narefyev91 12 days overdue now... This issue's end is nigh! |
This issue has not been updated in over 14 days. @ayazalavi, @Li357, @anmurali, @narefyev91 eroding to Weekly issue. |
@ayazalavi has been paid back on Nov 10. @narefyev91 is a call stack engineer and is handled via invoice. @dhanashree-sawant has also been paid. Closing! |
@anmurali can you give me ratings in upwork please. |
If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!
Action Performed:
Expected Result:
App should not select AM/PM from time above on double click selection of emoji
Actual Result:
App selects AM/PM from time above on double click selection of emoji
Workaround:
Can the user still use Expensify without this being fixed? Have you informed them of the workaround?
Platforms:
Which of our officially supported platforms is this issue occurring on?
Version Number: 1.3.79.-3
Reproducible in staging?: y
Reproducible in production?: y
If this was caught during regression testing, add the test name, ID and link from TestRail:
Email or phone of affected tester (no customers):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Notes/Photos/Videos: Any additional supporting documentation
mac.chrome.desktop.double.click.copy.AM.PM.mov
windows.chrome.double.tap.selects.AM.PM.mp4
Recording.10.mp4
Expensify/Expensify Issue URL:
Issue reported by: @dhanashree-sawant
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1696582198838549
View all open jobs on GitHub
Upwork Automation - Do Not Edit
Issue Owner
Current Issue Owner: @anmuraliThe text was updated successfully, but these errors were encountered: