Merge commit '3f05421e8b61f063155eb61a166edcee910b750a' into pipelines/run-20261111-1928-focus-chat-composer-when-toggling-from-f-1ed3
This commit is contained in:
@@ -82,6 +82,7 @@ class FilesHeader extends StatelessWidget {
|
|||||||
),
|
),
|
||||||
AppOverflowMenu<FilesSortKey>(
|
AppOverflowMenu<FilesSortKey>(
|
||||||
label: 'Sort',
|
label: 'Sort',
|
||||||
|
icon: const Icon(Icons.sort),
|
||||||
onSelected: (_, key) =>
|
onSelected: (_, key) =>
|
||||||
controller.setSort(controller.sort.reverseOr(key)),
|
controller.setSort(controller.sort.reverseOr(key)),
|
||||||
actions: [
|
actions: [
|
||||||
|
|||||||
@@ -128,6 +128,27 @@ class WindowFrame extends StatelessWidget {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// The foreground edge of a floating window. This is separate from
|
||||||
|
/// [WindowFrame] because the window body is painted by a later navigator
|
||||||
|
/// child and may otherwise cover the card's decoration.
|
||||||
|
class WindowOutline extends StatelessWidget {
|
||||||
|
const WindowOutline({super.key});
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
final colors = Theme.of(context).colorScheme;
|
||||||
|
return IgnorePointer(
|
||||||
|
child: DecoratedBox(
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
border: Border.all(color: colors.outlineVariant),
|
||||||
|
borderRadius: BorderRadius.circular(windowCornerRadius),
|
||||||
|
),
|
||||||
|
child: const SizedBox.expand(),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// The lower right corner of a window: drag to resize.
|
/// The lower right corner of a window: drag to resize.
|
||||||
class WindowResizeCorner extends StatelessWidget {
|
class WindowResizeCorner extends StatelessWidget {
|
||||||
const WindowResizeCorner({
|
const WindowResizeCorner({
|
||||||
|
|||||||
@@ -300,6 +300,7 @@ class _WindowLayerState extends State<WindowLayer>
|
|||||||
onResizeEnd: _resizeEnded,
|
onResizeEnd: _resizeEnded,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
Positioned.fromRect(rect: frame, child: const WindowOutline()),
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
final center = widget.bounds.center(Offset.zero);
|
final center = widget.bounds.center(Offset.zero);
|
||||||
|
|||||||
@@ -33,6 +33,7 @@ class AppOverflowMenu<T> extends StatelessWidget {
|
|||||||
this.label = 'More actions',
|
this.label = 'More actions',
|
||||||
this.sheetTitle,
|
this.sheetTitle,
|
||||||
this.enabled = true,
|
this.enabled = true,
|
||||||
|
this.icon = const Icon(Icons.more_vert),
|
||||||
});
|
});
|
||||||
|
|
||||||
final List<AppMenuAction<T>> actions;
|
final List<AppMenuAction<T>> actions;
|
||||||
@@ -48,6 +49,10 @@ class AppOverflowMenu<T> extends StatelessWidget {
|
|||||||
|
|
||||||
final bool enabled;
|
final bool enabled;
|
||||||
|
|
||||||
|
/// The button glyph. Most callers use the default overflow icon; controls
|
||||||
|
/// whose action has a distinct meaning can provide a matching Material icon.
|
||||||
|
final Widget icon;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
if (actions.isEmpty) return const SizedBox.shrink();
|
if (actions.isEmpty) return const SizedBox.shrink();
|
||||||
@@ -57,7 +62,7 @@ class AppOverflowMenu<T> extends StatelessWidget {
|
|||||||
child: Material(
|
child: Material(
|
||||||
type: MaterialType.transparency,
|
type: MaterialType.transparency,
|
||||||
child: PopupMenuButton<T>(
|
child: PopupMenuButton<T>(
|
||||||
icon: const Icon(Icons.more_vert),
|
icon: icon,
|
||||||
tooltip: label,
|
tooltip: label,
|
||||||
enabled: enabled,
|
enabled: enabled,
|
||||||
onSelected: (value) => onSelected(context, value),
|
onSelected: (value) => onSelected(context, value),
|
||||||
|
|||||||
@@ -0,0 +1,11 @@
|
|||||||
|
# File explorer sort icon
|
||||||
|
|
||||||
|
- Changed `FilesHeader` to use the Material `Icons.sort` glyph for the Sort
|
||||||
|
control instead of the generic overflow glyph.
|
||||||
|
- Extended `AppOverflowMenu` with an optional icon while preserving the default
|
||||||
|
`Icons.more_vert` for existing callers.
|
||||||
|
- Added widget coverage for the recognizable sort icon and key/direction
|
||||||
|
selection behavior.
|
||||||
|
- Focused verification: `files_panel_test.dart` and `files_models_test.dart`
|
||||||
|
through `tool/memwatch/full.sh`, followed by `tool/analyze.sh` (recorded in
|
||||||
|
the stage handoff).
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
# Floating window outline
|
||||||
|
|
||||||
|
- Added a one-logical-pixel `ColorScheme.outlineVariant` outline over the full
|
||||||
|
floating window perimeter, including the body painted by its navigator.
|
||||||
|
- The outline is non-interactive and keeps the existing title drag, body input,
|
||||||
|
resize, popup layering, and window state behavior unchanged.
|
||||||
|
- Focused checks: `window_host_test.dart`, `window_layering_test.dart`, and
|
||||||
|
`window_conveniences_test.dart` — 41 passed.
|
||||||
|
- `tool/analyze.sh` — clean.
|
||||||
|
- Browser captures were not run in this implementation stage; rendered review
|
||||||
|
remains for the UI review stage.
|
||||||
@@ -93,6 +93,31 @@ void main() {
|
|||||||
expect(find.widgetWithText(TextButton, 'demo'), findsOneWidget);
|
expect(find.widgetWithText(TextButton, 'demo'), findsOneWidget);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
testWidgets('file sorting uses a sort icon and preserves direction', (
|
||||||
|
tester,
|
||||||
|
) async {
|
||||||
|
final controller = await pump(tester);
|
||||||
|
|
||||||
|
expect(find.byTooltip('Sort'), findsOneWidget);
|
||||||
|
expect(find.byIcon(Icons.sort), findsOneWidget);
|
||||||
|
expect(controller.sort.key, FilesSortKey.name);
|
||||||
|
expect(controller.sort.ascending, isTrue);
|
||||||
|
|
||||||
|
await tester.tap(find.byTooltip('Sort'));
|
||||||
|
await tester.pumpAndSettle();
|
||||||
|
await tester.tap(find.text('size'));
|
||||||
|
await tester.pumpAndSettle();
|
||||||
|
expect(controller.sort.key, FilesSortKey.size);
|
||||||
|
expect(controller.sort.ascending, isTrue);
|
||||||
|
|
||||||
|
await tester.tap(find.byTooltip('Sort'));
|
||||||
|
await tester.pumpAndSettle();
|
||||||
|
await tester.tap(find.text('size ↑'));
|
||||||
|
await tester.pumpAndSettle();
|
||||||
|
expect(controller.sort.key, FilesSortKey.size);
|
||||||
|
expect(controller.sort.ascending, isFalse);
|
||||||
|
});
|
||||||
|
|
||||||
testWidgets('text tap opens shared viewer and fetches inline URL', (
|
testWidgets('text tap opens shared viewer and fetches inline URL', (
|
||||||
tester,
|
tester,
|
||||||
) async {
|
) async {
|
||||||
|
|||||||
@@ -47,6 +47,36 @@ void main() {
|
|||||||
expect(tester.getRect(find.byType(ProbeContent)).top, greaterThan(80));
|
expect(tester.getRect(find.byType(ProbeContent)).top, greaterThan(80));
|
||||||
});
|
});
|
||||||
|
|
||||||
|
testWidgets('the outline covers the full window and uses the theme palette', (
|
||||||
|
tester,
|
||||||
|
) async {
|
||||||
|
manager.open('probe', 'a');
|
||||||
|
await pumpProbe(tester, manager);
|
||||||
|
|
||||||
|
final outline = find.byType(WindowOutline);
|
||||||
|
expect(outline, findsOneWidget);
|
||||||
|
expect(tester.getSize(outline), const Size(360, 420));
|
||||||
|
final decoration =
|
||||||
|
tester
|
||||||
|
.widget<DecoratedBox>(
|
||||||
|
find.descendant(
|
||||||
|
of: outline,
|
||||||
|
matching: find.byType(DecoratedBox),
|
||||||
|
),
|
||||||
|
)
|
||||||
|
.decoration
|
||||||
|
as BoxDecoration;
|
||||||
|
expect(
|
||||||
|
decoration.border,
|
||||||
|
Border.all(
|
||||||
|
color: Theme.of(
|
||||||
|
tester.element(find.byType(WindowOutline)),
|
||||||
|
).colorScheme.outlineVariant,
|
||||||
|
),
|
||||||
|
);
|
||||||
|
expect(decoration.borderRadius, BorderRadius.circular(windowCornerRadius));
|
||||||
|
});
|
||||||
|
|
||||||
testWidgets('the app behind takes input everywhere outside a window', (
|
testWidgets('the app behind takes input everywhere outside a window', (
|
||||||
tester,
|
tester,
|
||||||
) async {
|
) async {
|
||||||
|
|||||||
Reference in New Issue
Block a user