Skip to content

Conversation

@Jklawreszuk
Copy link
Collaborator

PR Details

WIP, This PR represents task Avalonia Editor Rewrite (view) which I would like to implement

Types of changes

  • Docs change / refactoring / dependency upgrade
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist

  • My change requires a change to the documentation.
  • I have added tests to cover my changes.
  • All new and existing tests passed.
  • I have built and run the editor to try this change out.

@Jklawreszuk Jklawreszuk marked this pull request as draft April 18, 2025 20:17
@@ -0,0 +1,21 @@
using Stride.Core.Presentation.Commands;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note: view models should be as much as possible outside Avalonia projects. The idea being that they could be reused by another UI library if it were to change in the future (or if we decide to keep WPF around and share mist of the view models between the two).

It implies that view models cannot use or reference any UI-specific types. Even without reuse, it helps keeping the view and model logic separated.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree, I moved VMs here temperarily for just convenience 😅

if (ApplicationLifetime is IClassicDesktopStyleApplicationLifetime desktop)
{
desktop.MainWindow = new MainWindow();
desktop.MainWindow = new ProjectSelectionWindow();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not quite decided about that one. I know the WPF version does start with this window, but I don't like it. I'd prefer we change the logic and start with the main window. We could force open the new/select window after the main one is created if needed.

I made sure that a new session can be opened after an already loaded one. So the trick to basically restart everything for a new project isn't needed anymore. At least for now.

build/Stride.sln Outdated
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Plugins", "Plugins", "{BFF9AA54-F9DD-42BB-8163-6C03E7F51623}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Stride.Core.Assets.Editor.Avalonia", "..\sources\editor\Stride.Core.Assets.Editor.Avalonia\Stride.Core.Assets.Editor.Avalonia.csproj", "{67142D11-FA16-47E3-9894-6EE071F4F3B2}"
Copy link
Member

@Kryptos-FR Kryptos-FR Apr 19, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I also added this project in my xplat/property-grid branch. If possible can you cherry-pick or copy this project creation so we avoid conflicts (esp. on the .sln).

I'll open a draft PR also for that branch so it's easier to find (#2721).

@Kryptos-FR Kryptos-FR moved this to In Progress in Avalonia Editor Rewrite Apr 19, 2025
@Jklawreszuk Jklawreszuk force-pushed the xplat-editor-new-proj branch from 5540d89 to 623d798 Compare April 20, 2025 12:49
@Kryptos-FR Kryptos-FR added this to the Editor Rewrite - Phase 1 milestone Apr 28, 2025
@Jklawreszuk Jklawreszuk force-pushed the xplat-editor-new-proj branch 2 times, most recently from 235d99d to c2ecb7d Compare May 3, 2025 12:55
@Jklawreszuk Jklawreszuk force-pushed the xplat-editor-new-proj branch from c2ecb7d to 5452f99 Compare August 1, 2025 15:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: In Progress

Development

Successfully merging this pull request may close these issues.

2 participants