Skip to content
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-55503] Add support for new DesktopAPI #602

Merged
merged 22 commits into from
Feb 9, 2024
Merged

[MM-55503] Add support for new DesktopAPI #602

merged 22 commits into from
Feb 9, 2024

Conversation

streamer45
Copy link
Collaborator

@streamer45 streamer45 commented Dec 28, 2023

Summary

PR adds support for the new DesktopAPI. It deprecates the previous logic which is left for backwards compatibility (new plugin with older Desktop app).

@cpoile Will need some help to verify nothing got broken calls ringing wise. I did some manual smoke testing but a second look would be good.

Related PR

mattermost/desktop#2937

Ticket Link

https://mattermost.atlassian.net/browse/MM-55503

@streamer45 streamer45 added 2: Dev Review Requires review by a core committer 2: QA Review Requires review by a QA tester labels Dec 28, 2023
@streamer45 streamer45 added this to the v0.23.0 / MM 9.5 milestone Dec 28, 2023
@streamer45 streamer45 self-assigned this Dec 28, 2023
@@ -25,6 +25,7 @@
"@babel/preset-typescript": "7.16.0",
"@formatjs/cli": "6.0.4",
"@mattermost/client": "file:../webapp/mattermost-webapp/webapp/platform/client",
"@mattermost/desktop-api": "https://gitpkg.now.sh/mattermost/desktop/api-types?MM-55503",
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Need to update this once we merge the desktop side PR.

@@ -30,6 +30,7 @@
"@babel/preset-typescript": "7.16.0",
"@formatjs/cli": "5.0.7",
"@mattermost/client": "file:mattermost-webapp/webapp/platform/client",
"@mattermost/desktop-api": "https://gitpkg.now.sh/mattermost/desktop/api-types?MM-55503",
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Need to update this once we merge the desktop side PR.

Copy link
Member

Choose a reason for hiding this comment

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

Yep 👍

@codecov-commenter
Copy link

codecov-commenter commented Dec 28, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (2df6784) 0.00% compared to head (ba8afe5) 9.37%.
Report is 8 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##           main    #602      +/-   ##
=======================================
+ Coverage      0   9.37%   +9.37%     
=======================================
  Files         0      26      +26     
  Lines         0    5303    +5303     
=======================================
+ Hits          0     497     +497     
- Misses        0    4754    +4754     
- Partials      0      52      +52     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

isHandRaised: boolean;
e2eDesktopNotificationsRejected?: DesktopNotificationArgs[],
e2eDesktopNotificationsSent?: string[],
e2eNotificationsSoundedAt?: number[],
e2eNotificationsSoundStoppedAt?: number[],
e2eRingLength?: number,

// Desktop Mocking
desktop: any,
Copy link
Member

Choose a reason for hiding this comment

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

You probably don't need this anymore, it's unfortunately still there because of the version field, which has been replaced by getAppInfo under the desktopAPI

Copy link
Member

@cpoile cpoile left a comment

Choose a reason for hiding this comment

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

Looks great, the new API is much nicer. Too bad we have so many ifs and paths now, but can't be helped.
Edit: I tested using the MM-55503 branch of desktop and the calls notifications are working.

@devinbinnie
Copy link
Member

Looks great, the new API is much nicer. Too bad we have so many ifs and paths now, but can't be helped.

That's just for backwards compatibility. That will go away in time :)

@cpoile cpoile removed the 2: Dev Review Requires review by a core committer label Jan 8, 2024
@streamer45
Copy link
Collaborator Author

@DHaussermann as mentioned in our 1-1, looking for some smoke testing on this, covering the following functionalities:

  • Screen sharing
    • Mostly making sure the screen/window selection works as expected.
  • Joining/leaving calls
    • Clicking buttons in either widget or pop out window.
  • Clicking on channel link in call widget
    • Making sure it focuses the app and switches to the channel
  • Calls errors showing on the Desktop app. Once in a call you can trigger fake errors from the JS console e.g.:
    • window.callsClient.disconnect(new Error('some error'));
  • Calls ringing widget notifications

Also looking to cover the following desktop/plugin version combinations:

Please ping me if you need any help with setting up things or more clarity on the above.

@streamer45
Copy link
Collaborator Author

@DHaussermann Heads up that the Desktop side PR has been merged so I updated the dependency on this side. This means you can now use desktop master branch (or a build of it) to test the new desktop version.

Copy link

@DHaussermann DHaussermann left a comment

Choose a reason for hiding this comment

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

Tested and passed
I deployed the Calls plugin from this PR branch to a test server and tested from an advance v5.7.0 desktop release which contained mattermost/desktop#2937

  • Used the calls plugin and sanity checked actions and basic functions mute emoji etc..
  • Join / leave a call
  • Start / end a call
  • Share a screen and stop
  • Performed all action from both the collapse modal as well as the expanded view
  • Downgraded desktop client to v5.6.0 and repeated all exploratory tests to guard agains regression risk
  • No issues or changes in behavior found

LGTM!

Sorry for the delay on this. @cpoile please merge when you have a chance.

@DHaussermann DHaussermann added 3: Reviews Complete All reviewers have approved the pull request and removed 2: QA Review Requires review by a QA tester labels Feb 9, 2024
@cpoile cpoile merged commit 9e8932b into main Feb 9, 2024
6 checks passed
@cpoile cpoile deleted the MM-55503 branch February 9, 2024 18:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3: Reviews Complete All reviewers have approved the pull request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants