Skip to content

Conversation

@DamianSuess
Copy link
Contributor

@DamianSuess DamianSuess commented Apr 28, 2024

Description of Change

Adds fixture for Prism.Avalonia using Avalonia v11.1.x. Pairing together these two awesome libraries under one house.

API Changes

None

Behavioral Changes

Allows users to utilize the cross-platform framework Avalonia for desktop applications.

PR Checklist

  • Import base Prism.Avalonia framework
  • Sync packages to use local projects
  • Rebased on top of master at time of PR
  • Changes adhere to coding standard
  • Add tests
  • Fix tests to run under Prism's toolset - IN-PROGRESS
  • Add e2e samples
  • Directory.Build.props
  • CI/CD GitHub Actions for Prism.Avalonia
  • Minimize code duplication

@DamianSuess DamianSuess requested a review from dansiegel as a code owner April 28, 2024 14:18
@DamianSuess DamianSuess marked this pull request as draft April 28, 2024 14:18
@dansiegel
Copy link
Member

Thanks for the PR. I'll try to review this as soon as I can.

Copy link
Member

@dansiegel dansiegel left a comment

Choose a reason for hiding this comment

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

noticing this is largely just reusing what currently exists in the Prism.Avalonia project. This should start removing duplicated code, similar to what we've done with Prism for Uno.WinUI using linked code from the Prism.Wpf project where possible. The goal should be to have a minimally different API surface and eliminate duplicate code as much as possible.

@dansiegel
Copy link
Member

btw be sure to update the CI Builds. It should be pretty much copy/paste and change the file names... if you need some help on it let me know.

  • NEW: .github/workflows/build_avalonia.yml
  • UPDATE: .github/workflows/ci.yml
  • UPDATE: .github/workflows/start-release.yml

@DamianSuess
Copy link
Contributor Author

Will do. @dansiegel, when you're free, mind if we sync up on Teams?

@dansiegel
Copy link
Member

It'll have to be next week but shoot me an email with some times that work for you and we can set something up

@DamianSuess
Copy link
Contributor Author

Sounds great. Thanks again, Dan.

@dansiegel dansiegel added this to the 9.1 milestone Jul 23, 2024
@dansiegel
Copy link
Member

You'll want to:

  1. Rebase
  2. Update the Directory.Build.props with the following
  <When Condition="$(IsAvaloniaProject)">
    <PropertyGroup>
      <DefineConstants>$(DefineConstants);AVALONIA</DefineConstants>
    </PropertyGroup>
    <ItemGroup>
      <Using Include="Avalonia" />
      <Using Include="Avalonia.Controls" />
      <Using Include="Avalonia.Controls.ApplicationLifetimes" />
      <Using Include="Avalonia.Controls.Primitives" />
      <Using Include="Avalonia.Interactivity" />
      <Using Include="Avalonia.Markup.Xaml"/>
      <Using Include="Avalonia.Metadata" />
      <Using Include="Avalonia.Threading" />
      <Using Include="Avalonia.Styling" />
      <Using Include="Avalonia.VisualTree" />
    </ItemGroup>
  </When>
  1. Start removing classes that have identical or near identical code to WPF. If there are small tweaks it is preferential to include a #if AVALONIA block to conditionally compile Avalonia specific code vs WPF or Uno Platform. The goal should be similar to the Uno Platform implementation where most of the code is actually part of WPF.

@DamianSuess
Copy link
Contributor Author

Dan,

Thanks for the heads up and suggestions to get this puppy rolling. I'll try to get to it this week.

I'm going to upgrade the other repository first to get the GA release of Prism.Avalonia v9.0.537, followed by copying over results to our combined branch. Overall, this should be pretty quick process since the delta between ..401-pre and ..537 is non-impactful. 👍

@DamianSuess
Copy link
Contributor Author

@dansiegel thanks again for the sync-up yesterday! Looking forward to the 9.1 release

