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-04-13] [$1000] Tooltip isn’t shown in previous or next arrow while viewing images ( in web) #16721

Closed
1 of 6 tasks
kavimuru opened this issue Mar 29, 2023 · 36 comments
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 Mar 29, 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. Go to any chat ( Make sure it has at least 2 /3 images as attachments sent/received)
  2. Open any attached file
  3. Hover to previous/Next arrow and notice there isn’t any tooltip shown.
  4. However, in other icons like download and close, it’s shown. Even in slack previous/next buttons have tooltip.

Expected Result:

Tooltip over hover in previous/next icons would be more user friendly.

Actual Result :

Tooltip isn’t shown over hover on previous/next button..

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.2.91-1
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-03-28.at.2.10.46.PM.mov
Recording.94.mp4

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

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~017dee6b921c17a9dc
  • Upwork Job ID: 1641402554168004608
  • Last Price Increase: 2023-03-30
@kavimuru kavimuru added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Mar 29, 2023
@MelvinBot
Copy link

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

@MelvinBot
Copy link

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

@flaviadefaria flaviadefaria added the External Added to denote the issue can be worked on by a contributor label Mar 30, 2023
@melvin-bot melvin-bot bot changed the title Tooltip isn’t shown in previous or next arrow while viewing images ( in web) [$1000] Tooltip isn’t shown in previous or next arrow while viewing images ( in web) Mar 30, 2023
@MelvinBot
Copy link

Job added to Upwork: https://www.upwork.com/jobs/~017dee6b921c17a9dc

@MelvinBot
Copy link

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

@flaviadefaria
Copy link
Contributor

Added the external label.

@MelvinBot
Copy link

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

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

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

@PrashantMangukiya
Copy link
Contributor

Proposal

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

Tooltip isn’t shown in previous or next arrow while viewing images ( in web)

What is the root cause of that problem?

Both left and right button rendered via code below. We can see there is no Tooltip for left (line 166-174) and right (line 177-185) button. So this it the root cause of the problem i.e. Tooltip not shown.

{!this.state.isBackDisabled && (
<Button
medium
style={[styles.leftAttachmentArrow]}
innerStyles={[styles.arrowIcon]}
icon={Expensicons.BackArrow}
iconFill={themeColors.text}
iconStyles={[styles.mr0]}
onPress={() => this.cycleThroughAttachments(-1)}
/>
)}
{!this.state.isForwardDisabled && (
<Button
medium
style={[styles.rightAttachmentArrow]}
innerStyles={[styles.arrowIcon]}
icon={Expensicons.ArrowRight}
iconFill={themeColors.text}
iconStyles={[styles.mr0]}
onPress={() => this.cycleThroughAttachments(1)}
/>
)}

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

Here left/right button positioned via absolute position. So we have to use View and move styles.leftAttachmentArrow to View component, put Tooltip and Button within View as shown below code. So it will show proper tooltip as shown in Result video below:

  {!this.state.isBackDisabled && (
      <View style={styles.leftAttachmentArrow}>
          <Tooltip text={this.props.translate('common.previous')}>
              <Button
                  medium
                  //style={[styles.leftAttachmentArrow]}  // *** Moved style to View  ***
                  innerStyles={[styles.arrowIcon]}
                  icon={Expensicons.BackArrow}
                  iconFill={themeColors.text}
                  iconStyles={[styles.mr0]}
                  onPress={() => this.cycleThroughAttachments(-1)}
              />
          </Tooltip>
      </View>
  )}
  {!this.state.isForwardDisabled && (
      <View style={styles.rightAttachmentArrow}>
          <Tooltip text={this.props.translate('common.next')}>
              <Button
                  medium
                  //style={[styles.rightAttachmentArrow]}   // *** Moved style to View  ***
                  innerStyles={[styles.arrowIcon]}
                  icon={Expensicons.ArrowRight}
                  iconFill={themeColors.text}
                  iconStyles={[styles.mr0]}
                  onPress={() => this.cycleThroughAttachments(1)}
              />
          </Tooltip>
      </View>
  )}

Within src/components/AttachmentCarousel/index.js We have to export using withLocalise, So export statement should be changed as shown below

// OLD CODE 
// export default withOnyx({
//     reportActions: {
//         key: ({reportID}) => `${ONYXKEYS.COLLECTION.REPORT_ACTIONS}${reportID}`,
//         canEvict: false,
//     },
// })(AttachmentCarousel);

// New code with compose
export default compose(
    withOnyx({
        reportActions: {
            key: ({reportID}) => `${ONYXKEYS.COLLECTION.REPORT_ACTIONS}${reportID}`,
            canEvict: false,
        },
    }),
    withLocalize,
)(AttachmentCarousel);

Within src/languages/en.js add common.previous translation key as shown below

common: {
 ...,
  next: 'Next',       // **** Already exist
  previous: 'Previous',  //  **** Not exist, So we have to add
 ...
}

Within src/languages/es.js file we have to add common.previous translation key as shown below

common: {
 ...,
  next: 'Siguiente',      // **** Already exist
  previous: 'Previo',     //  **** Not exist, So we have to add
 ...
}

Note: Spanish translation previous: 'Previo' taken from google at present, we will consider translation suggested by team.

What alternative solutions did you explore? (Optional)

None

Result
TooltipPrevNext.mov

@MelvinBot
Copy link

📣 @DeriFirgiawan! 📣

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. 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.
  2. 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.
  3. 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>

@Prince-Mendiratta
Copy link
Contributor

@DeriFirgiawan I can see this is your first time contributing, welcome.

Do go through the Contribution Guidelines once. It isn't recommended to post code diffs in your proposal, try to explain what changes you want to propose in plain English.

Cheers.

@Santhosh-Sellavel
Copy link
Collaborator

@DeriFirgiawan Please go Contribution Guidelines and understand process. Avoid posting redundant proposals. Follow our proposal guidelines in the future thanks.

@Santhosh-Sellavel
Copy link
Collaborator

@NikkiWines this is a fairly straightforward one, let's go with @PrashantMangukiya proposal here.

@PrashantMangukiya

Reminder: Please use plain English, be brief and avoid jargon. Feel free to use images, charts or pseudo-code if necessary. Do not post large multi-line diffs or write walls of text.

Could have explained this one briefly, no need to include the whole code & diffs here, thanks!

@PrashantMangukiya
Copy link
Contributor

@Santhosh-Sellavel got it. Thanks.

@PrashantMangukiya
Copy link
Contributor

Waiting for @NikkiWines to assign project, So thereafter we can proceed to create pr.

@melvin-bot melvin-bot bot added the Overdue label Apr 3, 2023
@MelvinBot
Copy link

@NikkiWines, @flaviadefaria, @Santhosh-Sellavel Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

@flaviadefaria
Copy link
Contributor

@NikkiWines are we good to assign them?

@melvin-bot melvin-bot bot removed the Overdue label Apr 3, 2023
@NikkiWines
Copy link
Contributor

NikkiWines commented Apr 3, 2023

Sorry, missed this assignment on Friday. Agreed with @Santhosh-Sellavel that @PrashantMangukiya's proposal looks good! Feel free to assign them @flaviadefaria 🙇

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

📣 @PrashantMangukiya You have been assigned to this job by @flaviadefaria!
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

@NikkiWines @Santhosh-Sellavel PR is ready for review.

@Santhosh-Sellavel
Copy link
Collaborator

Santhosh-Sellavel commented Apr 3, 2023

@NikkiWines or @flaviadefaria Can anyone confirm Spanish copy is good?

@NikkiWines
Copy link
Contributor

We should use Anterior for Previous

@PrashantMangukiya
Copy link
Contributor

@NikkiWines Thanks for the Spanish copy.
@Santhosh-Sellavel PR desc and screenshot updated as per Spanish copy i.e. Anterior
You can proceed for review. Thank You.

@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Daily KSv2 labels Apr 6, 2023
@melvin-bot melvin-bot bot changed the title [$1000] Tooltip isn’t shown in previous or next arrow while viewing images ( in web) [HOLD for payment 2023-04-13] [$1000] Tooltip isn’t shown in previous or next arrow while viewing images ( in web) Apr 6, 2023
@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Apr 6, 2023
@MelvinBot
Copy link

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

@MelvinBot
Copy link

The solution for this issue has been 🚀 deployed to production 🚀 in version 1.2.95-0 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-04-13. 🎊

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

@MelvinBot
Copy link

MelvinBot commented Apr 6, 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:

@melvin-bot melvin-bot bot added Daily KSv2 Overdue and removed Weekly KSv2 labels Apr 12, 2023
@PrashantMangukiya
Copy link
Contributor

Ping for Upwork

@melvin-bot melvin-bot bot removed the Overdue label Apr 13, 2023
@PrashantMangukiya
Copy link
Contributor

Ping For Upwork.

@melvin-bot melvin-bot bot added the Overdue label Apr 17, 2023
@flaviadefaria
Copy link
Contributor

Sorry I was OoO, this had a weekly priority so I didn't reassign it. I'll get to ti by tomorrow at the latest.

@melvin-bot melvin-bot bot removed the Overdue label Apr 17, 2023
@flaviadefaria
Copy link
Contributor

@PrashantMangukiya @Santhosh-Sellavel $1000 + $500 bonus = $1500 payment for both
@ashimsharma10 - $250 for reporting

I believe we'll need a regression test for this, @Santhosh-Sellavel can you please propose the the regression test steps? Thanks!

@PrashantMangukiya
Copy link
Contributor

@flaviadefaria Offer accepted on Upwork.

@Santhosh-Sellavel
Copy link
Collaborator

Thanks accepted!

@Santhosh-Sellavel
Copy link
Collaborator

Regression Steps

Steps from PR look good to me

  1. Open App on Web or Desktop
  2. Go to any chat (Make sure at least 2 /3 images are there as attachments sent/received)
  3. Click to open any attached image/file.
  4. Hover over the Previous/Next Button and Verify that it shows the tooltip.
  5. For English tooltip will be "Previous" and "Next"
  6. For Spanish tooltip will be "Anterior" and "Siguiente"

cc: @flaviadefaria @NikkiWines

@melvin-bot melvin-bot bot added the Overdue label Apr 21, 2023
@flaviadefaria
Copy link
Contributor

All done, closing!

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

8 participants
@PrashantMangukiya @MelvinBot @NikkiWines @kavimuru @Prince-Mendiratta @flaviadefaria @Santhosh-Sellavel and others