WIP: fade-through tab transitions (run #228)
This commit is contained in:
@@ -16,6 +16,7 @@ import '../pipelines_controller.dart';
|
||||
import '../ui/run_pipeline_action.dart';
|
||||
import 'pipeline_controls.dart';
|
||||
import '../../../ui/text/markdown_source_view.dart';
|
||||
import '../../../ui/motion/fade_through_stack.dart';
|
||||
import 'pipeline_detail_styles.dart';
|
||||
import 'pipeline_graph_tab.dart';
|
||||
import 'pipeline_summary_view.dart';
|
||||
@@ -167,9 +168,10 @@ class _PipelineDetailPanelState extends State<PipelineDetailPanel> {
|
||||
child: FloatingBarOverlay(
|
||||
edge: edge,
|
||||
bar: tabs,
|
||||
child: Builder(
|
||||
builder: (context) => switch (_tab) {
|
||||
PipelineDetailTab.summary => _scrolling(
|
||||
child: FadeThroughStack(
|
||||
index: PipelineDetailTab.values.indexOf(_tab),
|
||||
children: [
|
||||
_scrolling(
|
||||
PipelineSummaryView(
|
||||
controller: _controller,
|
||||
detail: detail,
|
||||
@@ -177,7 +179,7 @@ class _PipelineDetailPanelState extends State<PipelineDetailPanel> {
|
||||
showIdentity: !inBar,
|
||||
),
|
||||
),
|
||||
PipelineDetailTab.graph => BelowTopBar(
|
||||
BelowTopBar(
|
||||
child: PipelineGraphTab(
|
||||
detail: detail,
|
||||
selectedStage: _graphSelection,
|
||||
@@ -185,8 +187,8 @@ class _PipelineDetailPanelState extends State<PipelineDetailPanel> {
|
||||
_openGraphStage(context, detail, stageKey),
|
||||
),
|
||||
),
|
||||
PipelineDetailTab.source => _source(context, detail),
|
||||
},
|
||||
_source(context, detail),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import '../../../ui/adaptive/floating_bar_layout.dart';
|
||||
import '../../../ui/adaptive/segmented_bar.dart';
|
||||
import '../../../ui/adaptive/top_glass_strip.dart';
|
||||
import '../../../ui/motion/fade_through_stack.dart';
|
||||
import 'dart:math' as math;
|
||||
|
||||
import 'package:flutter/cupertino.dart';
|
||||
@@ -374,10 +375,10 @@ class _RunDetailTabsState extends State<RunDetailTabs> {
|
||||
selected: shown,
|
||||
onSelected: (tab) => setState(() => _tab = tab),
|
||||
);
|
||||
final body = KeyedSubtree(
|
||||
final body = FadeThroughStack(
|
||||
key: ValueKey('run-detail-body-${widget.run['id']}'),
|
||||
// Every tab fills the pane, on a phone and an unfolded foldable alike.
|
||||
child: _body(shown),
|
||||
index: tabs.indexOf(shown),
|
||||
children: [for (final tab in tabs) _body(tab)],
|
||||
);
|
||||
if (edge == FloatingBarEdge.top &&
|
||||
constraints.maxWidth >= kRunDetailWideChromeMinWidth) {
|
||||
|
||||
@@ -2,6 +2,7 @@ import 'package:flutter/material.dart';
|
||||
|
||||
import '../../../core/api_gateway.dart';
|
||||
import '../../../ui/adaptive/floating_bar_layout.dart';
|
||||
import '../../../ui/motion/fade_through_stack.dart';
|
||||
import 'run_detail_content.dart';
|
||||
import 'run_detail_visit_facts_view.dart';
|
||||
import 'run_detail_visit_sections.dart';
|
||||
@@ -73,18 +74,24 @@ class _RunVisitPaneState extends State<RunVisitPane> {
|
||||
onSelected: (section) => setState(() => _section = section),
|
||||
),
|
||||
// Every section fills the page, on a phone and an unfolded foldable.
|
||||
child: runVisitSectionBody(
|
||||
section: _section,
|
||||
run: widget.run,
|
||||
step: widget.step,
|
||||
visitIndex: widget.visitIndex,
|
||||
stageKey: widget.visit.stage,
|
||||
runSteps: widget.runSteps,
|
||||
gateway: widget.gateway,
|
||||
onRunChanged: widget.onRunChanged,
|
||||
configuredEndpoint: widget.configuredEndpoint,
|
||||
cupertino: widget.cupertino,
|
||||
facts: RunVisitFactsView(step: widget.step),
|
||||
child: FadeThroughStack(
|
||||
index: shownVisitSections.indexOf(visitTabFor(_section)),
|
||||
children: [
|
||||
for (final section in shownVisitSections)
|
||||
runVisitSectionBody(
|
||||
section: section,
|
||||
run: widget.run,
|
||||
step: widget.step,
|
||||
visitIndex: widget.visitIndex,
|
||||
stageKey: widget.visit.stage,
|
||||
runSteps: widget.runSteps,
|
||||
gateway: widget.gateway,
|
||||
onRunChanged: widget.onRunChanged,
|
||||
configuredEndpoint: widget.configuredEndpoint,
|
||||
cupertino: widget.cupertino,
|
||||
facts: RunVisitFactsView(step: widget.step),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user