-
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: No notification on web if window is not active #17493
Fix: No notification on web if window is not active #17493
Conversation
@luacmartins @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] |
Note: This only happens on Web so I only included Web screenshot. Please let me know if there were ways to enable notification on mWeb. What do you think if I didn't included other platforms' screenshots? |
@Santhosh-Sellavel all yours! |
@Santhosh-Sellavel Just a friendly reminder in case you missed 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.
@tienifr I'm having issues testing these changes. I'm only getting notifications when the browser is minimized, but nothing comes up when I have it open and the window is unfocused. Am I doing something wrong?
@tienifr cc: @luacmartins |
@luacmartins I still get notified without minimizing the browser. Don't know if you miss any test step in the PR description. Could you please try again? Thanks a lot! Screencast.from.19-04-2023.15.33.18.webm |
I didn't get notified when the window is unfocused/not active. Reproduced on Staging. Screencast.from.19-04-2023.15.37.53.webm |
Alright, I got to reproduce the issue now, but the issue is not the same as it was described slightly differently. We receive notifications even when the window is not active. We don't show when the same chat is active for which the notifications are received. |
@tienifr Doesn't it affect mWeb also? |
@Santhosh-Sellavel I've raised my concern here: #17493 (comment). Actually I don't know if we can receive notifications on mWeb. In case we can, please let me know how to because I couldn't do it on my phone/emulator 🤓. |
Absolutely! We don't show when that chat is being opened and the window is active, to be more concise. |
@luacmartins Thanks! I already tried but it yielded no result. In Chrome mobile (Android & iOS), we can't manually add allowed sites for notifications. Instead, the site must ask for permission first. While it's different on Computer where we can manually add or remove any site. Reference: https://support.google.com/chrome/answer/3220216?hl=en&co=GENIE.Platform%3DAndroid&oco=1 |
Yea, I'd say that's out of scope for this PR. cc @Julesssss @arosiclair since you worked on notifications. Are we asking for permission to show notifications on mWeb? |
Alright if the notification is itself not working on mWeb it's a different problem, can you create a new tracking issue for that @luacmartins? And let's move forward here |
Pretty sure mWeb is completely unsupported for now |
Reviewer Checklist
Screenshots/VideosWebScreen.Recording.2023-04-19.at.8.25.50.PM.movDesktopScreen.Recording.2023-04-19.at.10.07.37.PM.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!
@Julesssss is mWeb notification covered anywhere in the notifications project? do we already have an issue for it? |
@cead22 no, it's not something we care about |
✋ 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.2-0 🚀
|
🚀 Deployed to production by https://github.com/mountiny in version: 1.3.2-5 🚀
|
FYI: this PR introduced this regression. |
@cristipaval I'm confused about how this causes a regression, can you explain please with a bit more context thanks! |
@tienifr @Santhosh-Sellavel @luacmartins I am reverting this PR since automatic authentication with the magic link is a very important feature. |
@Santhosh-Sellavel Please see follow here the link to the Slack conversation with more context. |
Details
Desktop shows the notification but web does not when we focus on the tab then open another app to blur the window. That is caused by different implementations of
Visibility.isVisible()
function across platforms. This PR fixes the issue.Fixed Issues
$ #17242
PROPOSAL: #17242 (comment)
Tests
Offline tests
Same 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
Mobile Web - Chrome
Mobile Web - Safari
Desktop
iOS
Android