Animate desktop chat selection border colors

This commit is contained in:
2026-11-07 19:30:30 +00:00
parent 0da7442296
commit 6b654693d9
4 changed files with 70 additions and 3 deletions
@@ -155,6 +155,47 @@ void main() {
);
expect(tester.takeException(), isNull);
});
testWidgets('desktop focus border fades between retained panes', (
tester,
) async {
tester.platformDispatcher.accessibilityFeaturesTestValue =
const FakeAccessibilityFeatures(disableAnimations: false);
addTearDown(tester.platformDispatcher.clearAccessibilityFeaturesTestValue);
await _mount(tester, const Size(1800, 1000));
final controller = tester
.widget<ChatWorkspace>(find.byType(ChatWorkspace))
.controller;
controller.splitActive('b', ChatSplitAxis.horizontal);
await tester.pumpAndSettle();
final state = tester.state(_thread('a'));
controller.activate(
controller.panes.firstWhere((p) => p.sessionId == 'a').id,
);
await tester.pump();
expect(_border(tester, 'a'), Colors.transparent);
await tester.pump(const Duration(milliseconds: 60));
expect(_border(tester, 'a').a, inExclusiveRange(0, 1));
expect(_border(tester, 'b').a, inExclusiveRange(0, 1));
await tester.pumpAndSettle();
expect(
_border(tester, 'a'),
chatColorShade(tester.element(_thread('a')), 'orange'),
);
expect(_border(tester, 'b'), Colors.transparent);
expect(tester.state(_thread('a')), same(state));
tester.platformDispatcher.accessibilityFeaturesTestValue =
const FakeAccessibilityFeatures(disableAnimations: true);
await tester.pump();
controller.activate(
controller.panes.firstWhere((p) => p.sessionId == 'b').id,
);
await tester.pump();
expect(
_border(tester, 'b'),
chatColorShade(tester.element(_thread('b')), 'teal'),
);
expect(_border(tester, 'a'), Colors.transparent);
});
testWidgets('mobile pair keeps only its coloured draggable bottom boundary', (
tester,
) async {