-
-
Notifications
You must be signed in to change notification settings - Fork 74
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
Avalonia.FuncUI v1.0 release #222
Comments
Like the |
I can deprecate the DSL package shortly before we plan to release the new version 👍 |
I'm not happy at all with the documentation situation right now. 🙃 |
Yeah, actually I just realized that we have the GitBook under the Avalonia's domain up and working, I'll add another task here to sunset the current one we have (https://avaloniacommunity.github.io/Avalonia.FuncUI.Docs/) and add the one under Avalonia's domain to the README. What else do you think we should do to improve it? I'm all up for making the docs better, it's true that we're lacking a bit here. |
Yes exactly, that's a good first step! (copying our docs over) 👍 I think we have a lot of good stuff in the docs, but it could use some polishing. Getting started: Why? Needing templates implies complexity and for FuncUI all you really need is this (and the view could be reduced to a lot less code): namespace Examples.CounterApp
open Avalonia
open Avalonia.Controls
open Avalonia.Controls.ApplicationLifetimes
open Avalonia.FuncUI
open Avalonia.FuncUI.DSL
open Avalonia.Layout
open Avalonia.Themes.Fluent
open Avalonia.FuncUI.Hosts
module Views =
let counter =
Component
(fun ctx ->
let state = ctx.useState 0
DockPanel.create [
DockPanel.children [
Button.create [
Button.dock Dock.Bottom
Button.onClick (fun _ -> state.Current - 1 |> state.Set)
Button.content "-"
Button.horizontalAlignment HorizontalAlignment.Stretch
]
Button.create [
Button.dock Dock.Bottom
Button.onClick (fun _ -> state.Current + 1 |> state.Set)
Button.content "+"
Button.horizontalAlignment HorizontalAlignment.Stretch
]
TextBox.create [
TextBox.dock Dock.Bottom
TextBox.onTextChanged (
(fun text ->
let isNumber, number = System.Int32.TryParse text
if isNumber then number |> state.Set)
)
TextBox.text (string state.Current)
TextBox.horizontalAlignment HorizontalAlignment.Stretch
]
TextBlock.create [
TextBlock.dock Dock.Top
TextBlock.fontSize 48.0
TextBlock.verticalAlignment VerticalAlignment.Center
TextBlock.horizontalAlignment HorizontalAlignment.Center
TextBlock.text (string state.Current)
]
]
])
type MainWindow() =
inherit HostWindow()
do
base.Title <- "Counter Example"
base.Height <- 400.0
base.Width <- 400.0
base.Content <- Main.view
type App() =
inherit Application()
override this.Initialize() =
this.Styles.Add (FluentTheme(baseUri = null, Mode = FluentThemeMode.Dark))
override this.OnFrameworkInitializationCompleted() =
match this.ApplicationLifetime with
| :? IClassicDesktopStyleApplicationLifetime as desktopLifetime ->
let mainWindow = MainWindow()
desktopLifetime.MainWindow <- mainWindow
| _ -> ()
module Program =
[<EntryPoint>]
let main(args: string[]) =
AppBuilder
.Configure<App>()
.UsePlatformDetect()
.UseSkia()
.StartWithClassicDesktopLifetime(args) |
Hi, As I mentioned in #232, it looks like version 11 of Avalonia.Web only supports .NET 7.0, so I guess that the FuncUI WebAssembly sample will need to be the same - and that would also mean that the CI builds would need changing to use the .NET 7 SDK rather than 6 - so, is that possible/acceptable? (I'm not sure if the github build pipelines have the new SDK available by default yet though) |
fyi, the Avalonia change at AvaloniaUI/Avalonia#9553 has removed a load of interfaces that FuncUI uses, apparently in favour of just using the base classes instead, which is an ever so slightly breaking change over here. I had a quick go at changing the lib to just use the base clases instead of interfaces and the control catalogue seems to still run, but I didn't check anything beyond that |
Oh, boy. Thanks for the heads up! I guess a search and replace of |
On the subject of nuget packages - anyone have any opinions on adding SourceLink to the build? |
Great idea! |
It looks like another breaking change has been made in Avalonia - the change at AvaloniaUI/Avalonia#10112 has moved So - what would the preferred approach to handling that change be? |
Looks like we can get rid of the bindings. |
ahh, yeah :D everything after the |
I see that Avalonia 11 preview 7 was released over night, with another set of breaking changes to the Items/ItemsSource properties (we can but hope that's the last ones). I'll try to have a go with it, and see how many changes there are |
Thanks for the ongoing effort, really appreciate it. |
Avalonia 11 has finally hit a release candidate build: AvaloniaUI/Avalonia#11593 |
I get exception after upgrading to rc1
|
The currently released FuncUI packages don't work with RC1 due to breaking API changes on the Avalonia side, it needs the changes in #308 to work |
Think we should use a version > 1 for the next release. |
Is it possible to get an RC1 compatible nuget package published? (I've been hung up on updating some things because I was waiting for an RC1 compatible build of TreeDataGrid, and that just dropped) |
Published a new version. If you'd be interested I could make you a co-maintainer. You have contributed quite a lot in the past - might make things easier. |
I don't mind doing that, though I never know how much time I'll have to look at things |
Does there need to be an updated version of the diagnostics package? |
Sent you an invitation.
We've never even released it under the new |
I guess it's time to ship it 🚀 |
Congrats on the release! You guys have been working hard. 👏 |
Opening this issue to track the work needed before we release the non-pre-release version of v0.6
Before release
Avalonia.Themes.Fluent
)Since 4564a6d the DSL project lives inside of the main FuncUI package and upgrading from a previous version that has the a package reference to the DSL makes all this funky errors where half of the imports seem unused and all the controls stop working:
The fix is, of course, to remove the package reference to the DSL but I think we should make this clearer to the user.
After release
The text was updated successfully, but these errors were encountered: