fix: align extension search with compact toolbar controls

This commit is contained in:
Levi committed 2026-09-08 21:27:52 +08:00
1 parent a834ca0d74
commit 47db539d91
3 files changed
+6 -2

No files matched your search

+4 -2
View File
@@ -414,7 +414,7 @@ void main() {
child: shad.ShadcnApp(
theme: AppTheme.light(),
materialTheme: AppTheme.materialLight(),
home: const ExtensionsPage(),
home: const AppComponentThemes(child: ExtensionsPage()),
),
),
);
@@ -434,6 +434,7 @@ void main() {
final cardRect = tester.getRect(find.byKey(const ValueKey('extension-card-extension-0')));
final rightmostCardRect = tester.getRect(find.byKey(const ValueKey('extension-card-extension-2')));
final appMarkRect = tester.getRect(find.byKey(const ValueKey('primary-rail-app-mark')));
expect(searchRect.height, closeTo(sortRect.height, 0.01));
expect(searchRect.width, 240);
expect(searchRect.width, lessThan(cardRect.width));
expect(sortRect.left - searchRect.right, closeTo(10, 0.01));
@@ -466,6 +467,7 @@ void main() {
expect(find.byType(PrimaryRail), findsOneWidget);
final compactSearchRect = tester.getRect(find.byKey(const ValueKey('extension-search-field-container')));
expect(compactSearchRect.width, lessThan(240));
expect(compactSearchRect.height, closeTo(sortRect.height, 0.01));
expect(
tester.getRect(find.byKey(const ValueKey('extension-sort-control'))).center.dy,
closeTo(compactSearchRect.center.dy, 0.01),
@@ -710,7 +712,7 @@ void main() {
child: shad.ShadcnApp(
theme: AppTheme.light(),
materialTheme: AppTheme.materialLight(),
home: const ExtensionsPage(),
home: const AppComponentThemes(child: ExtensionsPage()),
),
),
);