Skip to content

Conversation

@marcaaron
Copy link
Contributor

@marcaaron marcaaron commented Aug 24, 2020

Fixes #285

Testing Steps:

  1. Add a report to your list of reports and share that report with another user
  2. Log in as one user in RNC web and the other user in RNC desktop
  3. Leave a comment on the report via web while the same report is in view on desktop
  4. Verify no notifications are seen
  5. Select another report on desktop and leave a comment on the previous report on web
  6. Verify that a notification can be seen on desktop
  7. Repeat steps but test that the notifications appear on web instead desktop

@marcaaron marcaaron self-assigned this Aug 24, 2020
@marcaaron marcaaron requested a review from roryabraham August 24, 2020 23:35
@marcaaron
Copy link
Contributor Author

@roryabraham bumping this one

Copy link
Contributor

@roryabraham roryabraham left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code looks great and it passed lots of testing too. Only change I'm requesting is that we save the Expensify Icon URL in CONST.js, because it could very conceivably be used elsewhere in the application.

@@ -0,0 +1,126 @@
// Web implementation only. Do not import for direct use. Use Notification.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

** Web and desktop, right?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yep

import CONST from '../../CONST';
import * as ActiveClientManager from '../ActiveClientManager';

const EXPENSIFY_ICON_URL = `${CONST.CLOUDFRONT_URL}/images/favicon-2019.png`;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should move this to CONST.js

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah we probably should I'll fix this up.

@marcaaron
Copy link
Contributor Author

Updated!

@marcaaron marcaaron requested a review from roryabraham August 27, 2020 22:40
Copy link
Contributor

@roryabraham roryabraham left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great, this code seems to work really well!

@roryabraham roryabraham merged commit 873bc1e into master Aug 27, 2020
@roryabraham roryabraham deleted the marcaaron-webNotifications branch August 27, 2020 23:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add DM Browser/Desktop Notifications

3 participants