Skip to content

Commit 7a70fa0

Browse files
committed
Bring UI inline with Firefox 50
1 parent 6db5b6a commit 7a70fa0

File tree

5 files changed

+44
-8
lines changed

5 files changed

+44
-8
lines changed

src/firefox/chrome/tool.js

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -175,8 +175,15 @@ let ToolbarView = {
175175
this._clearButton = $('#clear-button');
176176
this._preserveLogCheckbox = $('#preserve-log');
177177

178-
this._captureToggleButton.setAttribute('label', L10N.getStr('startLabel'));
179-
this._clearButton.setAttribute('label', L10N.getStr('clearLabel'));
178+
// Prior to v48, use buttons text labels instead of icons. Altough pre-48
179+
// supported icons, the icon colouring requirements were different
180+
if (appVersion < 50) {
181+
this._captureToggleButton.classList.remove('record-button');
182+
this._clearButton.classList.remove('devtools-clear-icon');
183+
this._clearButton.setAttribute('label', L10N.getStr('clearLabel'));
184+
}
185+
186+
this._clearButton.setAttribute('tooltiptext', L10N.getStr('clearTooltip'));
180187
this._preserveLogCheckbox.setAttribute('label', L10N.getStr('preserveLogLabel'));
181188

182189
this._onCaptureTogglePressed = this._onCaptureTogglePressed.bind(this);
@@ -215,12 +222,18 @@ let ToolbarView = {
215222
BeaconPropertiesView.hide();
216223
},
217224
_onBeaconMonitorStart: function() {
218-
let label = L10N.getStr('stopLabel');
219-
this._captureToggleButton.setAttribute('label', label);
225+
if (appVersion < 50) {
226+
this._captureToggleButton.setAttribute('label', L10N.getStr('stopLabel'));
227+
}
228+
this._captureToggleButton.setAttribute('tooltiptext', L10N.getStr('stopTooltip'));
229+
this._captureToggleButton.setAttribute('checked', 'true');
220230
},
221231
_onBeaconMonitorStop: function() {
222-
let label = L10N.getStr('startLabel');
223-
this._captureToggleButton.setAttribute('label', label);
232+
if (appVersion < 50) {
233+
this._captureToggleButton.setAttribute('label', L10N.getStr('startLabel'));
234+
}
235+
this._captureToggleButton.setAttribute('tooltiptext', L10N.getStr('startTooltip'));
236+
this._captureToggleButton.removeAttribute('checked');
224237
}
225238
};
226239

src/firefox/chrome/tool.xul

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212
<box>
1313
<toolbar class="devtools-toolbar" flex="1">
1414
<hbox class="devtools-toolbarbutton-group">
15-
<toolbarbutton id="capture-button" class="devtools-toolbarbutton" />
16-
<toolbarbutton id="clear-button" class="devtools-toolbarbutton" />
15+
<toolbarbutton id="clear-button" class="devtools-toolbarbutton devtools-clear-icon" />
16+
<toolbarbutton id="capture-button" class="devtools-toolbarbutton record-button" />
1717
</hbox>
1818
<checkbox id="preserve-log" checked="true" />
1919
</toolbar>

src/firefox/locale/en-US/strings.properties

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,11 @@ devtoolsTooltip=Google Analytics Debugger
33

44
# Button labels
55
startLabel=Start
6+
startTooltip=Start recording
67
stopLabel=Stop
8+
stopTooltip=Stop recording
79
clearLabel=Clear
10+
clearTooltip=Clear the beacon log
811
preserveLogLabel=Preserve log
912

1013
# Tracker

src/firefox/skin/icon-record.svg

Lines changed: 3 additions & 0 deletions
Loading

src/firefox/skin/style.css

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,3 +72,20 @@
7272
background-position: 45px 50%;
7373
padding-left: 60px;
7474
}
75+
76+
.record-button {
77+
list-style-image: url(icon-record.svg);
78+
}
79+
80+
#trackers-list {
81+
min-width: 150px;
82+
}
83+
#tracker-beacons {
84+
min-width: 300px;
85+
}
86+
#beacon-properties {
87+
min-width: 300px;
88+
}
89+
#preserve-log {
90+
margin-left: .75em;
91+
}

0 commit comments

Comments
 (0)