Skip to content
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-02] [$500] Web - Cursor Changes to Text Cursor Instead of Hand Cursor for Long Private Messages #27881

Closed
1 of 6 tasks
kbecciv opened this issue Sep 20, 2023 · 26 comments
Assignees
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. External Added to denote the issue can be worked on by a contributor Help Wanted Apply this label when an issue is open to proposals by contributors Reviewing Has a PR in review Weekly KSv2

Comments

@kbecciv
Copy link

kbecciv commented Sep 20, 2023

If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!


Action Performed:

  1. Click on FAB and select "send message"
  2. Add email and click on the header to access private notes
  3. Select "My Notes" and add a long note
  4. Go back and observe that the cursor has changed to a text cursor instead of a hand cursor

Expected Result:

The cursor should remain as a hand cursor for long private messages.

Actual Result:

The cursor changes to a text cursor for long private messages.

Workaround:

Unknown

Platforms:

Which of our officially supported platforms is this issue occurring on?

  • Android / native
  • Android / Chrome
  • iOS / native
  • iOS / Safari
  • MacOS / Chrome / Safari
  • MacOS / Desktop

Version Number: 1.3.72.6
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

screen-capture.-.2023-09-19T222850.192.webm
Recording.4657.mp4

Expensify/Expensify Issue URL:
Issue reported by: @tewodrosGirmaA
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1695186909696099

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01901da2d28d6828fb
  • Upwork Job ID: 1704567536968368128
  • Last Price Increase: 2023-09-20
@kbecciv kbecciv added External Added to denote the issue can be worked on by a contributor Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Sep 20, 2023
@melvin-bot melvin-bot bot changed the title Web - Cursor Changes to Text Cursor Instead of Hand Cursor for Long Private Messages [$500] Web - Cursor Changes to Text Cursor Instead of Hand Cursor for Long Private Messages Sep 20, 2023
@melvin-bot
Copy link

melvin-bot bot commented Sep 20, 2023

Job added to Upwork: https://www.upwork.com/jobs/~01901da2d28d6828fb

@melvin-bot
Copy link

melvin-bot bot commented Sep 20, 2023

