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-07-21] [$1000] Action menu has cursor pointer while it is not clickable #22310

Closed
1 of 6 tasks
kavimuru opened this issue Jul 5, 2023 · 36 comments
Closed
1 of 6 tasks
Assignees
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 External Added to denote the issue can be worked on by a contributor Reviewing Has a PR in review

Comments

@kavimuru
Copy link

kavimuru commented Jul 5, 2023

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:

  1. Open any report
  2. Chat any message
  3. Hover on message, Observe the action menu pops up
  4. Move the mouse pointer to the space between two action menus Observe that it has a pointer but can't click

Expected Result:

The space between two action menus should not be a pointer because it cannot be clicked

Actual Result:

mouse pointer to the space between two action menus has a pointer and but can't click

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?

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

Version Number: 1.3.37-2
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.Recording.2023-07-05.at.16.52.01.mov

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

View all open jobs on GitHub

Recording.1178.mp4
Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01433188c964925d3e
  • Upwork Job ID: 1676883396553637888
  • Last Price Increase: 2023-07-06
@kavimuru kavimuru added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Jul 5, 2023
@ahmedGaber93
Copy link
Contributor

Proposal

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

Action menu has cursor pointer while it is not clickable.

What is the root cause of that problem?

There is no cursor style added to MiniReportActionContextMenu, and it inherits parent cursor style pointer

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

we need to add cursor style styles.cursorDefault here.

function getMiniReportActionContextMenuWrapperStyle(isReportActionItemGrouped) {
return {
...(isReportActionItemGrouped ? positioning.tn8 : positioning.tn4),
...positioning.r4,
position: 'absolute',
zIndex: 1,
};
}

What alternative solutions did you explore? (Optional)

instead we can to add cursor style styles.cursorDefault to BaseReportActionContextMenu container view here.

style={[this.wrapperStyle, styles.cursorDefault]}

@melvin-bot
Copy link

melvin-bot bot commented Jul 5, 2023

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

@melvin-bot
Copy link

melvin-bot bot commented Jul 5, 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

@bernhardoj
Copy link
Contributor

Proposal

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

Mini context menu shows cursor pointer around the item even though it's actually not clickable.

What is the root cause of that problem?

This issue starts to happen after the accessible pressable project. In GenericPressable, we are setting the cursor to pointer by default.

getCursorStyle(shouldUseDisabledCursor, [props.accessibilityRole, props.role].includes('text')),

const getCursorStyle = (isDisabled, isText) => {
if (isDisabled) {
return styles.cursorDisabled;
}
if (isText) {
return styles.cursorText;
}
return styles.cursorPointer;
};

This is assuming that every component that use Pressable will be clickable, but it's not the case with this issue.

In this issue, the whole mini context menu cursor becomes pointer because it inherits the cursor style from PressableWithSecondaryInteraction.

