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-06-05] [$1000] Remove checkbox from Money request header #19332

Closed
6 tasks done
kavimuru opened this issue May 19, 2023 · 36 comments
Closed
6 tasks done
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

Comments

@kavimuru
Copy link

kavimuru commented May 19, 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. Login with any account, go any request money report.
  2. Hover the header title.
  3. Notice a checkbox shows on the right side of the component

Expected Result:

No checkbox should appear

Actual Result:

A checkbox appears

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.16-5
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-05-17.at.17.14.38.mov
Recording.671.mp4

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

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~0199442829f9113a36
  • Upwork Job ID: 1660914295792259072
  • Last Price Increase: 2023-05-23
@kavimuru kavimuru added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels May 19, 2023
@melvin-bot
Copy link

melvin-bot bot commented May 19, 2023

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

@melvin-bot
Copy link

melvin-bot bot commented May 19, 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

@PrashantMangukiya
Copy link
Contributor

PrashantMangukiya commented May 20, 2023

Proposal

Posting proposal early as per new guidelines

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

Money request header title has I beam cursor instead of pointer while hovering.

What is the root cause of that problem?

Money request header rendered via src/components/MoneyRequestHeader.js component. It consist two rows i.e. Requester and Payee.

1. So requestor rows rendered via <HeaderWithCloseButton> at line 91

<HeaderWithCloseButton

Eventually HeaderWithCloseButton will render AvatarWithDisplayName via this:

<AvatarWithDisplayName
report={this.props.report}
policies={this.props.policies}
personalDetails={this.props.personalDetails}
/>

AvatarWithDisplayName.js will render DisplayNames via this code:

<DisplayNames
fullTitle={title}
displayNamesWithTooltips={displayNamesWithTooltips}
tooltipEnabled
numberOfLines={1}
textStyles={[styles.headerText, styles.pre]}
shouldUseFullTitle={isExpenseReport}
/>

We can see at line 82 we are passing text styles without cursor style, So it is display I beam cursor due text being selectable by nature.

2. Payee render from MoneyRequestHeader.js via this code:

<Text
style={[styles.headerText, styles.pre]}
numberOfLines={1}
>
{payeeName}
</Text>

We can see at line 121 we are passing text styles without cursor style, So it display I beam cursor. So this is the root cause of the problem for both places.

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

To solve this we have to set default cursor style at two place.
i.e. Within AvatarWithDisplayName.js we have to set styles.cursorDefault style at line 82 as shown in code below.

<DisplayNames 
   ...
   // textStyles={[styles.headerText, styles.pre]}   // *** Old  ***
   textStyles={[styles.headerText, styles.pre, styles.cursorDefault]} // *** Updated  ***
   ...
/> 

Within MoneyRequestHeader.js we have to set styles.cursorDefault style at line 121 as shown in code below.

 <Text 
     // style={[styles.headerText, styles.pre]}   // *** Old ***
     style={[styles.headerText, styles.pre, styles.cursorDefault]}  // *** Updated ***
     ...
 > 
     {payeeName} 
 </Text> 

So it will solve the issue and shows default cursor for both Requester and Payee as shown in result video.

Important: We can not set pointer cursor because there is not any action on click of the text. So we have to use default cursor.

Proposal to Set Checkmark and Settled text

Within MoneyRequestHeader.js set iou amount description conditionally and pass descriptionRightIcon prop as shown below at line 179 here.

<MenuItemWithTopDescription
  title={formattedTransactionAmount}
  // description={`${props.translate('iou.amount')} • ${props.translate('iou.cash')}`}   // *** Old Code ***
  description={`${props.translate('iou.amount')}${props.translate('iou.cash')}${isSettled ? ` • ${props.translate('iou.settledExpensify')}` : ''}`}   // *** Updated Code ***
  descriptionRightIcon={isSettled ? Expensicons.Checkmark : false}   // *** Add this prop
  ....
/>

We have remove old checkmark icon from code block here.

Then we have to update this code as shown below:

