-
Notifications
You must be signed in to change notification settings - Fork 3.2k
New line indicator working fine #6764
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
Conversation
@mateusbra Could you please upload videos for the rest of the platforms? |
There is a regression from your changes. When we foreground the app from the background on Tablet the newline indicator is visible only for short period of time. Previousoutput_file.mp4Nowoutput_file.mp4There could be more regressions like this. Please test it carefully before requesting another reivew. |
Hey @parasharrajat, thanks for the feedback! |
There were straight actions.
|
Any update for us. |
I tested multiple times and still couldn't reproduce it: Gravacao.de.Tela.2021-12-20.as.15.47.30.mov@parasharrajat do you think I'm missing something? @NikkiWines could you test and see if you can reproduce the behavior @parasharrajat had? In all my tests it requested ReportData only once(when it loads the report view for the first time) |
Yes, you are @mateusbra. I meant to open the Android app not App on the web browser on an Android tablet. |
@mateusbra, it looks like I can reproduce the bug @parasharrajat mentioned, though only on an Android tablet, not on the phone sim, weirdly. Screen.Recording.2021-12-20.at.17.09.47.movScreen.Recording.2021-12-20.at.17.23.36.mov |
Thanks both of you for the feedback, I'll try to reproduce it, sorry for the missunderstanding😅 |
The reason it wasn't working on tablet is: I created a new state(isReportDataLoaded), this way we know when we first receive the report data. |
I'm getting an eslint error:
Should I create a function just for the purpose of setting its state? |
Back from vacation, on my list. I will review your change @mateusbra asap. |
@parasharrajat I think I have another approach: App/src/libs/actions/Report.js Line 1020 in 22a7baf
ONYXKEYS.INITIAL_REPORT_DATA_LOADED:This flag is supposed to be true and remain true after you have downloaded initial data and have some reports stored locally. I think we could create a new ONYXKEY:IS_REPORT_DATA_LOADED, this key would have its initial value as false and would become true when the report data arrives. This way we wouldn't have to control when data arrives at ReportActionsView.js we would have it setted by our new ONYXKEY flag |
Finally, I got time to review this.
I think it would be better to use another Onyx key to detect the first-time load but all these keys could make the logic confusing. Now there are two options
The prime motive should always be to keep the ReportActionsView.js as light as possible. @mateusbra Let's get more eyes on this. Could you please raise a discussion in Slack? |
Ok @parasharrajat, sorry for the late reply, I'll rise a discussion about it in Slack |
Can someone break down what problem is solved by having a new key that tracks when a report is loaded for the "first time"? I see a few issues with the current approach, but think it would be more productive to discuss alternatives before improving what is currently presented. |
@marcaaron the main problem here is that we are trying to access report data when its not ready for being accessed(its getting undefined), the solution we are proposing here is to access report data when its ready for being accessed(when we have a response from API). here: App/src/libs/actions/Report.js Lines 1137 to 1139 in de5d2ba
we are calling for
our solution: I tried first to solve it by subscribing to |
Not sure I understand why knowing that the data is ready to be accessed is important... Could we try to wait for this value to become available in if (!prevProps.report.unreadActionCount && this.props.report.unreadActionCount) {
this.updateUnreadIndicatorPosition();
} |
@marcaaron I'll try to test it and give you a feedback, thanks 😄 |
@marcaaron I couldn't make it work with your proposed changes.
We are getting
then, in the called function we have: App/src/pages/home/report/ReportActionsView.js Lines 381 to 391 in de5d2ba
when we call Report.getLastReadSequenceNumber(this.props.report.reportID) if report data is not ready we get undefined from it
|
Thanks, I think I understood that the first time it was mentioned. But if it is
Yes, we need to figure out why? Are you able to look some more and return with an explanation or some alternative? |
Sorry for the late reply again, I'll be able to give more attention for this PR for now on.
Yes, it will have a value when the data is received from the API
I don't know if I understood you well in this part, but I think we can call it inside
I think Its because inside Report.js we only fill it with values after the API data is receive(before it we don't have a |
@mateusbra Any update? Have you found any other way to fix it? |
Thanks @mateusbra. I will help you close this ticket in next week. I will try to debug the whole cycle of data loading for report and see where are we lacking and how will your changes affect it. |
I debugged this but it is confusing and complex logic. I am will debug more on this. Mostly try to see how it was designed in old PRs. |
Looking into this today.. |
Now we have the New marker appearing correctly and the report being marked as read as soon as we get |
Got it. but did you check with the changes that I suggested? |
At this stage, I say we are good with the delay. It only affects page load on web | Desktop. This PR has taken a serious amount of time and I don't see any possible improvement so @NikkiWines Do you think we should merge this and open a new fresh issue for the delay. |
I agree with that... I think we also gonna solve #7837 with this PR. |
It's definitely not ideal to merge a PR with a known issue like this but I do think we're in a holding pattern for the moment trying to find the perfect solution. So, I agree we should re-review and merge without trying to fix the delay. I also think it's a good idea to make a new issue for the delay so we can try and get that resolved as well 👍 @mateusbra could you merge main into your branch and retest to confirm everything still works as expected? We also need videos for each device, not only for web. |
I'll work on it today to provide the test videos... |
#6764 (comment) updated providing all platform tests |
@mateusbra Desktop Video is wrong. Please mention the platform in your QA steps. Also, add steps for testing the new line indicator on all platforms. |
@parasharrajat sorry, I think I mixed up the correctly video for desktop, already changed it....
You're saying I need to cover every single platform with a different QA steps for it? Or I just should add which platforms the issue was occurring? |
As this PR touches newline functionality it becomes important to get that tested on each platform. Thus, I am asking if a platform has different testing steps then please add seperate steps for it. Thank you. |
Did it, please let me know if you think there's something missing. |
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.
Sorry guys, been totally swamped with work this week - I'll review this first thing tomorrow |
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 looks good - I would add in above the QA steps that the delay is expected and that we'll create a new issue to resolve it.
@marcaaron can I dismiss your old review or do you want to give this another once over. |
Thanks you for the review @parasharrajat @NikkiWines!
Added! |
✋ 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 @marcaaron in version: 1.1.46-0 🚀
|
Details
Now new line indicator shows up when opening report by URL.
Fixed Issues
$ #6471
Tests
QA Steps
Web, Mobile Web:
Desktop:
Android,iOS:
NOTE: We still have a delay on showing NEW marker, we will open a new issue separatelly for this.
Tested On
Videos
Web
2022-03-14.17-49-10.mp4
Mobile Web
WhatsApp.Video.2022-03-14.at.18.33.46.mp4
Android
2022-03-14.19-24-19.mp4
Desktop
WhatsApp.Video.2022-03-14.at.23.47.17.mp4
iOS
whatsapp-video-2022-03-15-at-004509_3JXAnGo9.mp4