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

Make Stride.Core.Presentation cross-platform #2082

Merged
merged 20 commits into from
Jan 17, 2024

Conversation

Kryptos-FR
Copy link
Member

PR Details

Description

Make Stride.Core.Presentation cross-platform and UI-agnostic (albeit still dependent on the MVVM pattern), and move Windows/WPF-specific code to Stride.Core.Presentation.Wpf.

In addition, a few other libraries now target net-8.0 instead of .net-8.0-windows7.0.

Bonus point: the code in Stride.Core.Presentation is modernized with implicit usings and nullable reference support.

Related Issue

Partially based on #2034, which will be rebased on top of this PR once merged.

Motivation and Context

Mostly code reuse.

Also, the launcher has much less dependencies on WPF than the other editor libraries. With that change, it should be possible to start porting it to Avalonia with minimal effort, and independently from the rewrite.

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.
    • except the ones already failing
  • I have built and run the editor to try this change out.

@Kryptos-FR Kryptos-FR force-pushed the feature/xplat/core-presentation branch 2 times, most recently from 15604d2 to 6b7c7ef Compare December 17, 2023 18:08
@Kryptos-FR Kryptos-FR force-pushed the feature/xplat/core-presentation branch from 6b7c7ef to 827ce0f Compare December 17, 2023 19:52
@Kryptos-FR Kryptos-FR mentioned this pull request Jan 6, 2024
8 tasks
Copy link
Collaborator

@Eideren Eideren left a comment

Choose a reason for hiding this comment

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

Thanks !

@Jklawreszuk
Copy link
Collaborator

Quite impresive work, LGTM, but I would like to add few comments 😅

@Kryptos-FR Kryptos-FR self-assigned this Jan 17, 2024
@Kryptos-FR
Copy link
Member Author

Kryptos-FR commented Jan 17, 2024

@Eideren @Jklawreszuk ok to merge?

I added two commits to get IDialogService closer to describing the service in a xplat way. The signature of most methods follow closely Avalonia's implementation, which can explain why the current WPF's implementation is a bit clumsy.

@Eideren Eideren merged commit a93b3b0 into stride3d:master Jan 17, 2024
4 of 5 checks passed
@Eideren
Copy link
Collaborator

Eideren commented Jan 17, 2024

Thanks !

@Kryptos-FR Kryptos-FR deleted the feature/xplat/core-presentation branch January 18, 2024 11:40
@Kryptos-FR Kryptos-FR restored the feature/xplat/core-presentation branch March 21, 2024 21:37
@Kryptos-FR Kryptos-FR deleted the feature/xplat/core-presentation branch March 31, 2024 13:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants