Expensify / App

Welcome to New Expensify: a complete re-imagination of financial collaboration, centered around chat. Help us build the next generation of Expensify by sharing feedback and contributing to the code.
https://new.expensify.com
MIT License
3.49k stars 2.84k forks source link

[HOLD for payment 2024-06-13] [$125] Fix inconsistency with task details view #42354

Closed thienlnam closed 4 months ago

thienlnam commented 5 months ago

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: Reproducible in staging?: Reproducible in production?: 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: Slack conversation: https://github.com/Expensify/App/pull/40858#issuecomment-2118039788

Action Performed:

  1. Create a task
  2. Click on the task details page

Expected Result:

The details view should match the report header view like these other report types image

Actual Result:

Currently the task details page just shows the task title image

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?

Screenshots/Videos

Add any screenshot/video evidence

View all open jobs on GitHub

Issue OwnerCurrent Issue Owner: @
Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01d9c0a9595a888d2c
  • Upwork Job ID: 1791555314142978048
  • Last Price Increase: 2024-05-24
  • Automatic offers:
    • GandalfGwaihir | Contributor | 102506848
Issue OwnerCurrent Issue Owner: @
Issue OwnerCurrent Issue Owner: @joekaufmanexpensify
melvin-bot[bot] commented 5 months ago

Triggered auto assignment to @joekaufmanexpensify (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details. Please add this bug to a GH project, as outlined in the SO.

melvin-bot[bot] commented 5 months ago

Unable to auto-create job on Upwork. The BZ team member should create it manually for this issue.

melvin-bot[bot] commented 5 months ago

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

melvin-bot[bot] commented 5 months ago

Unable to auto-create job on Upwork. The BZ team member should create it manually for this issue.

melvin-bot[bot] commented 5 months ago

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

melvin-bot[bot] commented 5 months ago

Job added to Upwork: https://www.upwork.com/jobs/~01d9c0a9595a888d2c

melvin-bot[bot] commented 5 months ago

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

melvin-bot[bot] commented 5 months ago

Upwork job price has been updated to $125

allgandalf commented 5 months ago

Proposal

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

Inconsistency in subtitle for task

What is the root cause of that problem?

We do not add subtitle if the report is a task: https://github.com/Expensify/App/blob/e8ae3c5acedf0e6788dc574c7b6f3043ca37092a/src/pages/ReportDetailsPage.tsx#L312

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

Add a extra or check || as ReportUtils.isTaskReport(report), or create a separate variable isTaskReport.

So the updated condition will now be:


{!isEmptyObject(parentNavigationSubtitleData) && (isMoneyRequestReport || isInvoiceReport || isMoneyRequest || ReportUtils.isTaskReport(report)) && (

We can consolidate the ReportUtils.isTaskReport(report) function by assigning this value to a variable isTaskReport.

Result Screenshot

Screenshot 2024-05-18 at 1 16 52β€―AM
nkdengineer commented 5 months ago

Proposal

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

The incorrect number of tags is shown, "3 selected" is shown instead of "2 selected"

What is the root cause of that problem?

For the header view, we always show the parent subtitle if parentNavigationSubtitleData isn't not empty

https://github.com/Expensify/App/blob/e8ae3c5acedf0e6788dc574c7b6f3043ca37092a/src/pages/home/HeaderView.tsx#L283

https://github.com/Expensify/App/blob/e8ae3c5acedf0e6788dc574c7b6f3043ca37092a/src/components/AvatarWithDisplayName.tsx#L140

But in ReportDetailPage, we only show this for some specials report

https://github.com/Expensify/App/blob/e8ae3c5acedf0e6788dc574c7b6f3043ca37092a/src/pages/ReportDetailsPage.tsx#L312

That is an inconsistency

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

To consistent with the header view, we should always show the parent subtitle here by removing the check for special report

{!isEmptyObject(parentNavigationSubtitleData) && (
    <ParentNavigationSubtitle
        parentNavigationSubtitleData={parentNavigationSubtitleData}
        parentReportID={report?.parentReportID}
        parentReportActionID={report?.parentReportActionID}
        pressableStyles={[styles.mt1, styles.mw100]}
    />
)}

https://github.com/Expensify/App/blob/e8ae3c5acedf0e6788dc574c7b6f3043ca37092a/src/pages/ReportDetailsPage.tsx#L312

What alternative solutions did you explore? (Optional)

NA

joekaufmanexpensify commented 5 months ago

@thienlnam should we instead do this as part of the detailed revamp design doc implementation? It seems like we are changing the pattern for the details page of expense reports and transaction threads there.

cc @JmillsExpensify

joekaufmanexpensify commented 5 months ago

Still pending further discussion

joekaufmanexpensify commented 5 months ago

Same

NJ-2020 commented 5 months ago

Proposal

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

Inconsistency with detail view panel

What is the root cause of that problem?

The detail view only shows subtitles when the report has subtitles, and shows parent subtitles on certain pages only. https://github.com/Expensify/App/blob/e8ae3c5acedf0e6788dc574c7b6f3043ca37092a/src/pages/ReportDetailsPage.tsx#L312-L319

When the room has a policy name, the detail view only displays the subtitle instead of threads.in and the policy name.

Also, it displayed a subtitle instead of a policy description when we have a policy description and we're inside the policy expense chat.

For Profile details, we do not have any subtitles.

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

We can display the subtitle only if we do not have a policy and room description, and display the parent subtitle only when we have the data, and display the policy name if it does not match the below condition https://github.com/Expensify/App/blob/f545b0790e5c9175fbef7762793c78e7a6ae5e53/src/pages/home/HeaderView.tsx#L187 we can display it with threads.in at the front of the text and if we have a policy description we will show it instead of the subtitle.

We need to add a subtitle for the profile detail view

I've fixed it and it's working successfully

https://github.com/Expensify/App/assets/76243292/86fca813-0224-4276-9b42-6b836d25cdd1

What alternative solutions did you explore? (Optional)

joekaufmanexpensify commented 5 months ago

In progress

melvin-bot[bot] commented 5 months ago

πŸ“£ It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? πŸ’Έ

Ollyws commented 4 months ago

@GandalfGwaihir's proposal LGTM.

πŸŽ€πŸ‘€πŸŽ€ C+ reviewed

melvin-bot[bot] commented 4 months ago

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

nkdengineer commented 4 months ago

@Ollyws I think for consistency, in ReportDetailsPage we should always show the parent subtitle if parentNavigationSubtitleData is not empty as we do in HeaderView and AvatarWithDisplayName.

joekaufmanexpensify commented 4 months ago

Waiting for proposal sign off

thienlnam commented 4 months ago

@joekaufmanexpensify That could work, my concern is that we'll forget to do that later for tasks and it will remain un-updated. This is a quick one we can knock out now so if you're alright with it I think we should just move forward with this

joekaufmanexpensify commented 4 months ago

Works for me!

lakchote commented 4 months ago

@GandalfGwaihir's proposal LGTM.

melvin-bot[bot] commented 4 months ago

πŸ“£ @GandalfGwaihir πŸŽ‰ An offer has been automatically sent to your Upwork account for the Contributor role πŸŽ‰ Thanks for contributing to the Expensify app!

Offer link 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 πŸ“–

joekaufmanexpensify commented 4 months ago

Great! @GandalfGwaihir could you please share when you can have a PR up?

allgandalf commented 4 months ago

Was AFK, got back to keyboard just now, let me quickly come up with a PR ASAP! working now

allgandalf commented 4 months ago

PR was merged, waiting to be deployed to staging πŸ‘

joekaufmanexpensify commented 4 months ago

Great. TY!

melvin-bot[bot] commented 4 months ago

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

melvin-bot[bot] commented 4 months ago

The solution for this issue has been :rocket: deployed to production :rocket: in version 1.4.79-11 and is now subject to a 7-day regression period :calendar:. Here is the list of pull requests that resolve this issue:

If no regressions arise, payment will be issued on 2024-06-13. :confetti_ball:

For reference, here are some details about the assignees on this issue:

melvin-bot[bot] commented 4 months ago

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:

joekaufmanexpensify commented 4 months ago

@Ollyws offer sent for $125. Also, could you please complete BZ so we can prep to issue payment?

joekaufmanexpensify commented 4 months ago

@Ollyws Ah, I see you get paid via NewDot now, so withdrew the upwork offer.

Ollyws commented 4 months ago

BugZero Checklist:

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

We haven't enabled this behaviour for task reports since the inception of the details page so I don't think we can pin this on any PR.

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

N/A

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

N/A

  • [x] Determine if we should create a regression test for this bug.

Yes.

  • [x] 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.

Regression Test Proposal

1. Create a task
2. Click on the task details page
3. Verify that subtitle is visible for tasks details page

Do we agree πŸ‘ or πŸ‘Ž

Ollyws commented 4 months ago

Requested in ND.

joekaufmanexpensify commented 4 months ago

TY! This is a pretty minor visual bug, so IDT we need a regression test to be done every time here. So noted this above.

joekaufmanexpensify commented 4 months ago

All set to issue payment. We need to pay:

joekaufmanexpensify commented 4 months ago

@allgandalf $125 sent and contract ended!

joekaufmanexpensify commented 4 months ago

Upwork job closed.

joekaufmanexpensify commented 4 months ago

All set. Thanks everyone!

JmillsExpensify commented 4 months ago

$125 approved for @Ollyws