Artifact viewer: keep the preview between the top bar and the controls
Every preview (image, text, markdown, HTML, video) now fills the space between the viewer's top bar and its bottom controls instead of passing behind them; the insets are applied once here and removed for the content inside.
This commit is contained in:
@@ -13,11 +13,12 @@ import 'package:pipelines_app/features/artifacts/domain/artifact_record.dart';
|
||||
import 'package:pipelines_app/features/artifacts/ui/artifact_external_open.dart';
|
||||
import 'package:pipelines_app/features/artifacts/ui/artifact_gallery_page.dart';
|
||||
import 'package:pipelines_app/features/artifacts/ui/artifact_viewer_content.dart'
|
||||
show artifactPreviewRetryKey;
|
||||
show ArtifactPreviewBody, artifactPreviewRetryKey;
|
||||
import 'package:pipelines_app/features/artifacts/ui/artifact_viewer_fetch.dart';
|
||||
import 'package:pipelines_app/features/artifacts/ui/artifact_viewer_page.dart';
|
||||
import 'package:pipelines_app/features/artifacts/ui/artifact_visit_list.dart';
|
||||
import 'package:pipelines_app/ui/adaptive/glass_pill.dart';
|
||||
import 'package:pipelines_app/ui/adaptive/segmented_bar.dart';
|
||||
import 'package:pipelines_app/features/chat/ui/transcript/chat_markdown_view.dart';
|
||||
|
||||
import '../domain/artifact_fixtures.dart';
|
||||
@@ -729,6 +730,16 @@ void main() {
|
||||
// Right above the stacked bar, not lifted by its clearance twice
|
||||
// (the bar is one 56 px pill above the inset plus its margin).
|
||||
expect(pager.bottom, greaterThanOrEqualTo(size.height - 120 - 56));
|
||||
// The preview sits between the bars, never behind either.
|
||||
final preview = tester.getRect(
|
||||
find.byType(ArtifactPreviewBody).first,
|
||||
);
|
||||
final actions = tester.getRect(
|
||||
find.byKey(const Key('artifact-viewer-actions')),
|
||||
);
|
||||
final topBar = tester.getRect(find.byType(SegmentedBar).first);
|
||||
expect(preview.bottom, lessThanOrEqualTo(actions.top));
|
||||
expect(preview.top, greaterThanOrEqualTo(topBar.bottom - 1));
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user