Skip to content

[HOLD for payment 2023-12-12] [$1000] No I cursor on text in keyboard shortcut #29613

Closed

Description

@kbecciv

If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!


Version Number: 1.3.84.0
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/p1697215416879899

Action Performed:

  1. Open the app
  2. Press CTRL+J/CMD+J to open keyboard shortcut
  3. Hover on text and observe that normal cursor is displayed instead of I cursor
  4. Try similarly on production which currently has older keyboard shortcut popup and observe that we displayed I cursor over text

Expected Result:

App should display I cursor over text in keyboard shortcut as we used to display on older popup

Actual Result:

App does not display I cursor over text in keyboard shortcut

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
mac.chrome.no.I.cursor.on.text.in.shortcut.mov
windows.chrome.no.I.cursor.on.keyboard.shortcut.mp4
Recording.4993.mp4
MacOS: Desktop
mac.desktop.no.I.cursor.on.text.in.shortcut.mov

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01023480685f62e4c3
  • Upwork Job ID: 1713227208931950592
  • Last Price Increase: 2023-11-21
  • Automatic offers:
    • Krishna2323 | Contributor | 27861743
    • dhanashree-sawant | Reporter | 27861744
Issue OwnerCurrent Issue Owner: @kevinksullivan

Activity

  1. added
    ExternalAdded to denote the issue can be worked on by a contributor
    BugSomething is broken. Auto assigns a BugZero manager.
    on Oct 14, 2023
  2. changed the title [-]No I cursor on text in keyboard shortcut[/-] [+][$500] No I cursor on text in keyboard shortcut[/+] on Oct 14, 2023
  3. melvin-bot commented on Oct 14, 2023

    @melvin-bot

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

  4. melvin-bot commented on Oct 14, 2023

    @melvin-bot
  5. added
    Help WantedApply this label when an issue is open to proposals by contributors
    on Oct 14, 2023
  6. melvin-bot commented on Oct 14, 2023

    @melvin-bot

    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
  7. abzokhattab commented on Oct 14, 2023

    @abzokhattab
    Contributor

    Proposal

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

    No I cursor is shown when hovering on text in the keyboard shortcut page

    What is the root cause of that problem?

    We use MenuItem to render the elements inside the page, which doesn't enable the I cursor to be showing on hovering on text by default (because of the outer Hover component ).

    const renderShortcut = (shortcut) => (
    <MenuItem
    key={shortcut.displayName}
    title={shortcut.displayName}
    description={translate(`keyboardShortcutsPage.shortcuts.${shortcut.descriptionKey}`)}
    wrapperStyle={styles.ph0}
    interactive={false}
    />
    );

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

    we need to add the styling props that shows the I cursor on hovering over the text:

    titleStyle={styles.cursorText}
    descriptionTextStyle={styles.cursorText}

    OR

    we remove the MenuItem and bring back the simple text component that was used before:

    <View key={shortcut.displayName} style={styles.mb5}>
      <Text style={[styles.textStrong, styles.mb1]}>{shortcut.displayName}</Text>
      <Text style={styles.textLabelSupporting}>
        {translate(`keyboardShortcutsPage.shortcuts.${shortcut.descriptionKey}`)}
      </Text>
    </View>

    POC

    Screen.Recording.2023-10-14.at.2.09.54.PM.mov
  8. melvin-bot commented on Oct 14, 2023

    @melvin-bot

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

  9. Krishna2323 commented on Oct 14, 2023

    @Krishna2323
    Contributor

    Proposal

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

    No I cursor is shown when hovering on text in the keyboard shortcut page

    What is the root cause of that problem?

    We use MenuItem for shortcuts which applies cursorDefault when interactivity is disabled and for shortcuts we disable interactivity and when it is interactive it applies cursorPointer.

    style={({pressed}) => [
    props.style,
    !props.interactive && styles.cursorDefault,
    StyleUtils.getButtonBackgroundColorStyle(getButtonState(props.focused || isHovered, pressed, props.success, props.disabled, props.interactive), true),
    (isHovered || pressed) && props.hoverAndPressStyle,
    ...(_.isArray(props.wrapperStyle) ? props.wrapperStyle : [props.wrapperStyle]),
    props.shouldGreyOutWhenDisabled && props.disabled && styles.buttonOpacityDisabled,
    ]}

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

    We can pass styles.cursorAuto to wrapperStyle prop passed to MenuItem which will override all cursor styles.
    wrapperStyle={[styles.ph0, styles.cursorAuto]}

    const renderShortcut = (shortcut) => (
    <MenuItem
    key={shortcut.displayName}
    title={shortcut.displayName}
    description={translate(`keyboardShortcutsPage.shortcuts.${shortcut.descriptionKey}`)}
    wrapperStyle={styles.ph0}
    interactive={false}
    />
    );

    Option 2

    Or we can remove !props.interactive && styles.cursorDefault and pass styles.cursorDefault when its needed in components like TaskView.

    Option 3

    Since we are using MenuItem in multiple places, we can introduce new prop(shouldRenderAsText) just like shouldRenderAsHTML and based on that we will override default cursor style.

    Result

  10. tienifr commented on Oct 16, 2023

    @tienifr
    Contributor

    Proposal

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

    No I cursor on text in keyboard shortcut

    What is the root cause of that problem?

    We're disabling interactive in

    interactive={false}

    In

    !props.interactive && styles.cursorDefault,

    we add cursorDefault to style if interactive is false.

    Because we didn't set the cursor style for Text so it will use the cursor style from parent component

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

    For consistency, we should fix this problem in MenuItem

    when interactive is false and disabled is false we should add styles.cursorText to both titleTextStyle and descriptionTextStyle

            !props.interactive && !props.disabled && styles.cursorText,
    

    Result

  11. 91 remaining items

  12. Krishna2323 commented on Dec 14, 2023

    @Krishna2323
    Contributor
  13. kevinksullivan commented on Dec 14, 2023

    @kevinksullivan
    Contributor

    Payment summary:

  14. mananjadhav commented on Dec 14, 2023

    @mananjadhav
    Collaborator

    @kevinksullivan I am confused if this should $1000 or $1500 ?

  15. melvin-bot commented on Dec 18, 2023

    @melvin-bot

    @mananjadhav, @Beamanator, @kevinksullivan, @Krishna2323 Whoops! This issue is 2 days overdue. Let's get this updated quick!

  16. melvin-bot commented on Dec 18, 2023

    @melvin-bot

    @mananjadhav, @Beamanator, @kevinksullivan, @Krishna2323 Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

  17. mananjadhav commented on Dec 19, 2023

    @mananjadhav
    Collaborator

    @kevinksullivan Quick bump on this one. Can you please reconfirm the payout?

  18. kevinksullivan commented on Dec 19, 2023

    @kevinksullivan
    Contributor

    chatting with Manan in DM.

  19. mananjadhav commented on Dec 20, 2023

    @mananjadhav
    Collaborator

    Please ignore my comment, the bonus applies. We announced discontinuing the bonus on Oct 25th and this was created before that.

  20. kevinksullivan commented on Dec 22, 2023

    @kevinksullivan
    Contributor

    Sounds good. This is paid out, so feel free to request in NewDot @mananjadhav

  21. JmillsExpensify commented on Dec 26, 2023

    @JmillsExpensify
    Contributor

    $1,500 payment approved for @mananjadhav based on this comment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Awaiting PaymentAuto-added when associated PR is deployed to productionBugSomething is broken. Auto assigns a BugZero manager.DailyKSv2EngineeringExternalAdded to denote the issue can be worked on by a contributor

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions