Strengthen active chat marker and fade identity tint across selection

This commit is contained in:
2026-11-07 14:34:06 +00:00
parent b7fc221360
commit cc28dcbca0
7 changed files with 49 additions and 20 deletions
@@ -68,15 +68,15 @@ void main() {
final color = cupertino
? tester.widget<ColoredBox>(surface).color
: tester.widget<Material>(surface).color;
expect(
color,
active
? AppListRow.selectedColor(
tester.element(row),
cupertino: cupertino,
)
: const Color(0x00000000),
expect(color, const Color(0x00000000));
final highlight = tester.widget<AnimatedContainer>(
find.byKey(ValueKey('chat-visibility-$id')),
);
final gradient =
(highlight.decoration as BoxDecoration).gradient!
as LinearGradient;
expect(gradient.colors.first.a > 0, active);
expect(gradient.colors.last.a > 0, active);
}
expectRow('a', true);
@@ -2,6 +2,7 @@ import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:pipelines_app/core/api_gateway.dart';
import 'package:pipelines_app/features/chat/ui/sessions/chat_color_palette.dart';
import 'package:pipelines_app/features/chat/data/chat_repository.dart';
import 'package:pipelines_app/features/chat/ui/sessions/chat_sessions_controller.dart';
import 'package:pipelines_app/features/chat/ui/sessions/chat_sessions_screen.dart';
@@ -207,11 +208,17 @@ void main() {
),
);
final surface = tester.widget<Material>(find.byKey(appListRowSurfaceKey));
expect(surface.color, Colors.transparent);
final highlight = tester.widget<AnimatedContainer>(
find.byKey(const ValueKey('chat-visibility-s1')),
);
final gradient =
(highlight.decoration as BoxDecoration).gradient! as LinearGradient;
expect(gradient.colors.first.a, greaterThan(gradient.colors.last.a));
final context = tester.element(find.byType(ChatSessionRow));
expect(
surface.color,
AppListRow.selectedColor(context, cupertino: false),
reason: 'The selected fill, not the tint, marks the open row',
gradient.colors.first.withValues(alpha: 1),
chatColorShade(context, 'amber'),
);
expect(find.byKey(appListRowAccentKey), findsNothing);
expect(find.byKey(const ValueKey('chat-visibility-s1')), findsOneWidget);
@@ -79,9 +79,9 @@ void main() {
await tester.pump();
await tester.pump(const Duration(milliseconds: 100));
expect(edge(tester, 'on').width, greaterThan(3));
expect(edge(tester, 'on').width, lessThan(7));
expect(edge(tester, 'on').width, lessThan(10));
await tester.pumpAndSettle();
expect(edge(tester, 'on').width, 7);
expect(edge(tester, 'on').width, 10);
update(() => active = false);
await tester.pumpAndSettle();
expect(edge(tester, 'on').width, 3);
@@ -123,7 +123,7 @@ void main() {
);
await tester.pumpAndSettle();
expect(find.byTooltip('Expand chat list'), findsOneWidget);
expect(edge(tester, 'a').width, 7);
expect(edge(tester, 'a').width, 10);
expect(edge(tester, 'b').width, 3);
expect(edge(tester, 'c').style, BorderStyle.none);
final avatars = tester