@DamianSuess
Copy link
Contributor Author

Hi @dansiegel & @brianlagunas, Code reduction completed 👍

I could use a 2nd set of eyes on the build machine's failing test, Prism.Tests.Commands.AsyncDelegateCommandFixture.ICommandExecute_UsesDefaultTokenSourceFactory, which I cannot reproduce locally.

Let me know if there's anything else I can do.

Talk to you soon,
Damian

@brianlagunas
Copy link
Member

@DamianSuess it looks like the build failed because of a sign tool and not any test failures. If you're happy with the state of the PR, I can look into merging it. Then we can deal with any signing issues afterwards.

@DamianSuess
Copy link
Contributor Author

Hi @brianlagunas,

Thank you for getting back to me on this item. I'd appreciate it if you don't mind taking the time. I'm really looking forward to this transition!

Whenever you and Dan are available, I'd like to set up a call with you two on any other steps moving forward.

Take care,
Damian

@z1097955019
Copy link

May I ask when we can see the final version after the merger?

@the-black-wolf
Copy link

Guys, its been two months since last message.
@DamianSuess @brianlagunas If you guys are happy with this, why not merge it? We are looking at our go live by summer, would like to transition us to main Prism library if possible.

@brianlagunas
Copy link
Member

@the-black-wolf we have been focusing our efforts on other things at the moment. We haven't forgotten about this, it's just a low priority at the moment. Once we have our internal efforts done, we'll get back to this.

@DamianSuess
Copy link
Contributor Author

If you need anything, feel free to let me know 👍 happy to help

@DamianSuess
Copy link
Contributor Author

Dan or Brian, could you take a look at the failed builds? I'm seeing that the tests are passing for Avalonia, however, it's failing at the "Sign NuGet Package" step (dotnet tool install --global NuGetKeyVaultSignTool)

Is there anything I could do on my end?

i.e.

Passed!  - Failed:     0, Passed:    43, Skipped:     0, Total:    43, Duration: 390 ms - Prism.DryIoc.Avalonia.Tests.dll (net8.0)

Thank you,
Damian

@brianlagunas
Copy link
Member

Yeah, I'll try to get some time this week. I've been meaning to review this PR anyways to finally get it merged. My damn day job is just keeping me too damn busy 😄

@DamianSuess
Copy link
Contributor Author

DamianSuess commented May 21, 2025

Yeah, I'll try to get some time this week. I've been meaning to review this PR anyways to finally get it merged. My damn day job is just keeping me too damn busy 😄

Fully understand @brianlagunas . Here, have one on me 🍺
I've been meaning to kick off a YT series on Prism + Avalonia. Got a few videos ready to roll. Work, house projects, family, start-up,... .. oooh you know this all too well

@DamianSuess
Copy link
Contributor Author

You guys are awesome, thank you

@dansiegel dansiegel merged commit ea67f89 into PrismLibrary:master Jun 12, 2025
9 of 15 checks passed
@brianlagunas
Copy link
Member

@DamianSuess you are the awesome ones!! This was the result of all your time and effort.

@DamianSuess DamianSuess deleted the dev/suess/Prism.Avalonia branch June 12, 2025 20:56
@DamianSuess
Copy link
Contributor Author

That's beautiful!

@brianlagunas and @dansiegel, let me know when you're available for a sync-up call. I'd like to cover any next steps and commitments you gents need from me. I have a few follow-up branches to keep the success of this project moving forward. (Dan has my email)

Thank you

@the-black-wolf
Copy link

the-black-wolf commented Jun 14, 2025

@DamianSuess @brianlagunas @dansiegel

Great news, thank you all for this great effort, we've been hoping for this for quite a while.
Just one minor question, as we need to plan our migration and testing, and we are not fully privy to your release cycle: When can we expect to see this release in NuGet?

Also, just a minor suggestion, README probably needs some TLC modification re addition of Avalonia.

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.

5 participants