-
Notifications
You must be signed in to change notification settings - Fork 828
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-60605] Fix the Download button being hidden on Windows/Linux #3148
Conversation
What are these new buttons? Just trying to get more context here |
They're not really new - just replacements for what we had, using native Electron APIs instead of the custom ones we had ourselves. |
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.
Anything we can test to avoid this issue in the future?
src/renderer/components/MainPage.tsx
Outdated
{window.process.platform !== 'darwin' && | ||
<span style={{width: `${window.innerWidth - (window.navigator.windowControlsOverlay?.getTitlebarAreaRect().width ?? 0)}px`}}/> | ||
} |
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.
Would there be any overlap in full screen due to the condition below?
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.
Ugh...why does full screen mode have to exist...
Seems like it's causing some weird behaviour, i'll fix that.
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.
Okay I've fixed it for Windows and "fixed" it for Linux.
Unfortunately full screen on Linux really doesn't work very well, so we'll need to address that separately. See: #3143
If we had front-end tests, absolutely. Never was able to add those. |
src/renderer/components/MainPage.tsx
Outdated
} else { | ||
titleBarSpacing = (<span style={{width: `${window.innerWidth - (window.navigator.windowControlsOverlay?.getTitlebarAreaRect().width ?? 0)}px`}}/>); |
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.
So, does this mean that Linux doesn't need this special case for full screen?
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.
At this point, no. I spent some time trying to work around it but full screen under Linux refuses to behave nicely. So i'm going to create a separate PR that removes full screen support from Linux.
src/renderer/components/MainPage.tsx
Outdated
if (this.state.fullScreen && window.process.platform !== 'linux') { | ||
titleBarSpacing = ( | ||
<div | ||
className={`button full-screen-button${this.props.darkMode ? ' darkMode' : ''}`} | ||
onClick={this.handleExitFullScreen} | ||
> | ||
<i className='icon icon-arrow-collapse'/> | ||
</div> | ||
); |
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.
In full-screen does the download button is shown with this case for Windows?
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.
Yes, it shows correctly
Cherry pick is scheduled. |
Error trying doing the automated Cherry picking. Please do this manually
|
* [MM-60605] Fix missing downloads/developer mode icon hidden on Linux and Windows * Disable for mac * Fix lint * Fix misalignment on Windows * "fix" linux * Return to inline version, ignore Linux
…) (#3154) * [MM-60605] Fix missing downloads/developer mode icon hidden on Linux and Windows * Disable for mac * Fix lint * Fix misalignment on Windows * "fix" linux * Return to inline version, ignore Linux
Summary
When we made the change to switch to the titleBarOverlay for Windows and Linux, the Downloads dropdown button has disappeared. This is because it was hidden behind the new overlay.
This PR adds a
span
to force the Downloads dropdown in front of the title bar buttons.NOTE: Will have to update this when cherry-picking to v5.9, as Windows doesn't use these new buttons on v5.9.
Ticket Link
https://mattermost.atlassian.net/browse/MM-60605