Triggered auto assignment to @kadiealexander (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.

@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Sep 20, 2023
@melvin-bot
Copy link

melvin-bot bot commented Sep 20, 2023

Bug0 Triage Checklist (Main S/O)

  • This "bug" occurs on a supported platform (ensure Platforms in OP are ✅)
  • This bug is not a duplicate report (check E/App issues and #expensify-bugs)
    • If it is, comment with a link to the original report, close the issue and add any novel details to the original issue instead
  • This bug is reproducible using the reproduction steps in the OP. S/O
    • If the reproduction steps are clear and you're unable to reproduce the bug, check with the reporter and QA first, then close the issue.
    • If the reproduction steps aren't clear and you determine the correct steps, please update the OP.
  • This issue is filled out as thoroughly and clearly as possible
    • Pay special attention to the title, results, platforms where the bug occurs, and if the bug happens on staging/production.
  • I have reviewed and subscribed to the linked Slack conversation to ensure Slack/Github stay in sync

@melvin-bot
Copy link

melvin-bot bot commented Sep 20, 2023

Triggered auto assignment to @sonialiap (External), see https://stackoverflow.com/c/expensify/questions/8582 for more details.

@melvin-bot
Copy link

melvin-bot bot commented Sep 20, 2023

Triggered auto assignment to Contributor-plus team member for initial proposal review - @fedirjh (External)

@abdel-h66
Copy link
Contributor

abdel-h66 commented Sep 20, 2023

Proposal

Please re-state the problem that we are trying to solve in this issue.

Cursor appears as text cursor instead of a pointer

What is the root cause of that problem?

The text being displayed has a cursor:auto styling coming from styles.chatItemMessage

https://github.com/Expensify/App/blob/94c07eabcf8f0c927b759956f24a72c28710186e/src/components/MenuItem.js#L259C52-L259C52

What changes do you think we should make in order to solve the problem?

Apply
cursor:poiner on the component displaying the priveate notes

<View style={[styles.chatItemMessage, cursor.cursorPointer]}>
    <RenderHTML html={getProcessedTitle} />
</View>

What alternative solutions did you explore? (Optional)

N/A

@akinwale
Copy link
Contributor

Proposal

Please re-state the problem that we are trying to solve in this issue.

The cursor changes to a text cursor instead of the pointer cursor for private notes with long text.

What is the root cause of that problem?

In PrivateNotesViewPage, the MenuItemWithTopDescription which is used to display the note has the shouldRenderAsHTML prop set. This prop triggers a check for rendering the title in the MenuItem with this block of code:

<View style={styles.chatItemMessage}>
    <RenderHTML html={getProcessedTitle} />
</View>

styles.chatItemMessage contains ...cursor.cursorAuto which causes the I-beam cursor to be used for the text.

What changes do you think we should make in order to solve the problem?

Solution 1
Remove shouldRenderAsHTML prop from PrivateNotesViewPage.

Solution 2
Change the style in MenuItem from styles.chatItemMessage to a different style that uses cursorPointer.

What alternative solutions did you explore? (Optional)

None.

@jscardona12
Copy link
Contributor

jscardona12 commented Sep 20, 2023

Proposal

Please re-state the problem that we are trying to solve in this issue.

Web - Cursor Changes to Text Cursor Instead of Hand Cursor for Long Private Messages

What is the root cause of that problem?

Hi the root cause is in the styles

App/src/styles/styles.js

Lines 1654 to 1663 in 94c07ea

chatItemMessage: {
color: theme.text,
fontSize: variables.fontSizeNormal,
fontFamily: fontFamily.EXP_NEUE,
lineHeight: variables.lineHeightXLarge,
maxWidth: '100%',
...cursor.cursorAuto,
...whiteSpace.preWrap,
...wordBreak.breakWord,
},

the 'cursor: auto' on texts is cursor.

What changes do you think we should make in order to solve the problem?

Add to styles style={{...styles.chatItemMessage, ...cursor.cursorUnset}}, cursor: 'unset' on

<View style={styles.chatItemMessage}>

What alternative solutions did you explore? (Optional)

@ArdaSeremet
Copy link

Proposal

Please re-state the problem that we are trying to solve in this issue.

Web - Cursor Changes to Text Cursor Instead of Hand Cursor for Long Private Messages

What is the root cause of that problem?

The CSS properties of chat item message box (chatItemMessage) contains (cursor: auto) property which lets the browser automatically attach a cursor to elements. chatItemMessage is used for private message items.

What changes do you think we should make in order to solve the problem?

The first idea that comes to mind is to simply remove cursorAuto property from chatItemMessage box. However, this might cause unexpected behavior for other elements that use chatItemMessage property. The best kind of solution is to eliminate this problem only for MenuItem component. This can be done by excluding cursorAuto property from the style associated with MenuItem component.

@melvin-bot
Copy link

melvin-bot bot commented Sep 20, 2023

📣 @ArdaSeremet! 📣
Hey, it seems we don’t have your contributor details yet! You'll only have to do this once, and this is how we'll hire you on Upwork.
Please follow these steps:

  1. Make sure you've read and understood the contributing guidelines.
  2. Get the email address used to login to your Expensify account. If you don't already have an Expensify account, create one here. If you have multiple accounts (e.g. one for testing), please use your main account email.
  3. Get the link to your Upwork profile. It's necessary because we only pay via Upwork. You can access it by logging in, and then clicking on your name. It'll look like this. If you don't already have an account, sign up for one here.
  4. Copy the format below and paste it in a comment on this issue. Replace the placeholder text with your actual details.
    Screen Shot 2022-11-16 at 4 42 54 PM
    Format:
Contributor details
Your Expensify account email: <REPLACE EMAIL HERE>
Upwork Profile Link: <REPLACE LINK HERE>

@saranshbalyan-1234
Copy link
Contributor

Proposal

Please re-state the problem that we are trying to solve in this issue.

even while viewing the notes the cursor changes to 'text cursor' Instead of 'hand cursor' for Long Private Messages

What is the root cause of that problem?

<View style={styles.chatItemMessage}>
<RenderHTML html={getProcessedTitle} />
</View>

As styles.chatItemMessage is used which have these styles, defaultCursor is causing the cursor to be text

 chatItemMessage: { 
     color: theme.text, 
     fontSize: variables.fontSizeNormal, 
     fontFamily: fontFamily.EXP_NEUE, 
     lineHeight: variables.lineHeightXLarge, 
     maxWidth: '100%', 
     ...cursor.cursorAuto, 
     ...whiteSpace.preWrap, 
     ...wordBreak.breakWord, 
 }

What changes do you think we should make in order to solve the problem?

we just need to pass an additional styles.cursorDefault style to fix this issue

     <View style={{...styles.chatItemMessage, ...styles.cursorDefault}}>
              <RenderHTML html={getProcessedTitle} />
     </View>

What changes do you think we should make in order to solve the problem?
N/A

@ArdaSeremet
Copy link

Contributor details
Your Expensify account email: [email protected]
Upwork Profile Link: https://www.upwork.com/freelancers/~01f678e8a316578aae

@melvin-bot
Copy link

melvin-bot bot commented Sep 20, 2023

✅ Contributor details stored successfully. Thank you for contributing to Expensify!

@c3024
Copy link
Contributor

c3024 commented Sep 20, 2023

Proposal

Please re-state the problem that we are trying to solve in this issue.

Auto cursor shown when hovered over text in private note

What is the root cause of that problem?

For private notes we pass prop shouldRenderAsHTML and here

<View style={styles.chatItemMessage}>

the text is wrapped with View with style chatItemMessage which has cursor style auto.

What changes do you think we should make in order to solve the problem?

We will just use

<RenderHTML html={getProcessedTitle} />

for both native and others simply removing the isNative conditional and remove View wrapped around RenderHTML
Since this RenderHTML in MenuItem is only used for private notes, we can safely make this change.

What alternative solutions did you explore? (Optional)

@fedirjh
Copy link
Contributor

fedirjh commented Sep 20, 2023

This is a regression from #27736 , cc @jeet-dhandha @narefyev91

@sonialiap
Copy link
Contributor

Removing my assignment because we don't need two BZs on the issue and Kadie was assigned first

@narefyev91
Copy link
Contributor

@fedirjh should we close this one in case potential fixed was merged here #27769

@fedirjh
Copy link
Contributor

fedirjh commented Sep 25, 2023

Let's close. I guess it still require payment for reporter.

cc @kadiealexander

@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Daily KSv2 labels Sep 25, 2023
@melvin-bot melvin-bot bot changed the title [$500] Web - Cursor Changes to Text Cursor Instead of Hand Cursor for Long Private Messages [HOLD for payment 2023-10-02] [$500] Web - Cursor Changes to Text Cursor Instead of Hand Cursor for Long Private Messages Sep 25, 2023
@melvin-bot
Copy link

melvin-bot bot commented Sep 25, 2023

The solution for this issue has been 🚀 deployed to production 🚀 in version 1.3.73-1 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:

If no regressions arise, payment will be issued on 2023-10-02. 🎊

After the hold period is over and BZ checklist items are completed, please complete any of the applicable payments for this issue, and check them off once done.

  • External issue reporter
  • Contributor that fixed the issue
  • Contributor+ that helped on the issue and/or PR

For reference, here are some details about the assignees on this issue:

As a reminder, here are the bonuses/penalties that should be applied for any External issue:

  • Merged PR within 3 business days of assignment - 50% bonus
  • Merged PR more than 9 business days after assignment - 50% penalty

@melvin-bot
Copy link

melvin-bot bot commented Sep 25, 2023

BugZero Checklist: The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:

  • [@fedirjh] The PR that introduced the bug has been identified. Link to the PR:
  • [@fedirjh] The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake. Link to comment:
  • [@fedirjh] A discussion in #expensify-bugs has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner. Link to discussion:
  • [@fedirjh] Determine if we should create a regression test for this bug.
  • [@fedirjh] If we decide to create a regression test for the bug, please propose the regression test steps to ensure the same bug will not reach production again.
  • [@kadiealexander] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:

@melvin-bot melvin-bot bot added Daily KSv2 and removed Weekly KSv2 labels Oct 1, 2023
@fedirjh
Copy link
Contributor

fedirjh commented Oct 1, 2023

Bump @kadiealexander for #27881 (comment)

@melvin-bot melvin-bot bot added the Overdue label Oct 4, 2023
@kadiealexander
Copy link
Contributor

Thanks @fedirjh, lets close.

@tewodrosGirmaA
Copy link

@kadiealexander I didn't get payment

@tewodrosGirmaA
Copy link

Hello, @kadiealexander I was wondering if I am eligible for payment even though my issue is marked as "Awaiting Payment" and I have not yet received any payment. The issue has been closed and I would appreciate any clarification on this matter. Thank you.

@kadiealexander
Copy link
Contributor

Please apply here: https://www.upwork.com/jobs/~01901da2d28d6828fb

@fedirjh
Copy link
Contributor

fedirjh commented Oct 18, 2023

@kadiealexander Can be closed ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. External Added to denote the issue can be worked on by a contributor Help Wanted Apply this label when an issue is open to proposals by contributors Reviewing Has a PR in review Weekly KSv2
Projects
None yet
Development

No branches or pull requests