-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Update optimistic data for parent report when adding comment #20762
Merged
Merged
Changes from all commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
605b92b
update optimistic data for parent report action when add comment in t…
dukenv0307 b1feabd
Merge branch 'main' into fix/19445
dukenv0307 7a76df9
migrate child oldest four accountIDs
dukenv0307 d49491f
Merge branch 'main' into fix/19445
dukenv0307 65c5bf8
update parent report action for deleting action
dukenv0307 bea0b78
fix childVisibleActionCount
dukenv0307 331df50
Merge branch 'main' into fix/19445
dukenv0307 a4d9111
update parent report action for all case
dukenv0307 3b49b05
refactor code of function
dukenv0307 28db4ca
Merge branch 'main' into fix/19445
dukenv0307 0b0f688
check parentReportAction carefully
dukenv0307 4351dcb
Merge branch 'main' into fix/19445
dukenv0307 c34ed38
clear condition
dukenv0307 e7a6d7e
change style in line
dukenv0307 af8a97c
Merge branch 'main' into fix/19445
dukenv0307 7263151
fix bug
dukenv0307 0f41743
merge main
dukenv0307 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
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.
I'm confused why we are adding a commenter based on the
oldestFourAccountIDs
. We want to check that they've never commented in the thread before changing this right?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.
For this case,
oldestFourAccountIDs
.length < 4 and the user isn't already in list that mean this is the first time the user comment, so I think increasechildCommenterCount
for this case makes sense.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 think this should still be extracted outside of the
<4
section actually. With the code you have here, we will only increase thechildCommenterCount
if there are less than 4. We need to increase that regardless of how many people have commented, if it is this user's first time commenting. Right?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.
@stitesExpensify We update
childCommenterCount
for this case because we know for sure that it's the user's first comment. For the case,oldestFourAccountIDs.length === 4
, in FE we don't know the user had commented before or not. So we dont't updatechildCommenterCount
.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.
childCommenterCount
value isn't that important in frontend as long as it meets> 0
.Only used here:
App/src/pages/home/report/ReportActionItem.js
Line 339 in 138a41c