perf(editor): integrate native preview and prioritize timeline interaction
Gitea CI / Check code and tests (pull_request) Failing after 7m0s
Gitea CI / Gitea CI passed (pull_request) Failing after 5s
Gitea CI / Build Android APK (pull_request) Skipped
Gitea CI / Build Windows x64 app (pull_request) Skipped
Gitea CI / Audit and package Windows x64 (pull_request) Skipped
Gitea CI / Assemble and validate CI artifacts (pull_request) Skipped

This commit is contained in:
lingjhf committed 2026-10-07 16:03:52 +08:00
1 parent 0ecf920669
commit 4f746be301
34 files changed
+3278 -145

No files matched your search

+8 -4
View File
@@ -36,11 +36,13 @@ class EditorWorkspace extends ConsumerStatefulWidget {
required this.integratedTitlebar,
required this.headerLeading,
this.projectLoading = false,
this.timelineLoading = false,
this.showProjectName = true,
this.experience = DeviceExperience.desktop,
});
final bool projectLoading;
final bool timelineLoading;
final String projectId;
final String timelineId;
final String projectName;
@@ -55,6 +57,7 @@ class EditorWorkspace extends ConsumerStatefulWidget {
class _EditorWorkspaceState extends ConsumerState<EditorWorkspace> {
final _previewKey = GlobalKey();
bool get _timelinePending => widget.projectLoading || widget.timelineLoading;
EditorPresentationController get _presentation =>
ref.read(editorPresentationProvider(widget.projectId));
ProjectViewSettingsData get _viewSettings =>
@@ -82,15 +85,16 @@ class _EditorWorkspaceState extends ConsumerState<EditorWorkspace> {
child: EditorPreviewPanel(
projectId: widget.projectId,
timelineId: widget.timelineId,
pending: widget.projectLoading,
pending: _timelinePending,
),
);
final timeline = EditorTimelinePanel(
projectId: widget.projectId,
timelineId: widget.timelineId,
pending: widget.projectLoading,
timelineLoading: widget.timelineLoading,
);
final properties = widget.projectLoading
final properties = _timelinePending
? const EditorEmptyPanel()
: EditorPropertiesPanel(
projectId: widget.projectId,
@@ -153,7 +157,7 @@ class _EditorWorkspaceState extends ConsumerState<EditorWorkspace> {
),
Flexible(
fit: FlexFit.loose,
child: widget.projectLoading
child: _timelinePending
? const SizedBox.shrink()
: _TimelineSaveStatus(
projectId: widget.projectId,
@@ -288,7 +292,7 @@ class _EditorWorkspaceState extends ConsumerState<EditorWorkspace> {
projectId: widget.projectId,
),
},
properties: widget.projectLoading
properties: _timelinePending
? properties
: switch (widget.experience) {
DeviceExperience.desktop => properties,