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

Cleanup of settings (amongst other things) #715

Merged
merged 11 commits into from
Jan 6, 2017

Conversation

CendioOssman
Copy link
Member

This does various cleanups for things that have annoyed me for a while. :)
The primary focus is the settings and connect dialogs, which I felt were needlessly complex for most users.

Give it a try and see what you think.

@samhed
Copy link
Member

samhed commented Nov 14, 2016

Really nice!

I also like the ideas of removing the extra stylesheets and the token setting.

@samhed
Copy link
Member

samhed commented Nov 15, 2016

For some reason Chrome decides to do line-breaks in the settings with this new code:

nowrapafter

This is how it looks with master:

nowrapbefore

Should we add this to the css for the panels?

white-space: nowrap;

@samhed
Copy link
Member

samhed commented Nov 15, 2016

98400d7 seems to fix an issue where the 'connecting'-transition screen appeared in front of the password dialog.

@CendioOssman
Copy link
Member Author

For some reason Chrome decides to do line-breaks in the settings with this new code:

It always did. It's just that the input field pushed out the width of the dialog so that we didn't see any line breaks with the current elements.

A general nowrap is most likely a bad idea.But it could make sense for labels. I'll have a look.

Copy link
Member

@DirectXMan12 DirectXMan12 left a comment

Choose a reason for hiding this comment

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

I would like a chance to check this visually, but I do have a concern about removing the token setting.

@@ -180,7 +180,6 @@ var UI;
UI.initSetting('view_only', false);
UI.initSetting('path', 'websockify');
UI.initSetting('repeaterID', '');
UI.initSetting('token', '');
Copy link
Member

Choose a reason for hiding this comment

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

Hmm... does this prevent token from working as a URL param? If so, it should still be in there. If we somehow broke passing a token as part of the URL at some point, then we need to fix that.

Copy link
Member Author

@CendioOssman CendioOssman Nov 16, 2016

Choose a reason for hiding this comment

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

Ah, right. I see now where it was used. However seeing that I have to object to its inclusion. Users who want a special websocket path should merely specify a different path. What makes this token so special?

Edit: To clarify, people currently using https://example.com/vnc.html&token=foo should use https://example.com/vnc.html&path=websockify%26token%3Dfoo

Copy link
Contributor

Choose a reason for hiding this comment

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

We currently have deployed noVNC on a bastion host, with a local change that makes host and port hidden inputs, and renames the label of the token. Tokens map 1:1 to available VNC ports of internal hosts (via websockify configuration file that lists them all), so that we can run one websockify for all of them.

While I agree that this setting is confusing to users, and should not be exposed by default, keeping the token as a hidden input (so that we can turn it into a regular input and change the label locally) would help us.

Copy link
Member Author

Choose a reason for hiding this comment

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

Can't you just change path in that case? That's what we do for ThinLinc and it has worked out fine.

Copy link
Member

Choose a reason for hiding this comment

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

We should have a way to add in URL-only parameters. We should discuss more in a follow-up PR. For now, this is fine.

@samhed
Copy link
Member

samhed commented Nov 21, 2016

I see that you have made the "noVNC" text larger above the connect button in the middle. I think this looks nicer now!

When the browser is very narrow (for example, phones in portrait mode) it looks like this:
connectcleanup

Should perhaps be tweaked a bit? No strong feelings about this one though

@samhed
Copy link
Member

samhed commented Nov 21, 2016

As far as the discussion regarding token goes, I don't understand why it was added in the first place (back in 2012: 4c75210)? Isn't this a Nova specific thing?

@CendioOssman
Copy link
Member Author

I've fixed the text and button so that it scales for narrow screens now.

@samhed
Copy link
Member

samhed commented Nov 23, 2016

Looks good!

Only the token discussion remaining then imo.

@DirectXMan12
Copy link
Member

DirectXMan12 commented Nov 23, 2016

As far as the discussion regarding token goes, I don't understand why it was added in the first place (back in 2012: 4c75210)? Isn't this a Nova specific thing?

kind-of-not-really? It's the only method of doing target selection when using websockify (which many people use noVNC with), so it's a convenience factor for users of websockify. #537 and #536 are the relevant recent discussion (people seem to expect to be able to pass token in the path).

@CendioOssman
Copy link
Member Author

It's the only method of doing target selection when using websockify (which many people use noVNC with), so it's a convenience factor for users of websockify.

As I mentioned, you can just modify the path instead.

#537 and #536 are the relevant recent discussion (people seem to expect to be able to pass token in the path).

None of these mention what's so special about token unfortunately. This is a very slippery road. token is in no way standardised. Some other gateways might want auth, or username, or password, or cookie, etc. Having an ever increasing list of these things isn't really sensible.

Copy link
Member Author

@CendioOssman CendioOssman left a comment

Choose a reason for hiding this comment

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

I changed my mind. I think rgb(40, 40, 40) actually works better than a pitch black background. It is still dark an out of the way, but still has enough contrast to see when a completely black session isn't covering the entire window.

@CendioOssman
Copy link
Member Author

Can we get this moving forward? What needs to be done to resolve the situation?

@samhed
Copy link
Member

samhed commented Jan 4, 2017

Good to merge in my opinion

Anyone with basic knowledge of CSS will easily figure out how to
customise the appearance of the UI, so remove the burden of having
to maintain these extra style sheets.
It was easy to confuse them as being VNC settings, so keep them all
under one group.
It's been standardised for quite some time, so remove the extra
noise in the CSS.
It only contained a password field, which might not be needed, and
is handled by a separate dialog if it is.
It's generally the only thing the user needs to click on, so make
sure it clearly stands out.
We have enough layers now that we need to have some system for this.
E.g. make sure that dialogs during connect show up in front of the
blocking transition layer.
Copy link
Member

@DirectXMan12 DirectXMan12 left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@@ -180,7 +180,6 @@ var UI;
UI.initSetting('view_only', false);
UI.initSetting('path', 'websockify');
UI.initSetting('repeaterID', '');
UI.initSetting('token', '');
Copy link
Member

Choose a reason for hiding this comment

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

We should have a way to add in URL-only parameters. We should discuss more in a follow-up PR. For now, this is fine.

@DirectXMan12 DirectXMan12 merged commit 16ed7b8 into novnc:master Jan 6, 2017
@CendioOssman CendioOssman deleted the cleanup branch June 8, 2017 08:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants