Move editor UI into the app and release verified Core dependencies (#14)
Gitea CI / Assemble and validate CI artifacts (push) Successful in 1m47s
Gitea CI / Check code and tests (push) Successful in 7m15s
Gitea CI / Build Android APK (push) Successful in 4m6s
Gitea CI / Build Windows x64 app (push) Successful in 3m34s
Gitea CI / Audit and package Windows x64 (push) Successful in 1m29s
Gitea CI / Gitea CI passed (push) Successful in 1s
Gitea Release / Prepare draft Release (push) Failing after 8s
Gitea Release / Upload Android to draft Release (push) Skipped
Gitea Release / Upload Windows to draft Release (push) Skipped
Gitea Release / Verify and publish Release (push) Skipped
Gitea CI / Assemble and validate CI artifacts (push) Successful in 1m47s
Gitea CI / Check code and tests (push) Successful in 7m15s
Gitea CI / Build Android APK (push) Successful in 4m6s
Gitea CI / Build Windows x64 app (push) Successful in 3m34s
Gitea CI / Audit and package Windows x64 (push) Successful in 1m29s
Gitea CI / Gitea CI passed (push) Successful in 1s
Gitea Release / Prepare draft Release (push) Failing after 8s
Gitea Release / Upload Android to draft Release (push) Skipped
Gitea Release / Upload Windows to draft Release (push) Skipped
Gitea Release / Verify and publish Release (push) Skipped
This commit was merged in pull request #14.
This commit is contained in:
1 parent
abc1868550
commit
06f1c26681
452 files changed
+43806
-2329
No files matched your search
@@ -1,4 +1,7 @@
|
||||
import 'package:cutdex/app/editor_theme.dart';
|
||||
import 'package:cutdex/features/editor/layouts/bounded_editor_layout.dart';
|
||||
import 'package:cutdex/features/editor/editor_presentation_controller.dart';
|
||||
import 'package:cutdex/integrations/platform/device_experience.dart';
|
||||
import 'package:cutdex/features/preview/preview_panel.dart';
|
||||
import 'package:cutdex/features/properties/picture_properties.dart';
|
||||
import 'package:cutdex/features/properties/audio_properties.dart';
|
||||
@@ -6,7 +9,7 @@ import 'package:cutdex/features/properties/speed_properties.dart';
|
||||
import 'package:cutdex_ui/widgets.dart';
|
||||
import 'package:cutdex_ui/icons.dart';
|
||||
import 'package:cutdex/l10n/app_localizations.dart';
|
||||
import 'package:cutdex_sdk/timeline/model.dart';
|
||||
import 'package:cutdex_core/timeline/model.dart';
|
||||
import 'package:cutdex_ui/theme.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||
@@ -15,6 +18,50 @@ import 'package:flutter_test/flutter_test.dart';
|
||||
import 'support/preview_fixture.dart';
|
||||
|
||||
void main() {
|
||||
testWidgets(
|
||||
'floating desktop inspector keeps the UI3 width in narrow windows',
|
||||
(tester) async {
|
||||
for (final width in [200.0, 320.0, 800.0]) {
|
||||
await tester.pumpWidget(
|
||||
MaterialApp(
|
||||
localizationsDelegates: AppLocalizations.localizationsDelegates,
|
||||
supportedLocales: AppLocalizations.supportedLocales,
|
||||
locale: const Locale('en'),
|
||||
theme: EditorTheme.desktop(EditorTheme.penDark),
|
||||
home: Scaffold(
|
||||
body: Align(
|
||||
alignment: Alignment.topRight,
|
||||
child: SizedBox(
|
||||
width: width,
|
||||
height: 400,
|
||||
child: BoundedEditorLayout(
|
||||
experience: DeviceExperience.desktop,
|
||||
editing: const SizedBox.expand(),
|
||||
tool: EditorTool.properties,
|
||||
media: const SizedBox.expand(),
|
||||
properties: const SizedBox.expand(),
|
||||
onCloseTool: () {},
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
await tester.pumpAndSettle();
|
||||
expect(
|
||||
tester.getSize(find.byKey(const Key('editor-tool-surface'))).width,
|
||||
width < 240 ? width : 240,
|
||||
);
|
||||
final title = tester.widget<Text>(
|
||||
find.byWidgetPredicate((w) => w is Text && w.style?.fontSize == 13),
|
||||
);
|
||||
expect(title.style!.fontSize, 13);
|
||||
expect(title.style!.height, 22 / 13);
|
||||
expect(tester.takeException(), isNull);
|
||||
}
|
||||
},
|
||||
);
|
||||
|
||||
testWidgets(
|
||||
'audio and speed controls fit desktop group headers at narrow widths',
|
||||
(tester) async {
|
||||
@@ -74,10 +121,10 @@ void main() {
|
||||
of: find.byKey(const Key('audio-db')),
|
||||
matching: find.byType(TextField),
|
||||
);
|
||||
expect(tester.getSize(field).height, 28);
|
||||
expect(tester.getSize(field).height, 24);
|
||||
expect(
|
||||
tester.getRect(find.byKey(const Key('audio-key'))).bottom,
|
||||
tester.getRect(field).top - 4,
|
||||
tester.getRect(find.byKey(const Key('audio-key'))).center.dy,
|
||||
tester.getRect(field).center.dy,
|
||||
);
|
||||
expect(find.byType(AppPropertyGroup), findsNWidgets(2));
|
||||
expect(tester.takeException(), isNull);
|
||||
@@ -120,6 +167,7 @@ void main() {
|
||||
for (final brightness in Brightness.values) {
|
||||
for (final (width, locale) in [
|
||||
(220.0, 'de'),
|
||||
(240.0, 'en'),
|
||||
(280.0, 'zh'),
|
||||
(360.0, 'en'),
|
||||
]) {
|
||||
@@ -157,13 +205,35 @@ void main() {
|
||||
);
|
||||
await tester.pumpAndSettle();
|
||||
for (final name in ['x', 'y', 'scale-x', 'scale-y', 'rotation']) {
|
||||
expect(tester.getSize(input(name)).height, 28);
|
||||
expect(tester.getSize(input(name)).height, 24);
|
||||
}
|
||||
expect(tester.getRect(input('x')).left, 12);
|
||||
expect(tester.getRect(input('x')).width, (width - 28) / 2);
|
||||
expect(tester.getRect(input('x')).left, 16);
|
||||
expect(tester.getRect(input('x')).width, (width - 64) / 2);
|
||||
expect(tester.getRect(input('rotation')).width, (width - 64) / 2);
|
||||
expect(find.byType(AppPropertyGroup), findsNWidgets(6));
|
||||
expect(find.byKey(const ValueKey('stroke-add')), findsOneWidget);
|
||||
expect(
|
||||
tester.getRect(input('corner-radius')).width,
|
||||
(width - 64) / 2,
|
||||
);
|
||||
expect(
|
||||
tester.getSize(find.byType(AppPropertySection).first).height,
|
||||
148,
|
||||
);
|
||||
final align = find.byKey(const ValueKey('picture-align-left'));
|
||||
final verticalAlign = find.byKey(const ValueKey('picture-align-top'));
|
||||
expect(
|
||||
tester.getCenter(align).dy,
|
||||
tester.getCenter(verticalAlign).dy,
|
||||
);
|
||||
for (final name in ['x', 'y', 'scale-x', 'scale-y', 'rotation']) {
|
||||
final field = tester.widget<TextField>(input(name));
|
||||
expect(field.decoration!.prefixIcon, isNotNull);
|
||||
final handle = find.descendant(
|
||||
of: find.byKey(ValueKey('picture-$name')),
|
||||
matching: find.byType(AppScrubLabel),
|
||||
);
|
||||
expect(tester.getSize(handle).width, 24);
|
||||
}
|
||||
expect(
|
||||
find.descendant(
|
||||
@@ -194,12 +264,20 @@ void main() {
|
||||
? 'scale-x'
|
||||
: 'rotation',
|
||||
);
|
||||
expect(
|
||||
tester.getRect(action).bottom,
|
||||
tester.getRect(field).top - 4,
|
||||
);
|
||||
if (channel == 'scale') {
|
||||
expect(
|
||||
tester.getRect(action).bottom,
|
||||
tester.getRect(field).top - 12,
|
||||
);
|
||||
} else {
|
||||
expect(tester.getCenter(action).dy, tester.getCenter(field).dy);
|
||||
}
|
||||
}
|
||||
expect(right, width - 12);
|
||||
expect(
|
||||
tester.getCenter(find.byKey(const Key('picture-lock'))).dy,
|
||||
tester.getCenter(input('scale-x')).dy,
|
||||
);
|
||||
expect(right, width - 8);
|
||||
expect(
|
||||
tester.getRect(input('x')).left,
|
||||
tester.getRect(input('rotation')).left,
|
||||
@@ -215,8 +293,8 @@ void main() {
|
||||
);
|
||||
expect(
|
||||
tester.getRect(input('rotation')).top -
|
||||
tester.getRect(input('scale-x')).bottom,
|
||||
40,
|
||||
tester.getRect(input('x')).bottom,
|
||||
8,
|
||||
);
|
||||
}
|
||||
expect(
|
||||
|
||||
Reference in new issue
Block a user