forked from mozilla/standards-positions
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
329 lines (300 loc) · 12.2 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<!-- This Source Code Form is subject to the terms of the Mozilla Public
- 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/. -->
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Mozilla Specification Positions</title>
<link href="components/bootstrap/dist/css/bootstrap.min.css" rel="stylesheet">
<link href="components/datatables/media/css/jquery.dataTables.min.css" rel="stylesheet">
<style>
@font-face {
font-family: "Zilla Slab";
font-weight: bold;
src: url("asset/ZillaSlab-Bold.woff2") format("woff2");
}
.jumbotron h1 {
font-weight: bold;
font-family: "Zilla Slab", serif;
}
/* align sizes with bootstrap's grid snapping of .container */
@media (min-width: 768px) { .jumbotron h1 { font-size: 42px; } }
@media (min-width: 992px) { .jumbotron h1 { font-size: 58px; } }
@media (min-width: 1200px) { .jumbotron h1 { font-size: 72px; } }
.space dt {
padding-bottom: 5px;
}
table.dataTable > tbody > tr:target,
table.dataTable > tbody > tr.shown:target + tr {
background: #fd0;
}
tr:not(:hover):not(:focus-within) > .link-control > a {
visibility: hidden;
}
</style>
</head>
<body>
<div class="container">
<br>
<div class="jumbotron">
<h1><img src="asset/Mozilla.svg" style="height: 1.04em; vertical-align: -0.23em;" alt="Mozilla"> Specification Positions</h1>
<p>This page tracks Mozilla's positions on open Web and Web-related specifications submitted to standards
bodies like the <a href="https://www.ietf.org/">IETF</a>, <a href="https://w3.org/">W3C</a>,
and <a href="https://tc39.github.io/">Ecma TC39</a>.</p>
<p>Please remember, this isn't a commitment to implement or participate;
<strong>it's just what we think right now</strong>. See <a
href="https://platform-status.mozilla.org/">Firefox Platform Status</a>
to find out what we're implementing.</p>
<p><mark>Want Mozilla's position on a specification? <a href="https://github.com/mozilla/standards-positions/">Find out more</a>.</mark></p>
</div>
<div class="col-sm-1"></div>
<div class="col-sm-10">
<table id="mozPositions" class="table table-hover dataTable">
<thead>
<tr>
<th></th>
<th></th>
<th class="sorting">Specification</th>
<th class="sorting">Mozilla Position</th>
<th>Details</th>
<th>More Info</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
</div>
<div class="col-sm-1"></div>
<div class="clearfix"></div>
<h3>legend</h3>
<p>The possible positions are:</p>
<dl class="dl-horizontal space">
<dt><button class="btn btn-dark btn-xs">under consideration</button></dt><dd>Mozilla's position on this specification is being discussed.</dd>
<dt><button class="btn btn-primary btn-xs">important</button></dt><dd>This specification is conceptually good and is important to Mozilla.</dd>
<dt><button class="btn btn-success btn-xs">worth prototyping</button></dt><dd>Mozilla sees this specification as conceptually good, and worth prototyping, getting feedback on its value, and iterating.</dd>
<dt><button class="btn btn-default btn-xs">non-harmful</button></dt><dd>Mozilla does not see this specification as harmful, but is not convinced that it is a good approach or worth working on.</dd>
<dt><button class="btn btn-warning btn-xs">defer</button></dt><dd>Mozilla does not intend to look at this specification at all in the near future.</dd>
<dt><button class="btn btn-danger btn-xs">harmful</button></dt><dd>Mozilla considers this specification to be harmful in its current state.</dd>
</dl>
</div>
<script src="components/jquery/dist/jquery.min.js"></script>
<script src="components/datatables/media/js/jquery.dataTables.min.js"></script>
<script src="components/datatables-plugins/sorting/enum.js"></script>
<script src="components/bootstrap/dist/js/bootstrap.min.js"></script>
<script>
var gFirstTableRender = true;
$(document).ready(function(){
var status_styles = {
"under consideration": "dark",
"important": "primary",
"worth prototyping": "success",
"non-harmful": "default",
"defer": "warning",
"harmful": "danger"
}
var REPO_OWNER = "mozilla";
var REPO_NAME = "standards-positions";
function iconLink(url, text, icon) {
return `<a href='${url || "javascript:void(0)"}' title='${text}'>`
+ `<span class='glyphicon glyphicon-${icon}' aria-hidden='true'></span>`
+ `<span class='sr-only'>${text}</span></a> `;
}
$.fn.dataTable.enum( [ "under consideration", "important",
"worth prototyping", "non-harmful",
"defer", "harmful" ] );
var ptable = $('#mozPositions').DataTable({
"paging": false,
"ajax": {
url: 'activities.json',
dataSrc: ''
},
dom: 'ilfrtip',
rowId: 'id',
"order": [[3, "asc"]],
"columns": [
{
"className": 'link-control',
"data": null,
"defaultContent": '',
"render": function (data, type, row) {
var id = data.id;
if (id != "") {
return iconLink('#' + id, 'link', 'link');
}
return "";
},
"orderable": false,
"searchable": false
},
{
"className": "dt-body-center",
"data": "org",
"render": function (data, type, row) {
if (type !== "display") {
return data;
}
if (data !== "") {
var extension = ".svg"
if (data === "Proposal") {
return iconLink(null, 'Proposal', 'user');
}
if (data === "Ecma") {
data = "JS"
}
return `<img src='asset/${data}${extension}' height='18px' alt='${data}'>`
} else {
return ""
}
},
"orderable": true,
"searchable": false
},
{
"data": "title",
"render": function (data, type, row) {
if (type !== "display") {
return data;
}
return "<a href='" + row.url + "'>" + data + "</a>"
},
"orderable": true,
"searchable": true
},
{
"data": "mozPosition",
"type": "enum-0",
"render": function (data, type, row) {
if (type !== "display") {
return data;
}
if (data !== "" && ! status_styles.hasOwnProperty(data)) {
console.log("WARNING: unrecognised position '" + data + "' on " + row.name)
}
return "<button type='button' class='btn btn-" + status_styles[data] + " btn-xs'>" + data + "</button>"
},
"orderable": true
},
{
"className": 'details-control',
"orderable": false,
"data": null,
"defaultContent": '',
"render": function (data, type, row) {
if ((row.description && row.description !== "") ||
(row.mozPositionDetail && row.mozPositionDetail !== "")) {
return iconLink(null, 'details', 'info-sign');
} else {
return ""
}
}
},
{
"data": "null",
"render": function (data, type, row) {
var out = "";
if (row.mozPositionIssue && row.mozPositionIssue !== "") {
out += iconLink(`https://github.com/${REPO_OWNER}/${REPO_NAME}/issues/${row.mozPositionIssue}`, 'position discussion', 'comment');
}
if (row.mozBugUrl && row.mozBugUrl !== "") {
// Allow either a string or an array of strings.
var bugArray = row.mozBugUrl;
if (!Array.isArray(bugArray)) {
bugArray = [bugArray];
}
for (var bug of bugArray) {
out += iconLink(bug, 'mozilla bug', 'wrench');
}
}
if (row.ciuName && row.ciuName !== "") {
out += iconLink(`https://caniuse.com/#feat=${row.ciuName}`, 'caniuse', 'tasks');
}
return out;
},
"orderable": false,
"searchable": false
}
]
})
function format ( d ) {
// `d` is the original data object for the row
var out = [];
if (d.description && d.description !== "") {
out.push('<dt>Description</dt>' +
'<dd>' + d.description + '</dd>')
}
if (d.mozPositionDetail && d.mozPositionDetail !== "") {
out.push('<dt>Mozilla\'s Position</dt>' +
'<dd>' + d.mozPositionDetail + '</dd>')
}
if (out.length > 0) {
return '<dl class="dl-horizontal">' + out.join("\n")+ '</dl>'
}
}
function open_row(row, tr) {
var extra_data = format(row.data());
if (extra_data !== "") {
row.child( extra_data ).show();
tr.classList.add('shown');
}
}
function close_row(row, tr) {
row.child.hide();
tr.classList.remove('shown');
}
// Add event listener for opening and closing details
$('#mozPositions').find('tbody').on('click', 'td', function (event) {
var a = $(event.target).closest('a');
if (a.length > 0 && !a[0].parentNode.classList.contains("details-control")) {
// Do nothing if the click was on a link, except for the
// details-control.
// FIXME: This is really a bad way to handle the
// details-control link!
return;
}
var tr = $(this).closest('tr')[0];
var row = ptable.row( tr );
if ( row.child.isShown() ) {
// This row is already open - close it
close_row(row, tr);
}
else {
// Open this row
open_row(row, tr);
}
} );
// Work around bugs in both Chrome and Firefox relating to
// anchor scrolling and :target selection.
$('#mozPositions').on('order.dt', function() {
if (gFirstTableRender) {
gFirstTableRender = false;
setTimeout(function() {
var hash = location.hash;
if (hash != "") {
// just "location.hash = location.hash" would be enough for
// Firefox, but not Chrome.
location.hash = "";
location.hash = hash;
}
}, 0);
}
} );
window.addEventListener("hashchange", function (event) {
var hash = location.hash.slice(1);
if (hash == "") {
return;
}
var tr = document.getElementById(hash);
if (!tr) {
return;
}
// Open the row that is now the target.
var row = ptable.row( tr );
open_row(row, tr);
});
})
</script>
</body>
</html>