-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Modern way to layout UI components #1309
Comments
I referring to how do you suggest to build layout — how to write code. Your vision about this topic. There are three solutions:
I have quite enough expertise in all 3 solutions and I am wondering what's your plan (sorry if it is stated somewhere, I didn't find information). |
Well, the approach to all coding in Fyne has been to use a compile-time type checked language so we can ensure a correct program before it ever runs. I suspect that a DSL doesn't really add anything in that area. Our plans for a UI designer would graphically create the same output as writing the code manually - though it's not all worked out yet. It will offer a "What you see is what you get" approach to writing the code for people who prefer to work visually. |
In my opinion and experience it fails and DSL wins (DSL as a code, not as a extra yet another format). Ok, thanks for comprehensive and quick answer. |
Can you explain a bit more about what you mean here? hello := &widget.Label{Text: "Hello Fyne!"}
w.SetContent(&widget.Box{Children: []fyne.CanvasObject{
hello,
&widget.Button{Text: "Hi!", OnTapped: func() {
hello.SetText("Welcome :)")
}},
}}) |
I mean that proper DSL will provide better UX because we are all developers and DSL will allow to express desired result in a more expressive way (accompanied by a preview tab :) anyway). From #1230:
It makes task more easier and DSL a better candidate, as you can restrict freedom (style everything) and provide some abstractions introducing some concepts likes "note" / "header" — widgets. For example IJ Platform UI DSL is very restrictive and forces developers to use only what described in the guidelines.
I am in no way saying that current approach is bad. |
What's your vision about layout? Do you think that old good way to layout components using layout managers / custom positioning a way to go? Or do you keep in mind some modern solutions like UI DSL — e.g. Jetpack Compose or something like IJ Platform UI DSL? And only lack of time / priorities is the reason of why currently old good layout managers are used?
The text was updated successfully, but these errors were encountered: