Artifact viewer: full screen view; HTML scrolls, pans and zooms; links open safely
Full screen button in the viewer's bottom bar opens a root full-screen route with the same bar and top bar; exit by the bar, Close, Escape or back. It renders the already fetched bytes, never the system browser. The external Open action is now labelled Open in browser. Native web views claim their gestures (vertical drags inline, every pointer in full screen) so the page swipe no longer starves them. On the web, full screen adds zoom buttons that scale the live sandboxed frame. Links: in-page anchors scroll, http(s)/mailto open outside, everything else is inert. Capture kit: --touch, swipe=, pinch=, tabs=; html=1 fixture artifact.
This commit is contained in:
@@ -72,6 +72,13 @@ JsonMap probeRunDetail() => {
|
||||
'size_bytes': 12,
|
||||
'url': '/artifacts/7/2/release-report.txt',
|
||||
},
|
||||
if (_htmlArtifact)
|
||||
{
|
||||
'name': 'release-dashboard.html',
|
||||
'content_type': 'text/html',
|
||||
'size_bytes': 4096,
|
||||
'url': '/artifacts/7/2/release-dashboard.html',
|
||||
},
|
||||
],
|
||||
'file_changes': _probeChanges([
|
||||
'lib/release/train.dart',
|
||||
@@ -123,6 +130,10 @@ JsonMap _probeChanges(List<String> paths) => {
|
||||
int _fillerRunCount = 0;
|
||||
int _fillerStepCount = 0;
|
||||
|
||||
/// `?html=1` adds `release-dashboard.html` to run 7's build visit; the capture
|
||||
/// serves its bytes from the build directory (see notes/artifact-fullscreen.md).
|
||||
bool _htmlArtifact = false;
|
||||
|
||||
List<JsonMap> _fillerSteps() => [
|
||||
for (var i = 0; i < _fillerStepCount; i++)
|
||||
{
|
||||
@@ -583,6 +594,7 @@ class _FixtureSink implements WebSocketSink {
|
||||
/// `?route=/runs/7/stage/build%3Fvisit%3D1` opens that app location;
|
||||
/// `?runs=200` / `?steps=60` append filler runs / run-7 steps for scroll
|
||||
/// performance captures;
|
||||
/// `?html=1` adds an HTML artifact to run 7 (`release-dashboard.html`);
|
||||
/// `?q=release` types that query into Search once its field is shown;
|
||||
/// `?platform=cupertino` renders the Cupertino host (`material`, the
|
||||
/// default, renders Material as browsers do);
|
||||
@@ -606,6 +618,7 @@ void main() {
|
||||
configurePerfFixture(params);
|
||||
_fillerRunCount = int.tryParse(params['runs'] ?? '') ?? 0;
|
||||
_fillerStepCount = int.tryParse(params['steps'] ?? '') ?? 0;
|
||||
_htmlArtifact = params['html'] == '1';
|
||||
final cupertino = params['platform'] == 'cupertino';
|
||||
final route = params['route'];
|
||||
final opensRoute = route != null && route.startsWith('/');
|
||||
|
||||
Reference in New Issue
Block a user