-
Notifications
You must be signed in to change notification settings - Fork 811
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-54591] Use getVersion endpoint to report app name #2862
Conversation
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.
@devinbinnie just to understand, is this a regression from a change in 5.5? If so, can you point me to the PR so I can reference for this review?
|
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.
Thanks @devinbinnie! Any tests we can consider in the future for this area?
return ( | ||
<UpdateAvailable | ||
item={item} | ||
appName={appName} | ||
/> | ||
); | ||
} | ||
if (item.state === 'completed') { | ||
return <UpdateDownloaded item={item}/>; | ||
return ( | ||
<UpdateDownloaded | ||
item={item} | ||
appName={appName} | ||
/> | ||
); |
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.
Not introduced in this PR but wondering why are these two cases separate? Seems they return the same thing
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.
One is UpdateAvailable
the other is UpdateDownloaded
, there are separate components.
We don't currently have front-end testing set up for Desktop App, since it wasn't creating a lot of value. |
@@ -40,6 +41,9 @@ class DownloadsDropdown extends React.PureComponent<Record<string, never>, State | |||
window.desktop.downloadsDropdown.focus(); | |||
}); | |||
|
|||
window.desktop.getVersion().then(({name}) => { |
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'm a bit surprised to see that this works when you're removing this field in the type definition below. I guess it gets its type from somewhere else?
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 does! It's here:
Line 65 in 2a88175
getVersion: () => Promise<{name: string; version: string}>; |
Cherry pick is scheduled. |
(cherry picked from commit 8281bbb)
(cherry picked from commit 8281bbb) Co-authored-by: Devin Binnie <[email protected]>
Summary
For some reason
app
wasn't initialized in the preload script at the right time, causing issues that were breaking the downloads dropdown. This PR pushes us back to using the old endpoint ofgetAppVersion
that provides both the version and app name when the dropdown initializes.Ticket Link
https://mattermost.atlassian.net/browse/MM-54591