-
Notifications
You must be signed in to change notification settings - Fork 829
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
MM-12205: session expiry notification #866
Conversation
3732558
to
cbe7889
Compare
@@ -39,6 +39,7 @@ export default class MainPage extends React.Component { | |||
|
|||
this.state = { | |||
key, | |||
sessionsExpired: new Array(this.props.teams.length), |
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 originally proposed an idea to simplify the interface between the desktop app and the webapp (https://pre-release.mattermost.com/core/pl/qpezbgj1bb898m1q4uk8158x3a), but this proved to be out of scope for the requested feature.
Perhaps something to return to in the future!
src/browser/index.jsx
Outdated
if (remote.app.isUnityRunning()) { | ||
remote.app.setBadgeCount(mentionCount); | ||
if (sessionExpired) { | ||
remote.app.setBadgeCount(1); |
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.
Given the limitation here, I opted to interpret the specs to show a 1
instead of no badge at all.
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.
Wouldn't this override an existing actual count from other instances?
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.
Ah, good catch! Yes, it probably makes sense to increment mentionCount
here instead.
Thanks @lieut-data. mattermost/mattermost-webapp#1751 was merged though, when is it available on pre-release? Sorry due to personal reason, recently it's a little hard to test the master branch on my PC. |
@yuya-oc, no worries. My webapp changes appear to have gone live this morning on pre-release. |
Tested on macOS. Looks good to me. |
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.
Works for me on Windows as well. Thanks @lieut-data!
@sudheerDev, do you feel comfortable taking a look at this review? |
@lieut-data Sorry about the delay. Will review it tomorrow. I just wanted to read few parts of desktop app code before reviewing this. This is the first thing on my list 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.
LGTM other than the one question posted.
Thanks for the careful review, @sudheerDev! |
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.
👍
@cpanato, did we by chance update the underlying AMI images used for building? This repo is failing with:
|
@lieut-data looks like this build is running on the master jenkins and should not. will check and fix |
@lieut-data fixed |
Before submitting, please confirm you've
npm run lint:js
for proper code formattingPlease provide the following information:
Summary
Detect when a session has expired and display appropriate badging, as per https://docs.google.com/document/d/1yezizH0-3mi4ZJ8nr5vIOiDKv-aBo52fguG__THpDD0/edit#.
Issue link
https://mattermost.atlassian.net/browse/MM-12275
Test Cases
Additional Notes
See mattermost/mattermost-webapp#1751 for corresponding notifications displayed.