Skip to content

Commit

Permalink
Unify Help/Feedback/Credits menus.
Browse files Browse the repository at this point in the history
This CL removes the question-mark icon that houses the menu before a
connection is made in favour of making the application menu visible
at all times. It also makes the "New window" command (formerly "New
connection") available before a connection is made.

BUG=500635

Review URL: https://codereview.chromium.org/1198663003

Cr-Commit-Position: refs/heads/master@{#335963}
  • Loading branch information
jamiewalch authored and Commit bot committed Jun 24, 2015
1 parent 4bca28f commit c6ba34a
Show file tree
Hide file tree
Showing 14 changed files with 23 additions and 60 deletions.
1 change: 0 additions & 1 deletion remoting/remoting_webapp_files.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -496,7 +496,6 @@
'resources/icon_cross.webp',
'resources/icon_disconnect.webp',
'resources/icon_fullscreen.webp',
'resources/icon_help.webp',
'resources/icon_host.webp',
'resources/icon_maximize_restore.webp',
'resources/icon_minimize.webp',
Expand Down
Binary file removed remoting/resources/icon_help.webp
Binary file not shown.
3 changes: 0 additions & 3 deletions remoting/resources/remoting_strings.grd
Original file line number Diff line number Diff line change
Expand Up @@ -1113,9 +1113,6 @@ For information about privacy, please see the Google Privacy Policy (http://goo.
<message desc="Text shown while a background operation is in progress." name="IDS_WORKING">
Working…
</message>
<message desc="Menu option to open a new connection." name="IDS_NEW_CONNECTION">
New connection
</message>
<message desc="Menu option to toggle the visibility of connection statistics." name="IDS_TOGGLE_STATS">
Show statistics
</message>
Expand Down
4 changes: 0 additions & 4 deletions remoting/webapp/base/html/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -649,10 +649,6 @@ html.apps-v2.scrollable {
border-bottom: 6px solid transparent;
}

#top-secondary {
margin-top: 10px
}

#webapp-description {
margin-bottom: 10px;
}
Expand Down
5 changes: 0 additions & 5 deletions remoting/webapp/crd/html/menu_button.css
Original file line number Diff line number Diff line change
Expand Up @@ -85,11 +85,6 @@ button.menu-button-activator.active {
opacity: 0.5;
}

#help-feedback-toolbar {
margin-left: 8px;
margin-top: 4px;
}

.menu-button-click-trap {
position: fixed;
top: 0;
Expand Down
2 changes: 1 addition & 1 deletion remoting/webapp/crd/html/toolbar.css
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
white-space: nowrap;
}

#new-connection {
#new-window {
margin-__MSG_@@bidi_start_edge__: 0;
}

Expand Down
13 changes: 2 additions & 11 deletions remoting/webapp/crd/html/toolbar.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@

<div id="connected-to"></div>

<div id="new-connection" class="icon-black apps-v2-only">
<img src="plus.webp" i18n-title="NEW_CONNECTION">
<div id="new-window" class="icon-black apps-v2-only">
<img src="plus.webp" i18n-title="NEW_WINDOW">
</div>

<div class="box-spacer"></div>
Expand Down Expand Up @@ -59,15 +59,6 @@
</ul>
</span>

<span class="menu-button" id="help-feedback-toolbar">
<img src="icon_help.webp" class="menu-button-activator help-icon">
<ul class="right-align">
<li class="menu-help" i18n-content="HELP"></li>
<li class="menu-feedback" i18n-content="ACTIONBAR_FEEDBACK"></li>
<li class="menu-credits" i18n-content="CREDITS"></li>
</ul>
</span>

</div>

<div class="toolbar-stub" id="toolbar-stub">
Expand Down
10 changes: 1 addition & 9 deletions remoting/webapp/crd/html/ui_header.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,19 +12,11 @@ <h1 class="icon-label" i18n-content="PRODUCT_NAME"></h1>

<div class="box-spacer"></div>

<div id="top-secondary" data-ui-mode="home">
<div data-ui-mode="home">
<span id="current-email"></span>
<a id="sign-out" href="#"
i18n-content="SIGN_OUT_BUTTON"
class="apps-v1-only"></a>
<span class="menu-button" id="help-feedback-main">
<img src="icon_help.webp" class="menu-button-activator help-icon">
<ul class="right-align">
<li class="menu-help" i18n-content="HELP"></li>
<li class="menu-feedback" i18n-content="ACTIONBAR_FEEDBACK"></li>
<li class="menu-credits" i18n-content="CREDITS"></li>
</ul>
</span>
</div>

</header>
8 changes: 5 additions & 3 deletions remoting/webapp/crd/html/window_frame.css
Original file line number Diff line number Diff line change
Expand Up @@ -122,9 +122,11 @@ html.apps-v2 .window-body {
border-right: none;
}

