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-21] [$1000] Dev: Only description's text has reduced opacity when it's disabled #19232

Closed
1 of 6 tasks
kavimuru opened this issue May 18, 2023 · 37 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 Engineering External Added to denote the issue can be worked on by a contributor Needs Reproduction Reproducible steps needed

Comments

@kavimuru
Copy link

kavimuru commented May 18, 2023

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


Action Performed:

  1. Login to ND
  2. Click on FAB
  3. Assign a task
  4. Mark it as done

Expected Result:

The values of both the description and title should be displayed with reduced opacity.

Actual Result :

Only description's text has reduced opacity

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: Main branch
Reproducible in staging?: needs reproduction
Reproducible in production?: needs reproduction
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-16.at.11.52.01.PM.1.mov

Expensify/Expensify Issue URL:
Issue reported by: @aman-atg
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1684262325244699

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~015756347dcee86389
  • Upwork Job ID: 1666089075589812224
  • Last Price Increase: 2023-06-06
@kavimuru kavimuru added Daily KSv2 Needs Reproduction Reproducible steps needed Bug Something is broken. Auto assigns a BugZero manager. labels May 18, 2023
@melvin-bot
Copy link

melvin-bot bot commented May 18, 2023

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

@melvin-bot
Copy link

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

@ahmedGaber93
Copy link
Contributor

ahmedGaber93 commented May 19, 2023

Proposal

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

task header description's text has reduced opacity when it's disabled.
I think the Expected Result is the both fields should be without opacity, not with opacity, to be consistent with MoneyRequestHeader.

What is the root cause of that problem?

After make the task mark as done, we disable the item to disable edit it, But we use different style for item disabled here.

props.interactive && props.disabled ? {...styles.disabledText, ...styles.userSelectNone} : undefined,

the disable style work for task description, but not work for task title because title has additional prop shouldShowHeaderTitle which override disabled text color.

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

Solution A

set titleStyle={styles.colorHeading} for MenuItemWithTopDescription here to override disabled color like this.

  <MenuItemWithTopDescription
      title={lodashGet(props.report, 'description', '')}
      description="Description"
      onPress={() => Navigation.navigate(ROUTES.getTaskReportDescriptionRoute(props.report.reportID))}
      disabled={!isOpen}
      titleStyle={styles.colorHeading} // <<<<<<<<< add this prop
  />

Solution B

add prop shouldShowHeaderTitle to task description to be same as task title.

What alternative solutions did you explore? (Optional)

@aman-atg
Copy link
Contributor

aman-atg commented May 19, 2023

Proposal

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

Only description's text has reduced opacity when it's disabled

What is the root cause of that problem?

It is caused by adding this line which overrides the above styles

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

We should move it to the top of "disabled styles" like below which will resolve the issue.

            styles.popoverMenuText,
            props.icon ? styles.ml3 : undefined,
            props.shouldShowBasicTitle ? undefined : styles.textStrong,
            props.shouldShowHeaderTitle ? styles.textHeadlineH1 : undefined,
            props.interactive && props.disabled ? {...styles.disabledText, ...styles.userSelectNone} : undefined,
            styles.pre,
            styles.ltr,
            isDeleted ? styles.offlineFeedback.deleted : undefined,

As per the new requirements, we now have two options for Task header MenuItems :-

1. No reduced opacity and default cursor

To get this, we just need to use interactive prop and remove the disabled prop like below

Code
            <MenuItemWithTopDescription
                shouldShowHeaderTitle
                title={props.report.reportName}
                description={props.translate('newTaskPage.task')}
                onPress={() => Navigation.navigate(ROUTES.getTaskReportTitleRoute(props.report.reportID))}
                interactive={isOpen}
            />
            <MenuItemWithTopDescription
                title={lodashGet(props.report, 'description', '')}
                description={props.translate('newTaskPage.description')}
                onPress={() => Navigation.navigate(ROUTES.getTaskReportDescriptionRoute(props.report.reportID))}
                interactive={isOpen}
            />
Result
interactive.mp4

2. No reduced opacity and not-allowed cursor

To get this, we need to use both disabled and interactive props like below

Code
            <MenuItemWithTopDescription
                shouldShowHeaderTitle
                title={props.report.reportName}
                description={props.translate('newTaskPage.task')}
                onPress={() => Navigation.navigate(ROUTES.getTaskReportTitleRoute(props.report.reportID))}
                interactive={isOpen}
                disabled={!isOpen}
            />
            <MenuItemWithTopDescription
                title={lodashGet(props.report, 'description', '')}
                description={props.translate('newTaskPage.description')}
                onPress={() => Navigation.navigate(ROUTES.getTaskReportDescriptionRoute(props.report.reportID))}
                interactive={isOpen}
                disabled={!isOpen}
            />
Result
disabled.mp4

@johncschuster
Copy link
Contributor

I don't think this is a bug. (Asking in Slack)

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

melvin-bot bot commented May 22, 2023

@johncschuster Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

@melvin-bot
Copy link

melvin-bot bot commented May 24, 2023

@johncschuster Eep! 4 days overdue now. Issues have feelings too...

@melvin-bot
Copy link

melvin-bot bot commented May 26, 2023

@johncschuster Still overdue 6 days?! Let's take care of this!

@johncschuster
Copy link
Contributor

Ok! It's a bug. 😅

Sharing the discussion about the intended behavior since it happened in a channel that is not shared:

2023-05-30_07-31-02

@melvin-bot
Copy link

melvin-bot bot commented May 30, 2023

Triggered auto assignment to @Gonals (Engineering), see https://stackoverflow.com/c/expensify/questions/4319 for more details.

@melvin-bot
Copy link

melvin-bot bot commented Jun 1, 2023

@johncschuster @Gonals this issue was created 2 weeks ago. Are we close to a solution? Let's make sure we're treating this as a top priority. Don't hesitate to create a thread in #expensify-open-source to align faster in real time. Thanks!

@melvin-bot melvin-bot bot added the Overdue label Jun 1, 2023
@melvin-bot
Copy link

melvin-bot bot commented Jun 2, 2023

@johncschuster, @Gonals Whoops! This issue is 2 days overdue. Let's get this updated quick!

@johncschuster
Copy link
Contributor

@Gonals do any of the above proposals look good to you?

@melvin-bot melvin-bot bot removed the Overdue label Jun 5, 2023
@Gonals
Copy link
Contributor

Gonals commented Jun 6, 2023

I think @aman-atg proposal looks a bit cleaner, but how come we don't have a C+ on this issue, @johncschuster?

@johncschuster
Copy link
Contributor

Oh geez. Cuz I forgot to click the External label. 🤦

@johncschuster johncschuster added the External Added to denote the issue can be worked on by a contributor label Jun 6, 2023
@melvin-bot melvin-bot bot changed the title Dev: Only description's text has reduced opacity when it's disabled [$1000] Dev: Only description's text has reduced opacity when it's disabled Jun 6, 2023
@melvin-bot
Copy link

melvin-bot bot commented Jun 6, 2023

Job added to Upwork: https://www.upwork.com/jobs/~015756347dcee86389

@melvin-bot
Copy link

melvin-bot bot commented Jun 6, 2023

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

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

melvin-bot bot commented Jun 9, 2023

📣 @aman-atg You have been assigned to this job by @Gonals!
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 📖

@melvin-bot melvin-bot bot added the Reviewing Has a PR in review label Jun 9, 2023
@aman-atg
Copy link
Contributor

aman-atg commented Jun 9, 2023

PR is ready @sobitneupane.

@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Daily KSv2 labels Jun 14, 2023
@melvin-bot melvin-bot bot changed the title [$1000] Dev: Only description's text has reduced opacity when it's disabled [HOLD for payment 2023-06-21] [$1000] Dev: Only description's text has reduced opacity when it's disabled Jun 14, 2023
@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Jun 14, 2023
@melvin-bot
Copy link

melvin-bot bot commented Jun 14, 2023

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

@melvin-bot
Copy link

melvin-bot bot commented Jun 14, 2023

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

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 Jun 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:

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

@sobitneupane Can you complete the BZ Checklist when you get a moment?

@melvin-bot melvin-bot bot removed the Overdue label Jun 26, 2023
@johncschuster
Copy link
Contributor

@aman-atg / @sobitneupane can you apply to the Upwork job above? Thanks!

@melvin-bot melvin-bot bot added the Overdue label Jun 28, 2023
@johncschuster
Copy link
Contributor

NVM – I've invited you both!

@melvin-bot melvin-bot bot removed the Overdue label Jun 28, 2023
@aman-atg
Copy link
Contributor

@johncschuster I have accepted the offer, thank you!

@sobitneupane
Copy link
Contributor

sobitneupane commented Jul 3, 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:

  • [@sobitneupane] The PR that introduced the bug has been identified. Link to the PR:

#18806

  • [@sobitneupane] 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:

#18806 (comment)

  • [@sobitneupane] 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:

I think this is resulted by change in design rather than a bug. So, it couldn't have caught earlier.

@sobitneupane
Copy link
Contributor

Regression Test Proposal

  1. Login to ND
  2. Click on FAB icon
  3. Assign a task and add some description.
  4. Mark it as done
  5. Verify that the opacity for Task's text and Description's text are not reduced & not-allowed cursor is being shown

Do we agree 👍 or 👎

@melvin-bot melvin-bot bot added the Overdue label Jul 3, 2023
@johncschuster
Copy link
Contributor

Regression test issue created^

@melvin-bot melvin-bot bot removed the Overdue label Jul 5, 2023
@johncschuster
Copy link
Contributor

Payment has been issued!

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 Engineering External Added to denote the issue can be worked on by a contributor Needs Reproduction Reproducible steps needed
Projects
None yet
Development

No branches or pull requests

6 participants