-
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
Fix/30868: Incorrect group displayed #31424
Fix/30868: Incorrect group displayed #31424
Conversation
@DylanDylann Can you post a video demo for the issue? |
Sure. Please wait a minute |
@shubham1206agra Added video demo in MacOS: Chrome / Safari section. Please help check |
@shubham1206agra Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
Hey |
@shubham1206agra Just checked, I see that in staging, the API 'OpenReport' still called when clicking on "Back". |
Reviewer Checklist
Screenshots/VideosAndroid: NativeNA Android: mWeb ChromeNA iOS: NativeNA iOS: mWeb SafariScreen.Recording.2023-11-30.at.8.11.31.PM.movMacOS: Chrome / SafariScreen.Recording.2023-11-30.at.8.02.45.PM.movMacOS: DesktopScreen.Recording.2023-11-30.at.8.25.35.PM.mov |
@getusha Do you also want to soft review this? |
@DylanDylann Can you resolve conflicts quickly? |
…refreshing-the-page
@shubham1206agra I just fixed |
@DylanDylann Steps to repro the error
|
Co-authored-by: Shubham Agrawal <58412969+shubham1206agra@users.noreply.github.com>
Co-authored-by: Shubham Agrawal <58412969+shubham1206agra@users.noreply.github.com>
@MonilBhavsar Now, you can proceed with final review. |
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.
Minor comments, else looks good!
@MonilBhavsar I just updated the PR |
@DylanDylann the PR author checklist has been updated and you also need to update it |
@MonilBhavsar I updated |
PR Reviewer checklist also needs to be updated now cc @shubham1206agra |
Done |
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.
Thanks all 🚀
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
🚀 Deployed to staging by https://github.com/MonilBhavsar in version: 1.4.20-0 🚀
|
🚀 Deployed to production by https://github.com/marcaaron in version: 1.4.20-3 🚀
|
@@ -499,6 +499,7 @@ function openReport( | |||
isLoadingInitialReportActions: true, | |||
isLoadingOlderReportActions: false, | |||
isLoadingNewerReportActions: false, | |||
lastVisitTime: DateUtils.getDBTime(), |
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.
There are a lot of comments on this PR, I couldn't summarize all of them. Can anyone of you please help me understand why we are setting the lastVisitTime here in OpenReport? @shubham1206agra @DylanDylann @getusha
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.
Hi @MonilBhavsar! Just wanted to bump this question in case you know the answer or if you think anyone above would know the answer.
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.
This proposal explains it #30868 (comment)
tldr; If user visits a chat and refereshes it, we want to display last visited chat and not some random chat. Last visited chat is determined by report.lastVisitTime
. So whenever user opens the report, we update that property.
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.
But we are updating this in ReportScreen which loads the report. Question is why are we doing this in openAPI call?
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.
May be for somecase where that hook in ReportScreen is not trigerred. @DylanDylann could you please answer this
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.
When I created this PR, setting lastVisitTime: DateUtils.getDBTime()
in the openReport
function did not cause any side effects. It was added to ensure that lastVisitTime is always updated whenever a report is opened but I also find any issue if we remove that line.
I just reviewed the code, I found that calling Report.updateLastVisitTime(reportID)
alone is sufficient. Therefore, we can safely remove the lastVisitTime: DateUtils.getDBTime()
parameter from openReport.
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.
Ok. Thanks. Let's try to cover these cases with code comments so that we don't have to go through this Q&A session. Thanks.
Details
Fixed Issues
$ #30868
PROPOSAL: #30868 (comment)
Tests
Offline tests
QA Steps
PR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)myBool && <MyComponent />
.src/languages/*
files and using the translation methodWaiting for Copy
label for a copy review on the original GH to get the correct copy.STYLE.md
) were followedAvatar
, I verified the components usingAvatar
are working as expected)StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG)
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)Design
label so the design team can review the changes.ScrollView
component to make it scrollable when more elements are added to the page.main
branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTest
steps.Screenshots/Videos
Android: Native
Android: mWeb Chrome
Screencast.from.23-11-2023.11.09.57.webm
iOS: Native
iOS: mWeb Safari
Screencast.from.23-11-2023.11.14.36.webm
MacOS: Chrome / Safari
Screencast.from.23-11-2023.11.13.18.webm
MacOS: Desktop
Screencast.from.23-11-2023.19.01.40.webm