-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
Fix 25% opacity in MoneyRequestView and TaskView #27830
Merged
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are you 100% confident that this is the same case? In the case of
MoneyRequestView
, you observed that the removed pending actionprops.action.pendingAction
is equivalent to the existing conditions|| lodashGet(transaction, 'pendingAction')}
. I cannot see such a pattern in the case ofTaskView
.I agree that it's great to fix another code fragment if it has an issue with the same root cause, but we're also responsible for all potential regressions we introduce.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, we can see the
report.pendingFields
andaction.pendingAction
both havingCONST.RED_BRICK_ROAD_PENDING_ACTION.ADD
value when creating a task.App/src/components/ReportActionItem/TaskView.js
Line 79 in 52dc94d
App/src/libs/actions/Task.js
Lines 94 to 99 in 52dc94d
App/src/libs/ReportUtils.js
Line 2388 in 52dc94d
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it different from how it works in case of
IOU
actions?What I'm trying to figure out is why the pattern of checking for pendingActions is different in
TaskView
andMoneyRequestView
, i.e. that inMoneyRequestView
we always check for either the outer pending action or for the field-level pending action, and inTaskView
we only check for the field-level pending actions.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I also see the different patterns between them. When creating,
in
TaskView
, we havependingFields
in the optimistic data. But inMoneyRequestView
, we only have them when we update the fields. That's why we need to check|| lodashGet(transaction, 'pendingAction')
foradd
pending.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Both
IOU
andTask
actions have a similar set of operations, so I can't see a reason for these patterns to differ. But maybe we're exceeding the scope of this issue now...Still, I think that if we're aware of these possible different combinations of pending actions (field-level vs the outer pending action), we should cover them in tests. Would you be able to describe the tests which ensure that the discussed
||
alternative works as expected after the PR changes?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And, if possible, tests that affect tasks fields separately, demonstrating that such an alternative check is not needed, and we didn't break anything by removing the outer
OfflineWithFeedback
wrapper for tasks.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What do you think about it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks fine 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I updated the steps and videos.