Skip to content

Commit

Permalink
Bug 1762136 - Add version & channel selection options.
Browse files Browse the repository at this point in the history
  • Loading branch information
Standard8 committed Sep 25, 2024
1 parent 1f34950 commit ed7592a
Show file tree
Hide file tree
Showing 4 changed files with 65 additions and 56 deletions.
33 changes: 7 additions & 26 deletions extension/content/enginesView.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,38 +2,19 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */

#locale-region-settings {
display: grid;
justify-content: space-between;
align-items: center;
width: max-content;
margin: 0 auto;
grid-template-rows: repeat(2, auto);
grid-template-columns: repeat(4, calc(25% - 6em / 4));
column-gap: 2ch;
width: 80%;
}

#application-name-wrapper,
#region-select-wrapper,
#locale-select-wrapper {
grid-row: 1 / 3;
#locale-region-settings > table {
width: 100%;
border-spacing: 2ch 0;
}

#locale-region-settings > div > select {
#locale-region-settings select {
min-width: 100%;
}

#locale-region-settings > div {
text-align: center;
}

#locale-region-settings > div > label {
#locale-region-settings input {
display: block;
}

#locale-region-settings > div > input {
width: calc(100% - 8px);
margin: auto;
width: 80%;
}

#engines-table {
Expand Down
4 changes: 4 additions & 0 deletions extension/content/enginesView.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ const enginesSelectionElements = [
"region-select",
"locale-select",
"application-name",
"application-version",
"update-channel",
"distro-id",
"experiment-id",
];
Expand Down Expand Up @@ -120,7 +122,9 @@ export default class EnginesView extends HTMLElement {
region: this.shadowRoot.getElementById("region-select").value,
distroID: this.shadowRoot.getElementById("distro-id").value,
experiment: this.shadowRoot.getElementById("experiment-id").value,
channel: this.shadowRoot.getElementById("update-channel").value,
appName: this.shadowRoot.getElementById("application-name").value,
version: this.shadowRoot.getElementById("application-version").value,
};

let { engines, private: privateDefault } =
Expand Down
76 changes: 46 additions & 30 deletions extension/content/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -121,36 +121,52 @@
<template id="engines-view-template">
<link rel="stylesheet" href="enginesView.css" />
<fieldset id="locale-region-settings">
<div id="region-select-wrapper">
<label for="region-select">Region</label>
<select id="region-select" size="4"></select>
</div>

<div id="locale-select-wrapper">
<label for="locale-select">Locale</label>
<select id="locale-select" size="4"></select>
</div>

<div id="application-name-wrapper">
<label for="application-name">Application</label>
<select id="application-name" size="5">
<option value="firefox" selected>Firefox</option>
<option value="firefox-android">Firefox (Android)</option>
<option value="focus-android">Focus (Android)</option>
<option value="firefox-ios">Firefox (iOS)</option>
<option value="focus-ios">Focus (iOS)</option>
</select>
</div>

<div>
<label for="distro-id">Distribution ID</label>
<input id="distro-id" type="text" />
</div>

<div>
<label for="experiment-id">Experiment ID</label>
<input id="experiment-id" type="text" />
</div>
<table>
<tr>
<th>Region</th>
<th>Locale</th>
<th>Application</th>
<th>Update Channel</th>
<th>Distribution ID</th>
</tr>
<tr>
<td rowspan="5"><select id="region-select" size="4"></select></td>
<td rowspan="5"><select id="locale-select" size="4"></select></td>
<td rowspan="5">
<select id="application-name" size="5">
<option value="firefox" selected>Firefox</option>
<option value="firefox-android">Firefox (Android)</option>
<option value="focus-android">Focus (Android)</option>
<option value="firefox-ios">Firefox (iOS)</option>
<option value="focus-ios">Focus (iOS)</option>
</select>
</td>
<td rowspan="5">
<select id="update-channel" size="5">
<option value="release" selected>Release</option>
<option value="esr">ESR</option>
<option value="beta">Beta</option>
<option value="nightly">Nightly</option>
<option value="default">Default</option>
</select>
</td>
<td>
<input id="distro-id" type="text" />
</td>
</tr>
<tr>
<th>Experiment ID</th>
</tr>
<tr>
<td><input id="experiment-id" type="text" /></td>
</tr>
<tr>
<th>Version</th>
</tr>
<tr>
<td><input id="application-version" type="text" /></td>
</tr>
</table>
</fieldset>

<p id="tooltip">
Expand Down
8 changes: 8 additions & 0 deletions extension/experiments/searchengines/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -163,9 +163,17 @@
"type": "string",
"description": "The user's experiment id"
},
"channel": {
"type": "string",
"description": "The user's update channel"
},
"appName": {
"type": "string",
"description": "The application's name"
},
"version": {
"type": "string",
"description": "The application's version"
}
}
}
Expand Down

0 comments on commit ed7592a

Please sign in to comment.