Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cross-platform editor rewrite - prototype #2034

Open
wants to merge 748 commits into
base: xplat-editor
Choose a base branch
from

Conversation

Kryptos-FR
Copy link
Member

@Kryptos-FR Kryptos-FR commented Nov 13, 2023

PR Details

This PR contains the initial work on a new cross-platform editor using Avalonia for the UI framework.

Description

In order to keep the changes separate from the existing editor libraries, a new folder sources/xplat-editor has been created. In this folder, there are a bunch of new projects, some which have the same naming of existing ones. The idea is that at some point, it should be possible to replace the old projects with the new ones, adapt the existing WPF code and have two versions of the editor (one implemented with WPF, the other with Avalonia) that we can compare to ensure we have all the features ported from the old one to the new one.

Related issues

Feature highlights

Attributes and types registration

See documentation page

Services

See documentation page

Architectural changes

You will notice that the number of projects have greatly increased. But no panic, some are just duplicates while we work on the new editor. There are few new projects that will stay though. Those are directly related to Avalonia, and they have Avalonia in their name (e.g. Stride.Core.Assets.Editor.Avalonia. The reason is simple: such projects have a direct dependency with Avalonia and implements the UI/UX part of the editor, while those without that name are UI-agnostic and only have a dependency on the MVVM pattern. In other words, the latter could be reused with other MVVM-supporting UI libraries such as WPF, MAUI or any other that could come in the future (including, why not, our own Stride-implemented UI).

On top of that, some classes (esp. view models) that were previously implemented in Stride.Core.Assets.Editor are now relocated in more editor-agnostic libraries (such as Stride.Core.Assets.Presentation or Stride.Assets.Presentation. Again, the idea is that such libraries could be reused for more simple type of apps (such as viewers for instance) that don't require the full-fledged editing capabilities but just need a MVVM version of the Core or the Stride assets.

Motivation and Context

Why not?

Just kidding. There have been numerous wishes over the years to have an editor working on other platforms than Windows.
There is also a need to have a fully-fledged plugin system, and in order to achieve that similar changes to the one allowing cross-platform experience are needed. Hence, this project aims to achieve both.

Types of changes

  • Docs change / refactoring / dependency upgrade
    • There is a README per project, which surely counts as a doc change.
    • There will be a need to write or rewrite a lot of docs, once we have reached a stable point.
  • Bug fix (non-breaking change which fixes an issue)
    • While reworking how the different editor libraries interact with each others, some bugs are likely fixed (but hard to know which ones).
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
    • Likely some breaking changes in the way the editor libraries are working. However, the runtime libraries should be untouched for the most part.

Checklist

  • My change requires a change to the documentation.
  • I have added tests to cover my changes.
    • Nope 😁.
  • All new and existing tests passed.
    • No idea. Not the point of this PR.
  • I have built and run the editor to try this change out.
    • The new one that is 😉.

@Shadowblitz16

This comment was marked as off-topic.

@Shadowblitz16

This comment was marked as off-topic.

@Eideren
Copy link
Collaborator

Eideren commented May 2, 2024

@Shadowblitz16 @Yuisyuu We're glad you guys are interested but please keep the conversation on topic :)

Eideren and others added 19 commits June 8, 2024 14:52
…d#2302)

* [Android] Fix and reimplement user input in EditText control

* [Templates] Move AndroidManifest settings to Activity attribute where applicable and remove duplicate Theme setting

Remove extra whitespaces in Android templates

* [Android] Add syncRoot in EditText control to guard against the case where Stride deactivates the control before the Android Post action executes

---------

Co-authored-by: Basewq <[email protected]>
# Conflicts:
#	build/Stride.sln
#	sources/engine/Stride.BepuPhysics/Stride.BepuPhysics.Navigation/Definitions/BuildSettings.cs
#	sources/engine/Stride.BepuPhysics/Stride.BepuPhysics.Navigation/Processors/RecastMeshProcessor.cs
#	sources/engine/Stride.BepuPhysics/Stride.BepuPhysics.Navigation/StrideGeomProvider.cs
… - the project started out as a stand-alone solution outside this repo, we should silo its code style but still enforce one at the very least
# Conflicts:
#	sources/editor/Stride.Assets.Presentation/StrideDefaultAssetsPlugin.cs
@Kryptos-FR Kryptos-FR marked this pull request as ready for review January 21, 2025 19:03
Copy link
Collaborator

@Jklawreszuk Jklawreszuk left a comment

Choose a reason for hiding this comment

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

Let's start review :) (It can take a while)

@@ -3021,15 +3021,15 @@ typedef uint32_t uint4 __attribute__((ext_vector_type(4)));
#endif

#if !__has_builtin(__builtin___strlcat_chk)
#error \"__strlcat_chk clang built-in not available\"
//#error \"__strlcat_chk clang built-in not available\"
Copy link
Collaborator

@Jklawreszuk Jklawreszuk Jan 26, 2025

Choose a reason for hiding this comment

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

Perhaps it would be possible to remove these conditions altogether.
Required modules to test : Stride.VR, Stride.Audio, Stride.Navigation.
This change can be added directly into master in a separate PR

Copy link
Member Author

Choose a reason for hiding this comment

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

I think it should be dealt separately. I can add a // FIXME xplat-editor like I did in other places.

Copy link
Contributor

Choose a reason for hiding this comment

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

Ah, NVM then - my bad.

@Jklawreszuk
Copy link
Collaborator

Sorry it's been so long but I feel overwhelmed by the amount of changes 😣
However, I manually tested the protototype and Imho It's decent as a base to for contribution by others 👍

@Kryptos-FR
Copy link
Member Author

Thanks. I will try to list and cleanup a list of tasks to be done and once it's ready we can merge this and continue from there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.