Skip to content

Avalonia UI#975

Open
Deterous wants to merge 43 commits into
SabreTools:masterfrom
whatever-industries:avalonia
Open

Avalonia UI#975
Deterous wants to merge 43 commits into
SabreTools:masterfrom
whatever-industries:avalonia

Conversation

@Deterous

@Deterous Deterous commented May 6, 2026

Copy link
Copy Markdown
Member

This PR adds an alternate UI framework for MPF based on Avalonia, allowing for Linux and macOS UI builds.
There may be some small tweaks needed before merging during my testing, but I want to open the PR now to begin the review process as this is a big change.
Thanks to 7 (@whatev-indus) for putting in the work on this, I've just helped with guidance and then cleaned it up to use SabreTools styles and build processes. I will also be responding to any PR review comments. If you want to make changes to the branch directly and cannot, ask 7 for contributor access to the repo.

This does not replace the WPF UI, currently both are built separately. The images (icon, ringcode pics) are referenced from the WPF folder, but the Strings XAML are duplicated. The new MPF.Avalonia namespace is intended to reference the MPF.Frontend namespace as much as possible, so that it can be a drop-in replacement for the old WPF UI.

It is also 7's request to have AppImage builds for Linux and other build changes required for icons and niceties on macOS, although these changes can come in a later PR (to minimize the review burden)

@Deterous Deterous marked this pull request as draft May 6, 2026 01:31
@Deterous Deterous requested a review from mnadareski May 6, 2026 03:58

@mnadareski mnadareski left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Many of the inline comments pertain to multiple locations, but there were a couple of overarching comments that I wanted to mention as well:

  • There are basically no code comments. For anything that was based on existing WPF code, please copy the comment wholesale. For anything that is new functionality, add at the bare minimum a summary statement about what it is doing. I know that many are self-explanatory once you read the method, but those comments are used to get an understanding while coding to avoid having to look at the source for all details.
  • All loops, such as for, foreach, and while should have curly braces, regardless of the number of lines that are contained within.
  • I am seeing the use of global:: in many places and I would like to understand more about why this pattern is being used.
  • Unless there is ambiguity about what method or property is being invoked, you can avoid use of the this. qualifier.
  • There are many places, such as large lists of constants/variables or OS-specific methods, that could do with #region tags. This can help break up the code into more distinct sections and allows collapsing away logical groupings.

Comment thread MPF.Frontend/Drive.cs Outdated
Comment thread MPF.Frontend/Drive.cs Outdated
Comment thread MPF.Frontend/Drive.cs Outdated
Comment thread MPF.Frontend/Drive.cs Outdated
Comment thread MPF.Avalonia/Program.cs
Comment thread MPF.Avalonia/Windows/MediaInformationWindow.axaml.cs Outdated
Comment thread MPF.Avalonia/Windows/MediaInformationWindow.axaml.cs Outdated
Comment thread MPF.Avalonia/Windows/MainWindow.axaml.cs Outdated
Comment thread MPF.Avalonia/Windows/MainWindow.axaml.cs Outdated
Comment thread MPF.Avalonia/Windows/MainWindow.axaml.cs
Comment thread MPF.Avalonia/Services/WindowChromeService.cs Outdated
Comment thread MPF.Avalonia/Windows/MainWindow.axaml.cs
Comment thread MPF.Avalonia/Windows/MainWindow.axaml.cs
…artials, macOS chrome service rename, one array item per line
@mnadareski

Copy link
Copy Markdown
Member

The failing build is due to Redump login settings going from Redump to RedumpOrg naming.

whatever-industries added 4 commits June 11, 2026 10:50
…ers, static file picker lists, split StringResource ternary
Replaces the load/save loops and name-to-site-code mapping arrays with
two-way bindings in the markup, matching the original WPF window. The
special field dictionaries are created before the DataContext is
assigned so the bindings always have a write target.
Follows the Redump-to-RedumpOrg rename in MPF.Frontend (upstream commit
9e6e0f6), fixing the merged CI build: the credential test handler and
the two login binding paths in OptionsWindow now use RedumpOrgUsername,
RedumpOrgPassword, and GetRedumpOrgLoginResult.
@whatever-industries

Copy link
Copy Markdown

Thanks for the pointer — that was exactly it. The branch was based on a master from before the RedumpRedumpOrg rename (9e6e0f6), so it built locally but failed once CI merged it with current master. I've merged master into the branch and updated the MPF.Avalonia references (commit 8004ea3): the credential test handler in OptionsWindow.axaml.cs now uses RedumpOrgUsername/RedumpOrgPassword/GetRedumpOrgLoginResult, and I also updated the two login TextBox binding paths in OptionsWindow.axaml — those wouldn't have failed the compile, but they would have silently broken the username/password fields at runtime after the rename. Full solution builds clean against current master and all 1,817 tests pass.

One parity note from the merge: master also removed the split hash fields (Size/CRC-32/MD5/SHA-1) from the WPF MediaInformationWindow (e39f4b5). The Avalonia window still has its equivalents of those fields — happy to mirror that removal here if you'd like it in this PR.

Folds the helper into the property getter using the field keyword so
the name is computed once per drive, and drops the redundant length
check before trimming: the empty-string fallback already returns the
raw name for single-character cases like the root path.
@mnadareski

Copy link
Copy Markdown
Member

One parity note from the merge: master also removed the split hash fields (Size/CRC-32/MD5/SHA-1) from the WPF MediaInformationWindow (e39f4b5). The Avalonia window still has its equivalents of those fields — happy to mirror that removal here if you'd like it in this PR.

Removing those isn't strictly necessary as a part of this PR, but it would help the cleanup effort after.

Mirrors upstream e39f4b5, which removed the Size/CRC-32/MD5/SHA-1
fields from the WPF MediaInformationWindow.
@whatever-industries

Copy link
Copy Markdown

Done (commit 2183ca7) — removed the Size/CRC-32/MD5/SHA-1 fields and their collapse logic from the Avalonia MediaInformationWindow, mirroring e39f4b5.

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.

4 participants