<View style={[styles.flexRow, styles.alignItemsCenter]}>
    {Boolean(props.title) && (
        <Text
            style={titleTextStyle}
            numberOfLines={1}
        >
            {convertToLTR(props.title)}
        </Text>
    )}
    {Boolean(props.descriptionRightIcon) && (
        <View style={[styles.ml2]}>
            <Icon
                src={props.descriptionRightIcon}
                fill={themeColors.iconSuccessFill}
            />
        </View>
    )}
</View>

So this will show the checkmark icon at right side of the amount and show Settled within text as shown in result below:

Results Settled-Checkmark Unsetled

What alternative solutions did you explore? (Optional)

None.

Results
DefaultCursor.mp4

@daraksha-dk
Copy link
Contributor

daraksha-dk commented May 20, 2023

Proposal

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

Money request header title has I beam cursor instead of pointer while hovering.

What is the root cause of that problem?

If the items in the header are not intended to be clickable, then there may not be an issue to fix. But if we plan to make any of the items clickable then the root cause of this issue is not defining pointer styles for those items.
Additionally, there seems to be an inconsistency with the use of tooltips in both the Money Request and Task headers that should be addressed and made consistent.

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

To fix these issues, we need to first confirm if any of these header items are going to be clickable in future.
If so, we should apply styles.cursorpointer to corresponding items and leave other items as they are, since we already use I-beam cursors for text all over the app. cc: @shawnborton

Few examples
Screen.Recording.2023-05-20.at.6.46.11.PM.mov

Also, we need to define Tooltips for all header items or follow the design team's suggestion.

This is the current scenario:

For Money Request Page

  • In first row
    - Avatar has default cursor and no tooltip
    - Name has I-Beam cursor and tooltip is present

  • In 2nd row
    - Avatar has default cursor and no tooltip
    - Name has I-Beam cursor and no tooltip

    money-request-page.mov

