-
Notifications
You must be signed in to change notification settings - Fork 856
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-62709] Patched electron-context-menu to use WebContentsView, avoid using electron-dl #3291
Conversation
…d using electron-dl
@@ -52,7 +52,7 @@ export default class ContextMenu { | |||
reload = () => { | |||
this.dispose(); | |||
|
|||
const options = {window: this.view.webContents, ...this.menuOptions}; |
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.
What other areas that use context menu could this affect so we can keep in mind when we test this fix?
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.
It's anywhere that you right-click in the app and you get that little menu. This includes right-clicking on links and such.
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.
@DHaussermann heads up that we want to also smoke test other context menu to make sure there are no other issues.
@devinbinnie I'm seeing issues with the build.
|
This was reproduced on the wrong build, that's rc1, so I'd check that again if you could.
This one might be out of scope. Can we try the actual bug on the test build first?
|
/update-branch |
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.
Tested and passed
- Confirmed the image save crash is now resolved
- Tried other right click functions such as copying channel or team link
- As suggested above I explored other context options such as getting attachment links, post action, emojis etc.
- Ignored the crash when removing a server which will be addressed separately
- No other issue found
LGTM!
Thanks for the help @devinbinnie I see the fix now and put an approval comment. I did a quick click through and explored a bit finding no other issues. As mentioned I unfortunately don't know much about what E2E is in place for desktop but some sanity checking for RC2 would help build confidence. |
Cherry pick is scheduled. |
Summary
A feature of
electron-context-menu
was interfering with our normal download process, aselectron-dl
(an upstream dependency ofelectron-context-menu
) was also performing the same functions as our internal downloading code.To resolve this, I've patched
electron-context-menu
to just use the normal Electron download process. Also needed was a patch to allow forWebContentsView
to be passed in as an entire view with awebContents
property, as that was also causing a crash.I have a follow-up ticket to create an E2E test for this: MM-62718
Which we can do later as it'll take a while to perfect it and this needs to be fixed/merged ASAP for the release.
Ticket Link
https://mattermost.atlassian.net/browse/MM-62709