jinek / Consolonia

A cross-platform UI framework for .NET.
MIT License
341 stars 12 forks source link

chore(deps): upgrade "Avalonia" dependencies to 11.0.0 #105

Open BinToss opened 1 year ago

BinToss commented 1 year ago

Breaking Changes (0.10->11.0)

Avalonia 11.0.0 Release Candidate 1.1 was released on May 31st.

jinek commented 9 months ago

I've tried 11.0.5, there are big breaking changes there. For example some interfaces are restricted form implementation:

Interface member 'void Avalonia.Platform.IGeometryImpl.(This interface or abstract class is -not- implementable by user code !)()' is not implemented Interface member 'void Avalonia.Platform.ITransformedGeometryImpl.(This interface or abstract class is -not- implementable by user code !)()' is not implemented

maxkatz6 commented 9 months ago

Since Consolonia implements a custom backend, it makes sense to enable private apis in the csproj:

<AvaloniaAccessUnstablePrivateApis>true</AvaloniaAccessUnstablePrivateApis>
tomlm commented 7 months ago

I would love to help with this port. Is there a branch?

jinek commented 7 months ago

I would love to help with this port. Is there a branch?

No branch, feel free to start one. I've added you to contributors so you have direct access to repo.

jinek commented 5 months ago

@tomlm I have tried to upgrade to 11.0.9, just tried to introduce required members etc. Pushed the branch here https://github.com/jinek/Consolonia/tree/105-choredeps-upgrade-avalonia-dependencies-to-1100 Let me know if you started to work on this, please. Otherwise I will work within this branch. My branch has many compilation errors, probably need to address this at first. The abstraction changed more than I thought.

jinek commented 4 months ago

I have brought it to the point where it draws something. From now what's left is we need new control templates (old does not work well). Primitives drawing seems broken a bit, text formatting does not work well etc. At the screenshot there is an example old Consolonia vs new Consolonia. Screenshot from 2024-05-01 22-19-09 DataGrid is broken itself thus manual navigation in the gallery is not possible. It should be run with an argument - name of the name of the case in gallery: image p.s. yeah, and it seems keyboard navigation does not work either.

maxkatz6 commented 4 months ago

For keyboard navigation you might consider using XYFocus class APIs that is available in 11.1. It was primarily implemented for TVs with only arrow keys as a navigation, but might be applied here too. https://docs.avaloniaui.net/docs/concepts/input/focus#directional-focus-navigation- https://github.com/AvaloniaUI/Avalonia/pull/13947

jinek commented 4 months ago

For keyboard navigation you might consider using XYFocus class APIs that is available in 11.1. It was primarily implemented for TVs with only arrow keys as a navigation, but might be applied here too. https://docs.avaloniaui.net/docs/concepts/input/focus#directional-focus-navigation- AvaloniaUI/Avalonia#13947

Then either in this task we need to replace Consolonia XY navigation https://github.com/jinek/Consolonia/blob/773b1e6669e77324cbc9bb89b3c1fb7bd47f9526/src/Consolonia.Core/Infrastructure/ArrowsAndKeyboardNavigationHandler.cs or we can create a separate one. But still, currently even TAB navigation does not work, needs investigation.

jinek commented 4 months ago

! This one solved !

_I'm currently stuck with this version: https://github.com/jinek/Consolonia/tree/105-choredeps-upgrade-avalonia-dependencies-to-1100

Initially, everything renders correctly: Screenshot from 2024-05-03 21-33-32 However, after clicking a button, only that button and its parent elements are rendered, while the rest of the interface disappears: Screenshot from 2024-05-03 21-33-48 Resizing the window triggers a complete redraw of the entire screen and everything rendered fine. First, I thought implementing layers correctly would resolve the problem, but it turned out to be irrelevant._

tomlm commented 1 month ago

@tomlm I have tried to upgrade to 11.0.9, just tried to introduce required members etc. Pushed the branch here https://github.com/jinek/Consolonia/tree/105-choredeps-upgrade-avalonia-dependencies-to-1100 Let me know if you started to work on this, please. Otherwise I will work within this branch. My branch has many compilation errors, probably need to address this at first. The abstraction changed more than I thought. I have gotten caught up with summer fun and completely not started this (not in any meaningful way). Sorry!

jinek commented 4 weeks ago

I've finished fixing major issues, now some controls either don't work properly or do not render properly. It needs template/styling update and may be some extension of them:

DataGrid
ComboBox
Calendar
Calendar Picker
ListBox
TextBox
Dialog
Menu
ProgressBar

Working branch is here: https://github.com/jinek/Consolonia/tree/105-choredeps-upgrade-avalonia-dependencies-to-1100