For Task Pages

  • In first row
    - Avatar and Name both have default cursor and no tooltips

  • In 2nd row
    - Avatar and Name both have pointer cursor and no tooltips (it's clickable)

    task-page.mov

We will be making these changes in HeaderView.js, HeaderViewWithCloseButton.js, MoneyRequestHeader.js, TaskHeader.js, AvatarWithDisplayName.js etc

What alternative solutions did you explore? (Optional)

We can also go with default cursors and consistent tooltips

@melvin-bot melvin-bot bot added the Overdue label May 22, 2023
@shawnborton
Copy link
Contributor

Hmm why does the To field have a checkmark here? cc @JmillsExpensify @trjExpensify

But I think this isn't really a bug if you can't actually click the header title to navigate anywhere, then no need for a pointer mouse.

@trjExpensify
Copy link
Contributor

Hmm why does the To field have a checkmark here? cc @JmillsExpensify @trjExpensify

I think I'm blinded by EC3, can you link me to the vid showing that? 😅

I agree it shouldn't have a pointer mouse if it's not clickable, and I don't think we have any immediate plans to add some kind of "room details" for a expense/iouReport.

@daraksha-dk
Copy link
Contributor

@trjExpensify I think @shawnborton is referring to the first video here

@trjExpensify
Copy link
Contributor

Ah, I see it now. Yes, that's an error. The transaction view once settled should look like this:

image

@mountiny @luacmartins @Julesssss - I've been out of the loop at EC3 for a couple of days, is this fix up somewhere else?

@Julesssss Julesssss self-assigned this May 22, 2023
@Julesssss
Copy link
Contributor

is this fix up somewhere else?

Not as far as I'm aware. Given that it's minor we can probably sneak the fix into this issue/proposal

@melvin-bot melvin-bot bot removed the Overdue label May 22, 2023
@mountiny
Copy link
Contributor

I dont think so, I think this is just the checkmark from the IOU/ expense report as the header is same component.

@trjExpensify
Copy link
Contributor

Cool, and then on the transactions details we're missing the checkmark alongside the amount field value and "settled" in the amount field header after the dot separator.

@PrashantMangukiya
Copy link
Contributor

Proposal

Updated that includes Checkmark and "Settled" text.

@mountiny
Copy link
Contributor

@Julesssss I think we could give this task to @PrashantMangukiya and work with them to resolve it

@Julesssss Julesssss added the External Added to denote the issue can be worked on by a contributor label May 23, 2023
@melvin-bot melvin-bot bot changed the title Money request header title has I beam cursor instead of pointer while hovering. [$1000] Money request header title has I beam cursor instead of pointer while hovering. May 23, 2023
@melvin-bot
Copy link

melvin-bot bot commented May 23, 2023

Job added to Upwork: https://www.upwork.com/jobs/~0199442829f9113a36

@melvin-bot
Copy link

melvin-bot bot commented May 23, 2023

Current assignee @tjferriss is eligible for the External assigner, not assigning anyone new.

@melvin-bot
Copy link

melvin-bot bot commented May 23, 2023

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

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

melvin-bot bot commented May 23, 2023

Current assignee @Julesssss is eligible for the External assigner, not assigning anyone new.

@Julesssss
Copy link
Contributor

Hey @aimane-chnaif, could you please give this proposal a review before I assign @PrashantMangukiya? Thanks

@aimane-chnaif
Copy link
Contributor

Just to confirm: do nothing about cursor but the issue to fix here is checkmark issue, right?

@Julesssss
Copy link
Contributor

We'd like to include both in this PR if possible.

@grgia
Copy link
Contributor

grgia commented May 24, 2023

I agree that this is not a bug, the cursor is a pointer on other chat headers because clicking on the avatar opens the details page. Unless we intend to also add that functionality, we can probably close this. What do you think @Julesssss ?

@Julesssss Julesssss changed the title [$1000] Money request header title has I beam cursor instead of pointer while hovering. [$1000] Remove checkbox from Money request header May 24, 2023
@Julesssss
Copy link
Contributor

Thanks Georgia, that makes sense and I agree.

@aimane-chnaif I updated the title and description to make this clear.

@aimane-chnaif
Copy link
Contributor

ok let's assign @PrashantMangukiya for checkbox fix

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

melvin-bot bot commented May 24, 2023

📣 @PrashantMangukiya You have been assigned to this job by @Julesssss!
Please apply to this job in Upwork 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 📖

@PrashantMangukiya
Copy link
Contributor

@Julesssss @aimane-chnaif Thank you. I will prepare and submit PR within three hours asap.

@trjExpensify
Copy link
Contributor

Agree with where we landed here, thanks everyone. 👍

@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Daily KSv2 labels May 29, 2023
@melvin-bot melvin-bot bot changed the title [$1000] Remove checkbox from Money request header [HOLD for payment 2023-06-05] [$1000] Remove checkbox from Money request header May 29, 2023
@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label May 29, 2023
@melvin-bot
Copy link

melvin-bot bot commented May 29, 2023

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

@melvin-bot
Copy link

melvin-bot bot commented May 29, 2023

The solution for this issue has been 🚀 deployed to production 🚀 in version 1.3.19-7 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-06-05. 🎊

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.

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 May 29, 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:

  • [@aimane-chnaif] The PR that introduced the bug has been identified. Link to the PR:
  • [@aimane-chnaif] 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:
  • [@aimane-chnaif] 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:
  • [@aimane-chnaif] Determine if we should create a regression test for this bug.
  • [@aimane-chnaif] 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.
  • [@tjferriss] 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 Overdue and removed Weekly KSv2 labels Jun 5, 2023
@PrashantMangukiya
Copy link
Contributor

Ping for Upwork.

@melvin-bot melvin-bot bot removed the Overdue label Jun 7, 2023
@tjferriss
Copy link
Contributor

tjferriss commented Jun 7, 2023

Sorry for the delay. All offers have been sent via Upworks and I'll process payment as they're accepted. @PrashantMangukiya and @aimane-chnaif will get the 50% speed bonus.

@aimane-chnaif can you please help out with the checklist?

@PrashantMangukiya
Copy link
Contributor

@tjferriss Offer accepted. Thank you.

@aimane-chnaif
Copy link
Contributor

can you please help out with the checklist?

This is not a bug but feature.
Regression tests will be updated more broadly for the manual requests redesign.
So all items can be checked off.

@tjferriss
Copy link
Contributor

All the payments have been sent.

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
Projects
None yet
Development

No branches or pull requests

10 participants