-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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: web does not show not show notifications for not active window #18065
Conversation
@cristipaval @Santhosh-Sellavel One of you needs to 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] |
@cristipaval @Santhosh-Sellavel This is basically a refactor where we separate |
function hasFocus() { | ||
return true; | ||
} |
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.
Assuming it has focus is weird?
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.
bump @tienifr
cc: @luacmartins thoughts?
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 it's fine since checking isVisible should be enough on the native case.
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 see your point @Santhosh-Sellavel. In the future, we might want this function to behave as onResume
-onPause
lifecycle on Android. I mean, for instance, sometimes the App might be foregrounded and partially visible but not focused because there is a system alert on top of it. But I also do agree with @luacmartins that this might be out of scope for now.
Can you update the issue title to something meaning full |
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, nothing else to add.
Reviewer Checklist
Screenshots/VideosWeb & Desktop#### NotificationsScreen.Recording.2023-05-02.at.12.27.24.AM.movTFAScreen.Recording.2023-05-02.at.12.36.23.AM.mov |
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.
LGTM, tests well!
cc: @luacmartins or @cristipaval |
Gonna merge since @cristipaval's comment are addressed as well. |
✋ 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/luacmartins in version: 1.3.9-12 🚀
|
@Santhosh-Sellavel @cristipaval Could you confirm the QA worked fine on this one? |
QA noted this does not work in mWeb, is it supposed to work there? |
No it won't on mWeb. We don't support notifications on mWeb. |
Nice thats what I suspected, thanks |
🚀 Deployed to production by https://github.com/roryabraham in version: 1.3.12-0 🚀
|
Details
Adding window.hasFocus() into isVisible can cause the regression because this function is using in many places. In this case, we just want to fix the notification problem, so I suggest to add a new function named hasFocus and use it in Report.js.
Fixed Issues
$ #17242
$ #17969
Tests
Offline tests
Same as above
QA Steps
PR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)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)/** comment above it */
this
properly so there are no scoping issues (i.e. foronClick={this.submit}
the methodthis.submit
should be bound tothis
in the constructor)this
are necessary to be bound (i.e. avoidthis.submit = this.submit.bind(this);
ifthis.submit
is never passed to a component event handler likeonClick
)StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG)
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)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
Web
Screencast from 17-04-2023 15:59:02.webm
Screencast from 27-04-2023 14:04:28.webm
Mobile Web - Chrome
Mobile Web - Safari
Desktop
iOS
Android