@@ -204,29 +204,48 @@ Future<shelf.Response> experimentalHandler(shelf.Request request) async {
204
204
205
205
final clearUri = Uri (
206
206
path: '/experimental' , queryParameters: flags.urlParametersForToggle ());
207
- final clearLink = flags.isEmpty ? '' : '(<a href="$clearUri ">clear</a>).' ;
208
- final publicBlock = ExperimentalFlags .publicFlags.map ((f) {
209
- final change = flags.isEnabled (f) ? '0' : '1' ;
210
- final uri = Uri (path: '/experimental' , queryParameters: {f: change});
211
- return '<a href="$uri ">toggle: <b>$f </b></a><br />' ;
212
- }).join ();
207
+ final clearLink = flags.isEmpty ? '' : '(<a href="$clearUri ">clear all</a>).' ;
208
+ final publicBlock = '''
209
+ <ul>
210
+ ${ExperimentalFlags .publicFlags .map ((f ) {
211
+ final change = flags .isEnabled (f .name ) ? '0' : '1' ;
212
+ final uri = Uri (path : '/experimental' , queryParameters : {f .name : change });
213
+ return '<li><b>${f .description }</b> <a href="$uri ">(toggle)</a>' ;
214
+ }).join ()}
215
+ </ul>
216
+ ''' ;
213
217
return htmlResponse ('''
214
218
<!doctype html>
215
219
<html>
216
220
<head>
217
- <meta http-equiv="refresh" content="15; url=/">
218
221
<meta name="robots" content="noindex" />
219
222
</head>
220
223
<body>
221
- <center>
224
+ <h1>Experiments</h1>
225
+ <p>
226
+ Experiments are not an official part of the pub.dev site.
227
+ <p>
228
+ They showcase features we are working on, that are not yet ready for
229
+ deployment, and might still not:
230
+ <ul>
231
+ <li> work fully or as expected,
232
+ <li> be well documented,
233
+ <li> have good accesibility,
234
+ <li> have the final polished styling.
235
+ </ul>
236
+ <p>
237
+ Enable experiments at your own discresion.
238
+ <p>
239
+ An experiment is no promise of an actual later launch of that given feature.
240
+ <p>
241
+ Still, feel free to provide feedback on the
242
+ <a href="https://github.com/dart-lang/pub-dev/issues">issue tracker</a>.
243
+ Be sure to mention what experiments were enabled.
222
244
<p>
223
245
Experiments enabled: <b>$flags </b><br>$clearLink
224
- </p>
225
- <p>$publicBlock </p>
246
+ <p>$publicBlock
226
247
<p>
227
- (redirecting to <a href="/">pub.dev</a> in 15 seconds).
228
- </p>
229
- </center>
248
+ After enabling experiments go back to <a href="/">pub.dev</a>.
230
249
</body>
231
250
</html>''' , headers: {
232
251
HttpHeaders .setCookieHeader: buildSetCookieValue (
0 commit comments