feat(app): artifact viewer actions are bottom icons; swipe pages; native download, share and open in browser

This commit is contained in:
2026-10-23 22:43:35 +01:00
parent c248e8eca6
commit dd324d1f92
12 changed files with 476 additions and 97 deletions
@@ -223,7 +223,11 @@ void main() {
stage: 'review',
visit: 1,
artifacts: <JsonMap>[
artifact('report.zip', contentType: 'application/zip', sizeBytes: 3),
artifact(
'report.zip',
contentType: 'application/zip',
sizeBytes: 3,
),
],
),
],
@@ -262,6 +266,14 @@ void main() {
artifact: _record,
resolved: resolveArtifactUrl(_endpoint, _record.url)!,
fetch: _fetch,
bridge: const ArtifactFileBridge(
downloadSupported: false,
shareSupported: false,
downloadUnsupportedMessage:
'Downloading files is not supported on this platform yet.',
shareUnsupportedMessage:
'File sharing is not supported on this platform yet.',
),
),
),
),
@@ -374,8 +386,8 @@ void main() {
);
await tester.pumpAndSettle();
expect(find.text('Download'), findsOneWidget);
expect(find.text('Share'), findsOneWidget);
expect(find.byKey(const Key('artifact-download')), findsOneWidget);
expect(find.byKey(const Key('artifact-share')), findsOneWidget);
final externalGroup = visitGroup(artifacts: <ArtifactRecord>[external]);
await tester.pumpWidget(
@@ -395,9 +407,9 @@ void main() {
);
await tester.pumpAndSettle();
expect(find.text('Download'), findsNothing);
expect(find.text('Share'), findsNothing);
expect(find.text('Open'), findsOneWidget);
expect(find.byKey(const Key('artifact-download')), findsNothing);
expect(find.byKey(const Key('artifact-share')), findsNothing);
expect(find.byKey(const Key('artifact-open')), findsOneWidget);
},
);
}