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

Main Window Frameless #1457

Merged
merged 3 commits into from
Apr 29, 2020
Merged

Main Window Frameless #1457

merged 3 commits into from
Apr 29, 2020

Conversation

Sheepux
Copy link
Contributor

@Sheepux Sheepux commented Apr 5, 2020

Changes the main window to frameless.
Top left menu is now draggable and includes minimize,maximize and close buttons.
Connectors's browser window is still with frame enabled.

Todo :

  • Check pre-flight-check steps that can be related to this change and detail the following tests
  • Test on Windows
    • The default menubar should appear during loading then disapears after theme load
    • Button Minimize sends hakunko to the minimized state
    • Button Maximize sends hakunko to the full size of the screen (but not in "full screen" mode)
    • Clicking on Maximize again restores the window to it's original size
    • The windows is only draggable on the top left part (#Menu), move it around while in non maximized state.
    • Double clicking on the draggable part is triggering the Maximize function (do the same tests as before)
    • The configuration menu (on top left) is still clickable.
    • The unmaximized window can be resized in 3 corners (top right, bottom right, bottom left). The resize icon appears when on the 4 edge (top bottom, left, right)
    • Open a connector's website from the connector pannel and asses that the window topbar is here as well as system controls (min, max, close buttons)
    • Button Close closes hakunko (and no electron process is still runing afterwards)
    • Run pre-flight steps 40 & 41
  • Test on Linux
    • The default menubar should appear during loading then disapears after theme load
    • Button Minimize sends hakunko to the minimized state
    • Button Maximize sends hakunko to the full size of the screen (but not in "full screen" mode)
    • Clicking on Maximize again restores the window to it's original size
    • The windows is only draggable on the top left part (#Menu), move it around while in non maximized state.
    • Double clicking on the draggable part is triggering the Maximize function (do the same tests as before)
    • The configuration menu (on top left) is still clickable.
    • The unmaximized window can be resized in 3 corners (top right, bottom right, bottom left). The resize icon appears when on the 4 edge (top bottom, left, right)
    • Open a connector's website from the connector pannel and asses that the window topbar is here as well as system controls (min, max, close buttons)
    • Button Close closes hakunko (and no electron process is still runing afterwards)
    • Run pre-flight steps 40 & 41
  • Test on MacOS
  • ⚠️ The default menubar should appear during loading then disapears after theme load
    Menu bar appears, but there are 3 squares instead of min/max/close symbols
    • Button Minimize sends hakunko to the minimized state
    • Button Maximize sends hakunko to the full size of the screen (but not in "full screen" mode)
    • Clicking on Maximize again restores the window to it's original size
    • The windows is only draggable on the top left part (#Menu), move it around while in non maximized state.
  • ❌ Double clicking on the draggable part is triggering the Maximize function (do the same tests as before)
    • The configuration menu (on top left) is still clickable.
    • The unmaximized window can be resized in 3 corners (top right, bottom right, bottom left). The resize icon appears when on the 4 edge (top bottom, left, right)
    • Open a connector's website from the connector pannel and asses that the window topbar is here as well as system controls (min, max, close buttons)
    • Button Close closes hakunko (and no electron process is still runing afterwards)
    • Run pre-flight steps 40 & 41

@Sheepux Sheepux requested a review from ronny1982 April 5, 2020 23:05
Copy link
Contributor

@ronny1982 ronny1982 left a comment

Choose a reason for hiding this comment

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

Looks good.
Needs to be tested on macOS and Linux (Ubuntu, debian w. GNOME)

The pro of this may also be the con:
Each front-end can have a customized title bar, but each front-end must always implement a title bar.

How about evaluating a solution (if this is even possible), where the title bar is part of the index.html file and a front-end may or may not replace it?

@Sheepux
Copy link
Contributor Author

Sheepux commented Apr 10, 2020

How about evaluating a solution (if this is even possible), where the title bar is part of the index.html file and a front-end may or may not replace it?

I see what you mean, i'll take a look at it

@Sheepux
Copy link
Contributor Author

Sheepux commented Apr 11, 2020

Added default menubar in index.html that can be hidden within the theme css ( it works!:)
Tests coverage updated.
Ran successfully on windows.

@Sheepux
Copy link
Contributor Author

Sheepux commented Apr 18, 2020

Regarding the icons during loading time maybe macOS dooesn't recognise those UTF8 chars:
🗕🗖🗙
https://www.fileformat.info/info/unicode/char/1f5d5/index.htm
https://www.fileformat.info/info/unicode/char/1f5d6/index.htm
https://www.fileformat.info/info/unicode/char/1f5d6/index.htm

I should probably prefix it with pure text :
Min🗕 Max🗖 Close🗙
Any idea? :)
Edit: images ?

@Sheepux
Copy link
Contributor Author

Sheepux commented Apr 18, 2020

Regarding the double click... could it be a windows's behavior ? Do we consider this as an anomaly (don't know much about MacOS) ?

@Sheepux Sheepux self-assigned this Apr 19, 2020
@Sheepux Sheepux added the Enhancement Improvement or Feature label Apr 19, 2020
@ronny1982
Copy link
Contributor

I couldn't find a font that shows these unicode characters, so i suggested either to use embedded gifs as base64 data URLs or using SVG sprites, which seems to be the best practice right now (maybe also switching fontawesome from font system to SVG sprites ...)

macOS usually maximizes the window as well when double clicking the title bar. I have no clue why this is not working and if it is essential to be working on macOS or not.

@Sheepux
Copy link
Contributor Author

Sheepux commented Apr 19, 2020

Regarding the double click maximize I've just found this :
electron/electron#16385
I'm unsure if we should add the extra code just for MacOS.

@ronny1982
Copy link
Contributor

Maybe its possible to just capture the javascript double click event on the element and call the same methods (toggle) as when clicking the maximize/minimize buttons

Copy link
Contributor

@ronny1982 ronny1982 left a comment

Choose a reason for hiding this comment

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

Looks good

@ronny1982 ronny1982 merged commit 621fd63 into master Apr 29, 2020
@ronny1982 ronny1982 deleted the FEAT-FramelessWindow branch April 29, 2020 22:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement Improvement or Feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants