-
Notifications
You must be signed in to change notification settings - Fork 712
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
GUACAMOLE-124: Add full-screen action #470
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.
Overall this looks pretty solid to me. My only question is how much testing you've done with scaling/resizing with this? Presumably when it goes to full-screen the screen resolution changes, which, depending on the protocol in use for the connection, will result in either an on-the-fly resize (RDP, maybe SSH/Telnet), a disconnect/reconnect (RDP), or some extra black space around the screen area. What sort of behavior have you seen?
guacamole/src/main/webapp/app/navigation/directives/guacUserMenu.js
Outdated
Show resolved
Hide resolved
I did some more tests on different devices / browsers and connections. Here are the results:
So basically:
@necouchman & @mike-jumper : I do not have a Mac to debug behavior on Safari, and I do not believe IE 11 is relevant anymore, so I think that's good enough to be used, or at least to be reviewed. |
@madmath03: Please note that all your commits need to have the "GAUCAMOLE-124" tag on them. Also, might want to consider squashing the commits into a smaller number - five is a lot of commits for the small amount of code that is being changed. |
b2ef33f
to
c21d120
Compare
@necouchman done |
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 happy with it, but I'll let @mike-jumper give the final word.
Hi @mike-jumper , Do you think this could be part of the 1.2.0 release ? |
guacamole/src/main/webapp/app/navigation/directives/guacUserMenu.js
Outdated
Show resolved
Hide resolved
guacamole/src/main/webapp/app/navigation/directives/guacUserMenu.js
Outdated
Show resolved
Hide resolved
guacamole/src/main/webapp/app/navigation/directives/guacUserMenu.js
Outdated
Show resolved
Hide resolved
guacamole/src/main/webapp/app/navigation/directives/guacUserMenu.js
Outdated
Show resolved
Hide resolved
guacamole/src/main/webapp/app/navigation/directives/guacUserMenu.js
Outdated
Show resolved
Hide resolved
Signed-off-by: mathieu.brunot <[email protected]>
hello @mike-jumper Let me know if the corrections applied are valid for you. |
guacamole/src/main/webapp/app/navigation/directives/guacUserMenu.js
Outdated
Show resolved
Hide resolved
guacamole/src/main/webapp/app/navigation/directives/guacUserMenu.js
Outdated
Show resolved
Hide resolved
guacamole/src/main/webapp/app/navigation/directives/guacUserMenu.js
Outdated
Show resolved
Hide resolved
Signed-off-by: mathieu.brunot <[email protected]>
hello @mike-jumper I've applied the modifications you requested (not a 100% sure about the last one though). |
@mike-jumper I've tested this on the same devices I mentioned initially and it all seems to work as expected. Let me know if you need more changes. |
@madmath03 : I've tested it on |
Glad to hear that 😃
That might be nice indeed, but since the action name and CSS classes are constants, I'm not sure if there is a way to do that easily though... |
@mike-jumper anything blocking this to be merged ? |
@mike-jumper & @necouchman anything blocking this to be merged ? |
@madmath03 I can say that for me just worked fine! Just a minor addition I've made to your code, don't show toggle is running Internet explorer as it renders a black screen (known bug, but it's IE..) --- a/guacamole/src/main/webapp/app/navigation/directives/guacUserMenu.js
+++ b/guacamole/src/main/webapp/app/navigation/directives/guacUserMenu.js
@@ -191,6 +191,17 @@ angular.module('navigation').directive('guacUserMenu', [function guacUserMenu()
*/
$scope.actions = [ LOGOUT_ACTION ];
+
+ // Check if Internet Explorer UserAgent
+ var isIE = false;
+ var ua = window.navigator.userAgent;
+ var old_ie = ua.indexOf('MSIE ');
+ var new_ie = ua.indexOf('Trident/');
+
+ if ((old_ie > -1) || (new_ie > -1)) {
+ isIE = true;
+}
+
// Initialize fullscreen functions
var docElem = document.documentElement;
var requestFullscreen = docElem.requestFullscreen
@@ -201,8 +212,8 @@ angular.module('navigation').directive('guacUserMenu', [function guacUserMenu()
|| document.mozCancelFullScreen
|| document.webkitExitFullscreen
|| document.msExitFullscreen;
-
- if (!!requestFullscreen && !!exitFullscreen) {
+ // If running Internet Explorer DONT include FullScreen toggle (Black Screen is produced when toggled)
+ if (!!requestFullscreen && !!exitFullscreen && !isIE ) {
// Bind browser-specific fullscreen functions
if (!docElem.requestFullscreen) {
docElem.requestFullscreen = (requestFullscreen).bind(docElem);
|
Signed-off-by: mathieu.brunot <[email protected]>
Hi @echu2013 I added your suggestion to this PR. @necouchman & @mike-jumper let me know what you guys think about this. |
@madmath03 great job! Thanks let's hope they approve it |
guacamole/src/main/webapp/app/navigation/directives/guacUserMenu.js
Outdated
Show resolved
Hide resolved
Signed-off-by: mathieu.brunot <[email protected]>
@mike-jumper can you review this PR ? |
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've checked out the code locally to test the full screen functionality, and I think there are some rough edges that are worth resolving before merge:
-
The placement of the "Fullscreen" menu item is a bit awkward. Normally, actions local to the current page are displayed at the top of the user menu, such as the client-specific "Disconnect" option. Currently, the "Fullscreen" item is between "Settings" and "Logout", which does not make logical sense to me:
There is already functionality built into the controller of the client page to add client-specific user menu options. That may be a good thing to leverage here:
guacamole-client/guacamole/src/main/webapp/app/client/controllers/clientController.js
Lines 899 to 900 in 0091bb1
// Set client-specific menu actions $scope.clientMenuActions = [ DISCONNECT_MENU_ACTION ]; Alternatively, the Guacamole menu has a dedicated section for controlling the display. That might be a good place for a button that enters/exits fullscreen.
-
After clicking "Fullscreen", the Guacamole menu remains open, requiring the user to manually close the menu by pressing Ctrl+Alt+Shift. The current standard behavior of the client interface is that taking action within the menu should automatically close the menu, and I think that should be done here. The behavior of the "Disconnect" menu item may be a good example here, as well.
-
When Chrome enters fullscreen mode, it displays the key that the user may press to exit fullscreen. In my case, this is Esc:
This is unfortunately true. Despite Guacamole otherwise having full control of the Esc key, that control is lost while in full screen. This is a bit annoying when using an application which leverages Esc, though I'm also not sure anything can be done about this.
We could try to roll https://issues.apache.org/jira/browse/GUACAMOLE-989 into this?? |
Regarding point 3, as you've mentioned, I'm not sure there is anything that can be done about this here. For the point 1 though, I do not agree with you. It's actually not related to the current page since it switches the whole browser to fullscreen mode. what do you think @necouchman ? I can take a look at point 2 though and see how it's done. |
@necouchman & @mike-jumper just pinging to get some news on this old PR |
I hope this is not dead. I did test this before 1.2.0 release. It's 1.3.0 already. |
@depawlur: I don't think it's dead, just didn't get finished up in time to make the 1.3.0 release. Hopefully we can add it to the next one... |
I agree with @mike-jumper on the placement of this item - while it is true it puts the entire browser into fullscreen mode, the context in which the user executes the action is a specific connection, and so I think it makes more sense to have it grouped with connection-specific options.
Ah, I think I see what you're getting at - you've added it to the Guacamole menu where it displayed either here in the hidden menu or in the menu on the home screen, I'm guessing? So that someone can go to the menu on the home screen and put the entire screen in fullscreen mode, and then start a connection? I guess I'm not opposed to having this functionality available on the Home screen, assuming we can agree on the correct place for it. However, a couple of points, here:
|
@necouchman thanks for the feedback. I was really expecting this before doing any further modifications to this PR 😃
Yes, that's exactly what I had in mind and the reason why I'm not too much of a fan of making it connection-specific.
In that case, how and where should it be placed ?
That's only true for desktop browsers. I developped this PR when I was testing Guacamole on an Android tablet: it worked fine, but there is no way on tablets or smartphones to switch to Fullscreen making it not really practical... BTW: another solution but much more complicated would be to make Guacamole into a PWA (basically requires HTTPS, manifest.json and a Service Worker) so that we could install Guacamole and run it in fullscreen by default. |
@mike-jumper Any further thoughts or guidance on placement of this item? @madmath03 Fair point about the non-desktop browsers, this makes sense. Let's see if we can reach consensus on where such an option would be placed. |
@mike-jumper This one has languished a bit - any further feedback, here? @madmath03 You still around and willing to continue to work on this if we can get you some guidance? |
@necouchman I think this may be effectively superseded by #695, which was merged for GUACAMOLE-1525, a duplicate of GUACAMOLE-124. |
Thanks @mike-jumper - didn't even think to check that. I'll verify and close this and the Jira issue out. |
Closed by #695. |
GUACAMOLE-124: Add full-screen action
Signed-off-by: mathieu.brunot [email protected]