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

[$500] Private notes - Missing I cursor on single backtick code block in private notes #29205

Closed
2 of 6 tasks
kbecciv opened this issue Oct 10, 2023 · 14 comments
Closed
2 of 6 tasks
Assignees
Labels
Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 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

Comments

@kbecciv
Copy link

kbecciv commented Oct 10, 2023

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


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
Expensify/Expensify Issue URL:
Issue reported by: @dhanashree-sawant
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1696180128366109

Action Performed:

  1. Open the app
  2. Open any report
  3. Send a 3 backtick code block and 1 backtick code block
  4. Hover on code block text, it will display I cursor for both blocks
  5. Open any user private notes
  6. Send 3 backtick code block and 1 backtick code block
  7. On My Note, hover on 3 backtick code block text, it will display I cursor but hover on 1 backtick code block text, it will display normal cursor

Expected Result:

App should display I cursor for both backtick code block hover on My note in private notes

Actual Result:

App displays I cursor only on 3 backtick code block hover on My note in private notes

Workaround:

Unknown

Platforms:

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

  • Android: Native
  • Android: mWeb Chrome
  • iOS: Native
  • iOS: mWeb Safari
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
windows.chrome.desktop.Missing.I.cursor.single.backtick.private.notes.mov
mac.chrome.desktop.Missing.I.cursor.single.backtick.private.notes.mov
windows.chrome.missing.I.cursor.in.private.notes.mp4
MacOS: Desktop https://github.com/Expensify/App/assets/93399543/65291ac3-bd5e-46b2-b22f-f70b4af29507
windows.chrome.desktop.Missing.I.cursor.single.backtick.private.notes.mov

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~016452c92d5e653ce2
  • Upwork Job ID: 1711770672799961088
  • Last Price Increase: 2023-10-17
@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 Oct 10, 2023
@melvin-bot melvin-bot bot changed the title Private notes - Missing I cursor on single backtick code block in private notes [$500] Private notes - Missing I cursor on single backtick code block in private notes Oct 10, 2023
@melvin-bot
Copy link

melvin-bot bot commented Oct 10, 2023

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

@melvin-bot
Copy link

melvin-bot bot commented Oct 10, 2023

Job added to Upwork: https://www.upwork.com/jobs/~016452c92d5e653ce2

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

melvin-bot bot commented Oct 10, 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 Oct 10, 2023

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

@tienifr
Copy link
Contributor

tienifr commented Oct 10, 2023

Proposal

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

Private notes - Missing I cursor on single backtick code block in private notes

What is the root cause of that problem?

We're rendering the 3 backtick using PreRenderer and put accessibilityRole is text

accessibilityRole={CONST.ACCESSIBILITY_ROLE.TEXT}

That why when we hover on this component the I cursor is shown

In the case of single backtick, we do not specific the cursor property so it will use the cursor property of their parent -> When we hover on single backtick component, the hand cursor is shown

textStyle={{...textStyle, ...textStyleOverride}}

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

We should specific the text cursor for single backtick component here

            textStyle={{...textStyle, ...textStyleOverride, ...styles.cursorText}}

Result

Screen.Recording.2023-10-10.at.23.53.53.mov

@Krishna2323
Copy link
Contributor

Krishna2323 commented Oct 10, 2023

Proposal

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

Private notes - Missing I cursor on single backtick code block in private notes

What is the root cause of that problem?

We are using PressableWithoutFeedback with 'text' as accessibilityRole prop and due to this the text cursor is applied, but I think text cursor should be applied to every element like plain text, block quote and all others.

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

We can add ...cursor.cursorText to styles.renderHTMLTitle which will apply text cursor for every element.

Option 2

If we don't want to show text cursor on any element then we need to pass style={{cursor: 'inherit'}} to PressableWithoutFeedback in BasePreRenderer.

Result

@yh-0218
Copy link
Contributor

yh-0218 commented Oct 10, 2023

Proposal

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

Private notes - Missing I cursor on single backtick code block in private notes

What is the root cause of that problem?

Because we don't use any special cursor for code text.

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

we need to add ...styles.cursorText to here

What alternative solutions did you explore? (Optional)

@eh2077
Copy link
Contributor

eh2077 commented Oct 11, 2023

Proposal

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

Private notes - Missing I cursor on single backtick code block in private notes

What is the root cause of that problem?

The root cause of this issue is that we didn't set cursor style for MenuItem HTML title, see

{Boolean(props.title) && (Boolean(props.shouldRenderAsHTML) || (Boolean(props.shouldParseTitle) && Boolean(html.length))) && (
<View style={styles.renderHTMLTitle}>
<RenderHTML html={getProcessedTitle} />
</View>
)}

and styles.renderHTMLTitle

App/src/styles/styles.js

Lines 1648 to 1656 in d7b1deb

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

So the cursor is inherited from its parent container which displays as pointer.

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

To fix this issue, we should add auto style for styles.renderHTMLTitle to let the cursor of notes behave same as chat messages. We can add following cursor style

...cursor.cursorAuto,

after this line

maxWidth: '100%',

See demo

Screen.Recording.2023-10-11.at.10.06.30.PM.mov

What alternative solutions did you explore? (Optional)

The current UI to display note using menu item looks a bit odd. We can redesign the Private notes page to get rid of the menu item and use a bottom button, like Click to edit, instead. By doing so, we can diplay notes with better UX and has more consistent pointer behaviour with chat comment.

@melvin-bot melvin-bot bot added the Overdue label Oct 13, 2023
@zanyrenney
Copy link
Contributor

any thoughts on these @fedirjh ?

@melvin-bot melvin-bot bot removed the Overdue label Oct 13, 2023
@fedirjh
Copy link
Contributor

fedirjh commented Oct 14, 2023

@zanyrenney Can you please confirm the expected result for this bug? For another issue #27881 , It states that we should display the hand cursor :

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

So the expected result is not accurate.

@melvin-bot
Copy link

melvin-bot bot commented Oct 17, 2023

📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸

@melvin-bot melvin-bot bot added the Overdue label Oct 17, 2023
@zanyrenney
Copy link
Contributor

Thanks @fedirjh , I think you're right IRT to expected behaviour on a second look, closing this out.

@melvin-bot melvin-bot bot removed the Overdue label Oct 17, 2023
@Krishna2323
Copy link
Contributor

@zanyrenney, the issue is, it is displaying text cursor instead of hand cursor, I think @fedirjh was asking about the expected behaviour here.

@Krishna2323
Copy link
Contributor

@zanyrenney, I think the issue should be re-opened as there is I cursor shown on code block instead of hand cursor.

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 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
Projects
None yet
Development

No branches or pull requests

7 participants