<PressableWithSecondaryInteraction
pointerEvents={props.action.pendingAction === CONST.RED_BRICK_ROAD_PENDING_ACTION.DELETE ? 'none' : 'auto'}
ref={popoverAnchorRef}
onPressIn={() => props.isSmallScreenWidth && DeviceCapabilities.canUseTouchScreen() && ControlSelection.block()}
onPressOut={() => ControlSelection.unblock()}
onSecondaryInteraction={showPopover}
preventDefaultContextMenu={!props.draftMessage && !hasErrors}
withoutFocusOnSecondaryInteraction
accessibilityLabel={props.translate('accessibilityHints.chatMessage')}
>
<Hoverable disabled={Boolean(props.draftMessage)}>
{(hovered) => (
<View>
{props.shouldDisplayNewMarker && <UnreadActionIndicator reportActionID={props.action.reportActionID} />}
<MiniReportActionContextMenu
reportID={props.report.reportID}
reportAction={props.action}
isArchivedRoom={ReportUtils.isArchivedRoom(props.report)}
displayAsGroup={props.displayAsGroup}
isVisible={hovered && !props.draftMessage && !hasErrors}
draftMessage={props.draftMessage}
isChronosReport={ReportUtils.chatIncludesChronos(props.report)}
/>

PressableWithSecondaryInteraction is based on PressableWithFeedback which is based on GenericPressable. We don't set any onPress here, so the cursor style shouldn't be a pointer.

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

The easiest fix is to set the cursor style here as default. styles.cursorDefault

<PressableWithSecondaryInteraction
pointerEvents={props.action.pendingAction === CONST.RED_BRICK_ROAD_PENDING_ACTION.DELETE ? 'none' : 'auto'}
ref={popoverAnchorRef}
onPressIn={() => props.isSmallScreenWidth && DeviceCapabilities.canUseTouchScreen() && ControlSelection.block()}
onPressOut={() => ControlSelection.unblock()}
onSecondaryInteraction={showPopover}
preventDefaultContextMenu={!props.draftMessage && !hasErrors}
withoutFocusOnSecondaryInteraction
accessibilityLabel={props.translate('accessibilityHints.chatMessage')}
>
<Hoverable disabled={Boolean(props.draftMessage)}>
{(hovered) => (
<View>
{props.shouldDisplayNewMarker && <UnreadActionIndicator reportActionID={props.action.reportActionID} />}
<MiniReportActionContextMenu
reportID={props.report.reportID}
reportAction={props.action}
isArchivedRoom={ReportUtils.isArchivedRoom(props.report)}
displayAsGroup={props.displayAsGroup}
isVisible={hovered && !props.draftMessage && !hasErrors}
draftMessage={props.draftMessage}
isChronosReport={ReportUtils.chatIncludesChronos(props.report)}
/>

What alternative solutions did you explore? (Optional)

If a pressable doesn't have an onPress props, we should not change the cursor style.

@twisterdotcom
Copy link
Contributor

Very niche, but it is a bug I suppose.

@twisterdotcom twisterdotcom added the External Added to denote the issue can be worked on by a contributor label Jul 6, 2023
@melvin-bot melvin-bot bot changed the title Action menu has cursor pointer while it is not clickable [$1000] Action menu has cursor pointer while it is not clickable Jul 6, 2023
@melvin-bot
Copy link

melvin-bot bot commented Jul 6, 2023

Job added to Upwork: https://www.upwork.com/jobs/~01433188c964925d3e

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

melvin-bot bot commented Jul 6, 2023

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

@melvin-bot
Copy link

melvin-bot bot commented Jul 6, 2023

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

@melvin-bot melvin-bot bot removed the Help Wanted Apply this label when an issue is open to proposals by contributors label Jul 6, 2023
@melvin-bot
Copy link

melvin-bot bot commented Jul 6, 2023

📣 @thesahindia 🎉 An offer has been automatically sent to your Upwork account for the Contributor role 🎉 Thanks for contributing to the Expensify app!

Upwork job
Please accept the offer and leave a comment on the Github issue letting us know when we can expect a PR to be ready for review 🧑‍💻
Keep in mind: Code of Conduct | Contributing 📖

@melvin-bot
Copy link

melvin-bot bot commented Jul 6, 2023

📣 @namhihi237 We're missing your Upwork ID to automatically send you an offer for the Reporter role.
Once you apply to the Upwork job, your Upwork ID will be stored and you will be automatically hired for future jobs!

@twisterdotcom
Copy link
Contributor

OH FFS. I was just trying to get this done before I go OOO and GH unassigned everybody.

@twisterdotcom twisterdotcom added the Help Wanted Apply this label when an issue is open to proposals by contributors label Jul 6, 2023
@yh-0218
Copy link
Contributor

yh-0218 commented Jul 6, 2023

Proposal

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

Action menu has cursor pointer while it is not clickable.

What is the root cause of that problem?

There is no cursor style added to getMiniReportActionContextMenuWrapperStyle of MiniReportActionContextMenu.
So The cursor is pointer by default.

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

I think we can add ...styles.cursorDefault to getMiniReportActionContextMenuWrapperStyle.

What alternative solutions did you explore? (Optional)

@melvin-bot melvin-bot bot added the Overdue label Jul 10, 2023
@thesahindia
Copy link
Member

@ahmedGaber93's proposal looks good to me.

🎀 👀 🎀 C+ reviewed

@melvin-bot melvin-bot bot removed the Overdue label Jul 10, 2023
@melvin-bot
Copy link

melvin-bot bot commented Jul 11, 2023

📣 @thesahindia 🎉 An offer has been automatically sent to your Upwork account for the Reviewer role 🎉 Thanks for contributing to the Expensify app!

Upwork job

@melvin-bot
Copy link

melvin-bot bot commented Jul 11, 2023

📣 @ahmedGaber93 🎉 An offer has been automatically sent to your Upwork account for the Contributor role 🎉 Thanks for contributing to the Expensify app!

Upwork job
Please accept the offer and leave a comment on the Github issue letting us know when we can expect a PR to be ready for review 🧑‍💻
Keep in mind: Code of Conduct | Contributing 📖

@melvin-bot
Copy link

melvin-bot bot commented Jul 11, 2023

📣 @namhihi237 We're missing your Upwork ID to automatically send you an offer for the Reporter role.
Once you apply to the Upwork job, your Upwork ID will be stored and you will be automatically hired for future jobs!

@melvin-bot melvin-bot bot added the Reviewing Has a PR in review label Jul 11, 2023
@ahmedGaber93
Copy link
Contributor

@thesahindia PR is ready for review.

@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Daily KSv2 labels Jul 14, 2023
@melvin-bot melvin-bot bot changed the title [$1000] Action menu has cursor pointer while it is not clickable [HOLD for payment 2023-07-21] [$1000] Action menu has cursor pointer while it is not clickable Jul 14, 2023
@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Jul 14, 2023
@melvin-bot
Copy link

melvin-bot bot commented Jul 14, 2023

Reviewing label has been removed, please complete the "BugZero Checklist".

@melvin-bot
Copy link

melvin-bot bot commented Jul 14, 2023

The solution for this issue has been 🚀 deployed to production 🚀 in version 1.3.40-5 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-07-21. 🎊

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

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 Jul 14, 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:

  • [@thesahindia] The PR that introduced the bug has been identified. Link to the PR:
  • [@thesahindia] 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:
  • [@thesahindia] 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:
  • [@thesahindia] Determine if we should create a regression test for this bug.
  • [@thesahindia] 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.
  • [@twisterdotcom] 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 Jul 20, 2023
@twisterdotcom
Copy link
Contributor

@ahmedGaber93 - paid https://www.upwork.com/en-gb/nx/wm/workroom/34196455/overview?milestone=30845003.
@thesahindia - you should request payment in newDot and complete the BZ checklist.
@namhihi237 - I still need you to apply for your $250: Upwork job

@namhihi237
Copy link
Contributor

@twisterdotcom applied

@ahmedGaber93
Copy link
Contributor

Thanks! @twisterdotcom
But i think this issue is eligible for bounty.

@melvin-bot melvin-bot bot added the Overdue label Jul 24, 2023
@Li357 Li357 added the Reviewing Has a PR in review label Jul 24, 2023
@melvin-bot melvin-bot bot removed the Overdue label Jul 24, 2023
@thesahindia
Copy link
Member

you should request payment in newDot and complete the BZ checklist.

Yeah I will soon request the payment.

I believe we don't need any regression tests for this and it was a case that we missed and I couldn't find the PR that should have prevented this issue.

@twisterdotcom
Copy link
Contributor

@ahmedGaber93 - paid $1500 https://www.upwork.com/en-gb/nx/wm/workroom/34196455/overview?milestone=30845003.
@thesahindia - you should request payment in newDot and complete the BZ checklist for $1500
@namhihi237 - Offer sent for $250: https://www.upwork.com/en-gb/nx/wm/offer/25751003

@namhihi237
Copy link
Contributor

Acceptd @twisterdotcom

@namhihi237
Copy link
Contributor

Hi @twisterdotcom I see the ticket is closed, So any updated payment for this?

@twisterdotcom
Copy link
Contributor

Sorry, this was in my upwork inbox. Just got to it now. All done!

@namhihi237
Copy link
Contributor

Thanks @twisterdotcom

@JmillsExpensify
Copy link

$1,500 payment for @thesahindia approved based on BZ summary.

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. Daily KSv2 External Added to denote the issue can be worked on by a contributor Reviewing Has a PR in review
Projects
None yet
Development

No branches or pull requests

10 participants