/* The Disconnect and options buttons are only displayed when connected. */
body:not(.connected) .window-disconnect,
body:not(.connected) .window-options {
/*
* Some UI (the Disconnect button and some menu items) are only displayed when
* connected.
*/
body:not(.connected) .connected-only {
display: none;
}

Expand Down
24 changes: 12 additions & 12 deletions remoting/webapp/crd/html/window_frame.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,25 +11,25 @@
<img src="icon_options.webp">
</span>
<ul class="window-options-menu right-align">
<li class="menu-start-stop-recording"
<li class="menu-start-stop-recording connected-only"
i18n-content="START_RECORDING"
hidden></li>
<li class="menu-send-ctrl-alt-del"
<li class="menu-send-ctrl-alt-del connected-only"
i18n-content="SEND_CTRL_ALT_DEL"></li>
<li class="menu-send-print-screen"
<li class="menu-send-print-screen connected-only"
i18n-content="SEND_PRINT_SCREEN"></li>
<li class="menu-map-right-ctrl-to-meta"
<li class="menu-map-right-ctrl-to-meta connected-only"
i18n-content="MAP_RIGHT_CTRL_TO_META"></li>
<li class="menu-separator"></li>
<li class="menu-resize-to-client"
<li class="menu-separator connected-only"></li>
<li class="menu-resize-to-client connected-only"
i18n-content="RESIZE_TO_CLIENT"></li>
<li class="menu-shrink-to-fit"
<li class="menu-shrink-to-fit connected-only"
i18n-content="SHRINK_TO_FIT"></li>
<li class="menu-separator connected-only"></li>
<li class="menu-new-window"
i18n-content="NEW_WINDOW"></li>
<li class="menu-separator"></li>
<li class="menu-new-connection"
i18n-content="NEW_CONNECTION"></li>
<li class="menu-separator"></li>
<li class="menu-toggle-connection-stats"
<li class="menu-toggle-connection-stats connected-only"
i18n-content="TOGGLE_STATS"></li>
<li class="menu-help"
i18n-content="HELP"></li>
Expand All @@ -40,7 +40,7 @@
</ul>
</span>
<span i18n-title="DISCONNECT_MYSELF_BUTTON"
class="window-control window-disconnect">
class="window-control window-disconnect connected-only">
<img src="icon_disconnect.webp">
</span>
<span class="window-title">&nbsp;</span>
Expand Down
8 changes: 0 additions & 8 deletions remoting/webapp/crd/js/desktop_remoting.js
Original file line number Diff line number Diff line change
Expand Up @@ -108,16 +108,8 @@ remoting.DesktopRemoting.prototype.initApplication_ = function() {
document.getElementById('access-mode-button').addEventListener(
'click', this.connectIt2Me_.bind(this), false);

var homeFeedback = new remoting.MenuButton(
document.getElementById('help-feedback-main'));
var toolbarFeedback = new remoting.MenuButton(
document.getElementById('help-feedback-toolbar'));
remoting.manageHelpAndFeedback(
document.getElementById('title-bar'));
remoting.manageHelpAndFeedback(
document.getElementById('help-feedback-toolbar'));
remoting.manageHelpAndFeedback(
document.getElementById('help-feedback-main'));

remoting.showOrHideIT2MeUi();
remoting.showOrHideMe2MeUi();
Expand Down
2 changes: 1 addition & 1 deletion remoting/webapp/crd/js/toolbar.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ remoting.Toolbar.prototype.createOptionsMenu = function() {
document.getElementById('map-right-ctrl-to-meta'),
document.getElementById('screen-resize-to-client'),
document.getElementById('screen-shrink-to-fit'),
document.getElementById('new-connection'),
document.getElementById('new-window'),
document.getElementById('toggle-full-screen'),
null,
null);
Expand Down
2 changes: 1 addition & 1 deletion remoting/webapp/crd/js/window_frame.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ remoting.WindowFrame.prototype.createOptionsMenu = function() {
this.titleBar_.querySelector('.menu-map-right-ctrl-to-meta'),
this.titleBar_.querySelector('.menu-resize-to-client'),
this.titleBar_.querySelector('.menu-shrink-to-fit'),
this.titleBar_.querySelector('.menu-new-connection'),
this.titleBar_.querySelector('.menu-new-window'),
this.titleBar_.querySelector('.window-fullscreen'),
this.titleBar_.querySelector('.menu-toggle-connection-stats'),
this.titleBar_.querySelector('.menu-start-stop-recording'));
Expand Down
1 change: 0 additions & 1 deletion remoting/webapp/files.gni
Original file line number Diff line number Diff line change
Expand Up @@ -478,7 +478,6 @@ remoting_webapp_resource_files = [
"../resources/icon_cross.webp",
"../resources/icon_disconnect.webp",
"../resources/icon_fullscreen.webp",
"../resources/icon_help.webp",
"../resources/icon_host.webp",
"../resources/icon_maximize_restore.webp",
"../resources/icon_minimize.webp",
Expand Down

0 comments on commit c6ba34a

Please sign in to comment.