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

Update to Avalonia 11 RC 1 #308

Merged
merged 2 commits into from
Jun 13, 2023

Conversation

Numpsy
Copy link
Collaborator

@Numpsy Numpsy commented May 30, 2023

Just another set of test changes to build with the latest Avalonia 11 nightly, as you can never break too many things

@@ -17,7 +18,7 @@ type MainWindow() as this =
base.Height <- 600.0
base.Width <- 800.0

this.VisualRoot.Renderer.Diagnostics.DebugOverlays <- Avalonia.Rendering.RendererDebugOverlays.Fps
TopLevel.GetTopLevel(this).RendererDiagnostics.DebugOverlays <- Avalonia.Rendering.RendererDebugOverlays.Fps
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

// static member clock<'t when 't :> Animatable>(clock: IClock) : IAttr<'t> =
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Ok to just remove these commented out bits?

Copy link
Member

Choose a reason for hiding this comment

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

yup

@@ -10,7 +10,7 @@ module MenuBase =
type MenuBase with

static member onMenuOpened<'t when 't :> MenuBase>(func: RoutedEventArgs -> unit, ?subPatchOptions) : IAttr<'t> =
AttrBuilder<'t>.CreateSubscription(MenuBase.MenuOpenedEvent, func, ?subPatchOptions = subPatchOptions);
AttrBuilder<'t>.CreateSubscription(MenuBase.OpenedEvent, func, ?subPatchOptions = subPatchOptions);
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

let create (attrs: IAttr<TabItem> list): IView<TabItem> =
ViewBuilder.Create<TabItem>(attrs)

type TabItem with

static member tabStripPlacement<'t when 't :> TabItem>(placement: Dock) : IAttr<'t> =
AttrBuilder<'t>.CreateProperty<Dock>(TabItem.TabStripPlacementProperty, placement, ValueNone)
static member tabStripPlacement<'t when 't :> TabItem>(placement: Dock Nullable) : IAttr<'t> =
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@@ -13,8 +13,8 @@ module TransitioningContentControl =

type TransitioningContentControl with

static member currentContent<'t when 't :> TransitioningContentControl>(value: obj) : IAttr<'t> =
AttrBuilder<'t>.CreateProperty<obj>(TransitioningContentControl.CurrentContentProperty, value, ValueNone)
//static member currentContent<'t when 't :> TransitioningContentControl>(value: obj) : IAttr<'t> =
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@@ -16,7 +16,7 @@ module rec VirtualDom =
let delta = Differ.diff(last, next)
Patcher.patch(root, delta)

let updateRoot (host: IContentControl, last: IView option, next: IView option) =
let updateRoot (host: ContentControl, last: IView option, next: IView option) =
let root : Control voption =
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@@ -18,5 +18,4 @@ module Extensions =
if uri.IsAbsoluteUri && uri.IsFile then
new Bitmap(uri.LocalPath)
else
let assets = AvaloniaLocator.Current.GetService<IAssetLoader>();
new Bitmap(assets.Open(uri));
new Bitmap(AssetLoader.Open(uri))
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@Numpsy Numpsy force-pushed the rw/avalonia_nights_reprise branch from 78c5559 to b5f74a1 Compare May 31, 2023 23:35
@Numpsy Numpsy changed the title [WIP] Update with more breaking Avalonia 11 changes May 31, 2023
@Numpsy
Copy link
Collaborator Author

Numpsy commented May 31, 2023

Ok, Avalonia 11 now has an actual release candidate package available :-)

@Numpsy Numpsy changed the title [WIP] Update to Avalonia 11 RC 1 May 31, 2023
@Numpsy
Copy link
Collaborator Author

Numpsy commented May 31, 2023

So it's building ok, and the control catalog seems to work :-)

There are a bunch of new warnings about some style related things being deprecated, that I haven't looked at, e.g.

/home/runner/work/Avalonia.FuncUI/Avalonia.FuncUI/src/Avalonia.FuncUI/Components/StaticComponent.fs(24,15): warning FS0044: This construct is deprecated. This interface may be removed in 12.0. Use StyledElement, or override StyledElement.StyleKeyOverride to override the StyleKey for a class
@Numpsy Numpsy marked this pull request as ready for review June 1, 2023 17:01
@Numpsy Numpsy mentioned this pull request Jun 2, 2023
11 tasks
Copy link
Member

@sleepyfran sleepyfran left a comment

Choose a reason for hiding this comment

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

Amazing job! We can definitely merge with the warnings, since the deprecation notice is for v12 we can either attempt to address it in a separate PR before the final v11 release (if any of us have any time to do so) or just fix all of them once they're removed in v12 :^)

@JaggerJo JaggerJo merged commit fe3cf45 into fsprojects:master Jun 13, 2023
1 check passed
@JaggerJo
Copy link
Member

I'm merging this.

@Numpsy Numpsy deleted the rw/avalonia_nights_reprise branch June 13, 2023 22:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants