-
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
[HOLD for payment 2023-06-28] [$1000] mweb - Chat - Reaction list does not appear after navigating to chat from member detail #20513
Comments
Triggered auto assignment to @slafortune ( |
Bug0 Triage Checklist (Main S/O)
|
Job added to Upwork: https://www.upwork.com/jobs/~0162c97fe6a772efa5 |
Current assignee @slafortune is eligible for the External assigner, not assigning anyone new. |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @thesahindia ( |
Triggered auto assignment to @francoisl ( |
ProposalPlease re-state the problem that we are trying to solve in this issue.Reaction list does not appear after navigating to chat from member detail What is the root cause of that problem?After re-render we have null instead of ref and get in this part of logic: App/src/pages/home/report/ReactionList/ReactionList.js Lines 14 to 16 in d5374be
What changes do you think we should make in order to solve the problem?
What alternative solutions did you explore? (Optional) |
ProposalPlease re-state the problem that we are trying to solve in this issue.
What is the root cause of that problem?Here we have two issues:
What changes do you think we should make in order to solve the problem?To resolve these two issue we need to do the following:
class ReportScreen extends React.Component {
constructor(props) {
... rest code
this.updateEmojiPickerRef = this.updateEmojiPickerRef.bind(this);
... rest code
this.emojiPickerRef = React.createRef();
}
/**
* Function - Resets Ref for Emoji Picker
* @explanation :
* When the component unmounts the ref sets to null for the Emoji Picker,
* this function resets the ref to the current Emoji Picker's Ref.
*/
updateEmojiPickerRef() {
if(!this.emojiPickerRef.current || EmojiPickerAction.emojiPickerRef.current ) { return; }
EmojiPickerAction.emojiPickerRef.current = this.emojiPickerRef.current;
}
... rest functions
render() {
... rest code
// Function will update the ref if not already set (when the component is re-rendered)
this.updateEmojiPickerRef()
return (
... rest code
// Updated ref will be passed to the EmojiPicker component
<EmojiPicker ref={this.emojiPickerRef} />
... rest code
)
}
}
class ReportActionsView extends React.Component {
constructor(props) {
... rest code
this.updatePopoverReactionListRef = this.updatePopoverReactionListRef.bind(this);
this.popoverReactionListRef = React.createRef();
}
... rest functions
/**
* Function - Resets Ref for PopoverReactionList
* @explanation :
* When the component unmounts the ref sets to null for the PopoverReactionList,
* this function resets the ref to the current PopoverReactionList's Ref.
*/
updatePopoverReactionListRef() {
if(!this.popoverReactionListRef.current || ReactionList.reactionListRef.current) { return; }
ReactionList.reactionListRef.current = this.popoverReactionListRef.current;
}
render() {
... rest code
// Function will update the ref if not already set (when the component is re-rendered)
this.updatePopoverReactionListRef()
return (
... rest code
// Updated ref will be passed to the EmojiPicker component
<PopoverReactionList
ref={ReactionList.reactionListRef}
ref={this.popoverReactionListRef}
reportID={this.props.report.reportID}
/>
... rest code
)
}
} Before Fix:Screen.Recording.2023-06-10.at.2.23.44.AM.movAfter Fix:Screen.Recording.2023-06-10.at.2.22.53.AM.movThank You, |
ProposalPlease re-state the problem that we are trying to solve in this issue.Reaction list modal does not show up anymore after going to another chat from participants list and go back to current chat. What is the root cause of that problem?When we long press the reaction, it will call App/src/components/Reactions/ReportActionItemReactions.js Lines 69 to 71 in 9f1c0e0
As the others explained, the App/src/pages/home/report/ReactionList/ReactionList.js Lines 13 to 19 in 9f1c0e0
The ref we have ( App/src/pages/home/report/ReportActionsView.js Lines 356 to 357 in 9f1c0e0
If
What changes do you think we should make in order to solve the problem?We should replace the global ref with just a local ref.
App/src/pages/home/report/ReportActionsView.js Lines 346 to 347 in 9f1c0e0
4. In ReportActionItemReactions , receive the context with useContext .const reactionListRef = useContext(ReactionListRefContext); 5. We can use this new ref now to open the reaction list reactionListRef.current.showReactionList App/src/components/Reactions/ReportActionItemReactions.js Lines 69 to 71 in 9f1c0e0
|
I think I prefer @bernhardoj's proposal. C+ reviewed 🎀👀🎀 cc: @francoisl |
👍 yeah I like the idea of making the ref local instead, let's go with that proposal. |
📣 @bernhardoj You have been assigned to this job by @francoisl! |
PR is ready for review. |
Based on my calculations, the pull request did not get merged within 3 working days of assignment. Please, check out my computations here:
On to the next one 🚀 |
I think it's still within 3 days, right? |
@bernhardoj - yep, I think Melvin messed up math there! |
|
The solution for this issue has been 🚀 deployed to production 🚀 in version 1.3.29-11 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-28. 🎊 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:
|
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:
|
@francoisl, @slafortune, @bernhardoj, @thesahindia Uh oh! This issue is overdue by 2 days. Don't forget to update your issues! |
@bernhardoj @thesahindia offers sent! @thesahindia can you please complete the checklist? |
We can skip it. We shouldn't call it a regression. It was an edge case that we couldn't have thought about. If we want we can add a test case for this. Steps -
|
@slafortune, I am going to request money on new dot, so no need to pay me on Upwork. |
@slafortune Can you please leave a payment summary for this issue so that I can issue payment via NewDot? |
Hey @slafortune can you please confirm the C+ compensation on this issue? I believe it was $1500 since it was eligible for the speed bonus. |
Oh yes, you are correct - and Melvin had a hard time with math - #20513 (comment) @JmillsExpensify |
Reviewed the details for @thesahindia. $1,500 approved for payment via NewDot based on BZ summary above. |
If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!
Issue found when executing PR #19612
Action Performed:
Expected Result:
Reaction list shows up.
Actual Result:
Reaction list does not show up.
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Version Number: 1.3.26.1
Reproducible in staging?: yes
Reproducible in production?: yes
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
Bug6086568_Screen_Recording_20230609_193946_Chrome.mp4
Expensify/Expensify Issue URL:
Issue reported by: Applause - Internal Team
Slack conversation:
View all open jobs on GitHub
Upwork Automation - Do Not Edit
The text was updated successfully, but these errors were encountered: