Closed m-natarajan closed 1 month ago
Triggered auto assignment to @sakluger (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.
Triggered auto assignment to @Beamanator (DeployBlockerCash
), see https://stackoverflowteams.com/c/expensify/questions/9980/ for more details.
:wave: Friendly reminder that deploy blockers are time-sensitive β± issues! Check out the open `StagingDeployCash` deploy checklist to see the list of PRs included in this release, then work quickly to do one of the following:
Missing green unread line after marking first expense as unread in expense report
In this case we don't display the UnreadActionIndicator
component because the shouldUseThreadDividerLine
and isFirstVisibleReportAction
value is both true
https://github.com/Expensify/App/blob/f3a8f736208166286e6f7da3562f1503d5ef2a3d/src/pages/home/report/ReportActionItem.tsx#L913
Change this code to the following to display the UnreadActionIndicator
component if only shouldDisplayNewMarker
is true, since we already handled to hide the divider if the shouldHideThreadDividerLine
is true. And additionally we need to pass shouldHideThreadDividerLine
param to keep the space the same
{shouldDisplayNewMarker && <UnreadActionIndicator reportActionID={action.reportActionID} shouldHideThreadDividerLine={shouldHideThreadDividerLine} />}
RESULT
@nyomanjyotisa thanks for your proposal! Can you also help us figure out what PR may have caused this bug?
Job added to Upwork: https://www.upwork.com/jobs/~012c73811fb416526a
Triggered auto assignment to Contributor-plus team member for initial proposal review - @allroundexperts (External
)
The line separator below "Total" disappears after marking the first expense as unread. There is no green unread line.
When evaluating shouldUseThreadDividerLine
, we're not taking into account the shouldHideThreadDividerLine
condition here. So for the first expense, it has shouldUseThreadDividerLine
true and shouldHideThreadDividerLine
also true, that doesn't make sense because the divider line cannot be used
and hide
at the same time.
This problem causes the condition here to evaluate to false, because shouldUseThreadDividerLine
is true while it shouldn't be. So the unread marker does not show.
Check shouldHideThreadDividerLine
here too. If the shouldHideThreadDividerLine
is true
, the shouldHideThreadDividerLine
should be false
because the divider line will not be used
if (shouldHideThreadDividerLine) {
return false;
}
Optionally, we can pass shouldHideThreadDividerLine
as param to UnreadActionIndicator
here, to be consistent in style with the UnreadActionIndicator
here
I think it may not be necessary (and is quite confusing) for shouldHideThreadDividerLine
and shouldUseThreadDividerLine
to exist as 2 different variables, because they are opposite of each other. We can consolidate them into one by combining the checks in both here and here and use them consistently throughout.
I updated the proposal to add an alternative approach to solve the issue.
The line separator below "Total" disappears after marking the first expense as unread. There is no green unread line.
In MoneyReportView
, we only display the divider here so when the first expense is marked as unread, shouldHideThreadDividerLine
is true and then nothing displays.
We should use renderThreadDivider
that we used here in MoneyReportView
to cover the case the first expense is unread
const renderThreadDivider = useMemo(
() =>
shouldHideThreadDividerLine && !isCombinedReport ? (
<UnreadActionIndicator
reportActionID={report.reportID}
shouldHideThreadDividerLine={shouldHideThreadDividerLine}
/>
) : (
<SpacerView
shouldShow={!shouldHideThreadDividerLine}
style={[!shouldHideThreadDividerLine ? styles.reportHorizontalRule : {}]}
/>
),
[shouldHideThreadDividerLine, report.reportID, styles.reportHorizontalRule, isCombinedReport],
);
{(shouldShowReportField || shouldShowBreakdown || shouldShowTotal) && renderThreadDivider}
Thanks for all the proposals so far. Can anyone identify what PR caused the regression though? It seems like all of suggested code changes aren't in code that changed recently.
Demoting this because:
@dominictb @daledah @nyomanjyotisa With any deploy blocker, always include the PR that introduced the regression
@mountiny Thanks for your feedback. I have noted it.
While investigating, I think it's maybe related to this PR. But when I went to this PR, I saw it was deployed to production 4 days ago. So I'm not sure what PR caused this issue.
@allroundexperts mind reviewing this one? I'd also love to get to the bottom of how this happened, as this must have only happened recently π€
@Beamanator, @sakluger, @allroundexperts Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!
On it today.
π£ It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? πΈ
Melv I'll be reviewing this today.
@dominictb Can you please post a video of your solution in action? I can't seem to make it work by applying your changes.
@allroundexperts I tested and it works well. My solution is replace the SpaceView
here with renderThreadDivider
https://github.com/user-attachments/assets/616c4608-6f0e-4d38-bf83-0d963e6dc6e5
@Beamanator @sakluger @allroundexperts this issue was created 2 weeks ago. Are we close to approving a proposal? If not, what's blocking us from getting this issue assigned? Don't hesitate to create a thread in #expensify-open-source to align faster in real time. Thanks!
Thanks for the proposals everyone!
@dominictb's proposal looks better to me as it utilises an already used piece of code in another component.
π π π C+ reviewed
Current assignee @Beamanator is eligible for the choreEngineerContributorManagement assigner, not assigning anyone new.
π£ @dominictb π 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 π
This issue has not been updated in over 15 days. @Beamanator, @sakluger, @allroundexperts, @dominictb eroding to Monthly issue.
P.S. Is everyone reading this sure this is really a near-term priority? Be brave: if you disagree, go ahead and close it out. If someone disagrees, they'll reopen it, and if they don't: one less thing to do!
@Beamanator @sakluger I think this is long ready for payment
Oof yep, this probably got merged & deployed when our automation was broken π
Sorry about that!
Summarizing payment on this issue:
Contributor: @dominictb $250, paid via Upwork Contributor+: @allroundexperts $250, please request on Newdot
@allroundexperts do we need any new regression tests?
Pasting the BZ checklist here for convenience.
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:
[@allroundexperts] The PR that introduced the bug has been identified. Link to the PR: [@allroundexperts] 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: [@allroundexperts] 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: [@allroundexperts] Determine if we should create a regression test for this bug. [@allroundexperts] 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.
Verify that the line separator below "Total" will change to a green line with "New" label on the right.
Do we π or π ?
Looks good to me. Thanks!
$250 approved for @allroundexperts
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: 9.0.10-2 Reproducible in staging?: y Reproducible in production?: n If this was caught during regression testing, add the test name, ID and link from TestRail: n/a Email or phone of affected tester (no customers): Logs: https://stackoverflow.com/c/expensify/questions/4856 Expensify/Expensify Issue URL: Issue reported by: Applause internal team Slack conversation:
Action Performed:
Expected Result:
The line separator below "Total" will change to a green line with "New" label on the right.
Actual Result:
The line separator below "Total" disappears after marking the first expense as unread. There is no green unread line.
Workaround:
unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Screenshots/Videos
https://github.com/user-attachments/assets/fab12199-180b-42f6-ad99-bcc654454ad1
View all open jobs on GitHub
Upwork Automation - Do Not Edit
Issue Owner
Current Issue Owner: @sakluger