-
Notifications
You must be signed in to change notification settings - Fork 63
Expand file tree
/
Copy pathnextstep.html
More file actions
300 lines (272 loc) · 12.1 KB
/
nextstep.html
File metadata and controls
300 lines (272 loc) · 12.1 KB
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
---
title: Organize a Technical Report Transition (2023 Process)
toc: false
---
<h2 id="sotd">About This Document</h2>
<p>This resource assists in finding the internal W3C Technical Report publication processes.</p>
<h2 id="snext">Next Steps</h2>
<div class="field">
<label for="shortname" id="shortnameLabel">
<span class="field-label">Shortname</span>
</label>
<div class="field-hint" id="hint-shortname">You may use a TR shortname to find out your next step</div>
<input type="text" id="shortname" name="shortname" aria-describedby="hint-shortname" class="input-width-40"
minlength="3" maxlength="40" list="w3ctr">
<datalist id='w3ctr'>
</datalist>
</div>
<div aria-live="assertive" aria-atomic="true" id='next'>
<div id='spec'>
<p><strong>We found the following information:</strong></p>
<ul>
<li>Title: <span id='spec_title'></span></li>
<li>Shortname: <span id='spec_shortname'></span></li>
<li>Date: <span id='spec_date'></span></li>
<li>Shortlink: <span id='spec_shortlink'></span></li>
<li>URL: <span id='spec_uri'></span></li>
<li>Status: <span id='spec_status'></span></li>
<li>Published by: <span id='spec_deliverers'></span></li>
</ul>
</div>
<p><strong>Your possible next steps are:</strong></p>
<ul id='step_list'>
</ul>
</div>
<h2 id='resources'>Other resources</h2>
<ul>
<li><a href=".">Organize a Technical Report Transition</a></li>
<li><a href="milestones.html">Milestones planning</a></li>
<li><a href="timeline.svg">174 days to W3C Recommendation</a></li>
<li><a href="https://www.w3.org/policies/process/#Reports">Recommendation Track Process</a></li>
</ul>
<script type="module">
import configuration from 'https://www.w3.org/PM/Groups/lib/config.js';
import hal from 'https://www.w3.org/PM/Groups/lib/hal.js';
import { json } from 'https://www.w3.org/PM/Groups/lib/fetch.js'
const config = configuration();
const trace = (config.debug)? console.log : () => {};
function getLatestSpec(shortname) {
return json(`${config.w3cAPI}/specifications/` + shortname).then(spec => {
const shortname = spec.shortname;
return json(spec["_links"]["latest-version"].href).then(latest => {
latest.shortname = shortname;
return latest;
});
});
}
async function findSpecOptions(shortname) {
const items = hal(`${config.w3cAPI}/specifications-by-shortname/` + shortname, "specifications");
const specs = [];
for await (const item of items) {
specs.push(item);
}
return (specs.length > 0) ?
specs.map(s => s.href.split('/').at(-1))
: [];
}
// State and browser history handling
// browser history status push
function onpushstate() {
let query = "";
// this query setup is more cumbersome but it favors clean/reduced url query
if (config.shortname) {
query = "?shortname=" + config.shortname;
}
window.history.pushState(config, config.shortname, query);
trace("pushed " + window.location.href);
}
// browser back and forward buttons
window.onpopstate = function (e) {
config = e.state || {};
adjustForms();
trace("popped " + window.location.href);
}
function findShortname(s) {
const w3ctr = document.getElementById("w3ctr");
if (s.length > 2) {
while (w3ctr.firstChild) {
w3ctr.removeChild(w3ctr.firstChild);
}
findSpecOptions(s).then(options => {
// dynamic autocompletion
options.forEach(option => {
const elt = document.createElement('option');
elt.value = option;
w3ctr.appendChild(elt);
});
// display a spec if we find one
getLatestSpec(s)
.then(spec => {
return json(spec._links.deliverers.href + "?embed=true").then(deliverers => {
deliverers = deliverers._embedded.deliverers;
spec.isGroupClosed = deliverers.reduce((a, c) => a && c["is_closed"], true);
spec.deliverers = deliverers;
return spec;
});
}).then(spec => {
config.shortname = s;
updateSpec(spec);
onpushstate();
trace(spec);
}).catch(err => {
// console.error(err);
updateSpec();
});
});
}
}
const BASE = "./";
const INPLACE = "<li><a href='https://www.w3.org/guide/standards-track/republishing/'>In-place modification of W3C Technical Reports</a></li>";
function listItem(text, query) {
return "<li><a href='" + BASE + '?' + query + "'>" + text + "</a></li>";
}
function nextSteps(spec) {
const next = document.getElementById("next");
const list = document.getElementById("step_list");
if (spec.isGroupClosed) {
if (spec.status === "Recommendation") {
list.innerHTML = INPLACE + listItem("Publish an Amended Recommendation with only editorial changes", "profile=REC&rec=editorial")
+ listItem("Publish a Candidate Recommendation with substantive changes (but no new features)", "profile=CR&cr=rec-amended")
+ listItem("Propose to obsolete or supersede the Recommendation", "profile=PR-OBSL");
} else if (spec.status === "Group Note") {
list.innerHTML = INPLACE + listItem("contact webreq@w3.org", "profile=WG-NOTE");
} else if (spec.status === "Retired") {
list.innerHTML = listItem("Propose to restore the Recommendation", "");
} else {
list.innerHTML = listItem("Publish as Working Group Note (oops, this should have been done already)", "profile=WG-NOTE");
}
} else if (spec.status === "Working Draft" || spec.status === "First Public Working Draft") { // !isGroupClosed(spec)
let wd = "";
if (!spec["_links"]["predecessor-version"]) {
if ((new Date()).toISOString().slice(0,10) === spec.date) wd = INPLACE; // same day only
}
list.innerHTML = wd + listItem("Revise the Working Draft", "profile=WD")
+ listItem("Advance to Candidate Recommendation", "profile=CR&cr=new")
+ listItem("Publish as a Discontinued Draft", "profile=DISC");
} else if (spec.status === "Candidate Recommendation") {
list.innerHTML = listItem("Revise the Candidate Recommendation Draft", "profile=CR&cr=draft")
+ listItem("Revise as a Candidate Recommendation Snapshot", "profile=CR&cr=snapshot")
+ listItem("Advance to Recommendation", "profile=newREC")
+ listItem("Return to Working Draft", "profile=WD&returning=true")
+ listItem("Publish as a Discontinued Draft", "profile=DISC");
} else if (spec.status === "Candidate Recommendation Draft" || spec.status === "Candidate Recommendation Snapshot") {
list.innerHTML = listItem("Revise the Candidate Recommendation Draft", "profile=CR&cr=draft")
+ listItem("Revise as a Candidate Recommendation Snapshot", "profile=CR&cr=snapshot")
+ listItem("Advance to Recommendation", "profile=newREC")
+ listItem("Return to Working Draft", "profile=WD&returning=true")
+ listItem("Publish as a Discontinued Draft", "profile=DISC");
} else if (spec.status === "Recommendation") {
list.innerHTML = INPLACE + listItem("Revise the Recommendation with only editorial changes", "profile=REC&rec=editorial")
+ listItem("Publish as a Recommendation with candidate corrections (substantive changes)", "profile=REC&cr=candidate-corrections")
+ listItem("Publish as a Recommendation with candidate additions (new features)", "profile=REC&cr=candidate-additions")
+ listItem("Incorporate candidate corrections (substantive changes)", "profile=REC&cr=substantive")
+ listItem("Incorporate candidate additions (new features)", "profile=REC&cr=features")
+ listItem("Publish as a First Public Working Draft with new features (if your current Recommendation doesn't allow those)", "profile=FPWD")
+ listItem("Propose to rescind the Recommendation", "profile=PR-RSCND")
+ listItem("Propose to obsolete or supersede the Recommendation", "profile=PR-OBSL");
} else if (spec.status === "Draft Registry") {
list.innerHTML = listItem("Revise the Draft Registry", "profile=DRAFT-REGISTRY")
+ listItem("Advance to Candidate Registry", "profile=CRY&cr=new")
+ listItem("Publish as a Note (which you may mark as retired)", "profile=WG-NOTE");
} else if (spec.status === "Candidate Registry") {
list.innerHTML = listItem("Revise the Candidate Registry Draft", "profile=CRY&cr=draft")
+ listItem("Revise as a Candidate Registry Snapshot", "profile=CRY&cr=snapshot")
+ listItem("Request an Advisory Committee Review", "profile=RY&rec=new")
+ listItem("Return to Draft Registry", "profile=DRAFT-REGISTRY&returning=true")
+ listItem("Publish as a Note (which you may mark as retired)", "profile=WG-NOTE");
} else if (spec.status === "Candidate Registry Draft" || spec.status === "Candidate Registry Snapshot") {
list.innerHTML = listItem("Revise the Candidate Registry Draft", "profile=CRY&cr=draft")
+ listItem("Revise as a Candidate Registry Snapshot", "profile=CRY&cr=snapshot")
+ listItem("Request an Advisory Committee Review", "profile=RY&rec=new")
+ listItem("Return to Draft Registry", "profile=DRAFT-REGISTRY&returning=true")
+ listItem("Publish as a Note (which you may mark as retired)", "profile=WG-NOTE");
} else if (spec.status === "Registry") {
list.innerHTML = INPLACE + listItem("Revise the Registry", "profile=RY&rec=update")
+ listItem("Propose to obsolete or supersede the Registry", "profile=PRY-OBSL");
} else if (spec.status === "Draft Note") {
list.innerHTML = listItem("Revise the Draft Note", "profile=DRAFT-NOTE")
+ listItem("Publish as a Note (which you may mark as retired)", "profile=WG-NOTE");
} else if (spec.status === "Group Note" || spec.status === "Note") {
list.innerHTML = INPLACE
+ listItem("Return to Draft Note", "profile=DRAFT-NOTE")
+ listItem("Advance to W3C Statement", "profile=STMT")
+ listItem("Revise the Note (which you may mark as retired)", "profile=WG-NOTE");
} else if (spec.status === "Retired") {
list.innerHTML = listItem("Propose to restore the Recommendation", "");
} else {
list.innerHTML = listItem("... Not sure yet. See the transition requirements", "");
}
next.style.display = "block";
}
function defaultStep() {
const next = document.getElementById("next");
const list = document.getElementById("step_list");
list.innerHTML = listItem("Publish as a First Public Working Draft", "profile=FPWD")
+ listItem("Publish as a Working Group Note", "profile=WG-NOTE");
next.style.display = "block";
}
function updateSpec(spec) {
const div = document.getElementById("spec");
if (spec === undefined) {
div.style.display = "none";
document.getElementById("next").style.display = "none";
defaultStep();
} else {
for (const key in spec) {
const elt = document.getElementById("spec_" + key);
if (elt !== null) {
const obj = spec[key];
if (key === "deliverers") {
elt.innerHTML = "";
const groups = spec.deliverers
for (let index = 0; index < groups.length; index++) {
let group = groups[index];
let a = document.createElement("a");
a.href = group._links.homepage.href;
a.textContent = group.name;
elt.appendChild(a);
if (group["is_closed"]) {
elt.appendChild(document.createTextNode(" (closed) "));
}
elt.appendChild(document.createTextNode(", "));
}
} else if (obj instanceof Promise) {
console.log("[Promise] " + key)
} else if (obj.startsWith("https://") || obj.startsWith("http://")) {
elt.innerHTML = "<a href='" + obj + "'>" + obj + "</a>";
} else {
elt.textContent = obj;
}
}
}
div.style.display = "block";
nextSteps(spec);
}
}
function adjustForms() {
// adjust the HTML forms according to the config
trace("adjustForms for " + JSON.stringify(config));
if (config.shortname) {
document.getElementById("shortname").value = config.shortname;
}
}
// initialization
function init() {
document.getElementById("spec").style.display = "none";
document.getElementById("next").style.display = "none";
// each one of those config parameters are matching the ones in the option/input elements
if (config.shortname) {
findShortname(config.shortname);
adjustForms();
}
function onshortname(e) {
const s = e.target.value.trim();
if (s.length > 2) {
findShortname(s);
}
}
document.querySelector("input[type=text]").addEventListener("input", onshortname);
}
window.addEventListener("load", init);
trace("restored " + window.location.href);
</script>