Releases: maxence-charriere/go-app
3.1.2
3.1.1
mac
- menuitem icon support.
- menuitem checked support.
3.1.0
Hello!
Tonight release is focused on code quality and how html is handled behind de scene.
The previous iteration used a decoder to translate html code into a node tree which represented the document state.
In the most heavy scenario, was after diffs and modifications, each modified nodes were encoded to their html representation, sent to the webview and put in place with outerHTML call.
# Before 3.1.0
------- ------ -------- ------ --------- ----------- --------
| compo | --> | html | --> | node A | --> | html | --> | webview | --> | outerHTML | --> | screen |
------- ------ -------- ------ --------- ----------- --------
The current interation still translates html into a node tree but each modifications (creations, modifications, deletions) generate change descriptors. These descriptors are sent to the views which follow the instructions and call the corresponding js or native calls to create, modify or delete the real node.
# After 3.1.0
------- ------ -------- -------------- --------- ----------- --------
| compo | --> | html | --> | node A | --> | change desc. | --> | webview | --> | createNode | --> | screen |
------- ------ -------- -------------- --------- ----------- --------
-------------- --------- --------- --------
--> | change desc. | --> | webview | --> | setAttr | -----> | screen |
-------------- --------- --------- --------
-------------- --------- ------------- --------
--> | change desc. | --> | webview | --> | appendChild | -> | screen |
-------------- --------- ------------- --------
It also allows to keep the same logic whithin different platforms, whether we deal with vebviews or native menus.
general
- New dom engine.
web
- Notfound component is now rendered on the client side.
3.0.1
goapp mac build -bundle
now produces a valid package when specifying an AppName
.
3.0.0
Hello,
Here is the version 3 of this package.
I have been working on this for a while and wanted to give you feedback about
the why and what is the future for this project.
The previous version was an improvement in term of stability.
Though, there was a couple of things that I was not happy with:
- Overuse of error returns made the package more verbose and heavier to use.
- Overuse of decorator pattern made the package harder to test and maintain.
Looking forward for other platforms support, I really felt the need to improve
the story about these issues.
The API will unlikely change now and focus will be on improving and adding
features.
Thank you so much for using this package and giving feedbacks.
API changes
General
v2 | v3 |
---|---|
func NewWindow(c WindowConfig) (Window, error) | func NewWindow(c WindowConfig) Window |
func NewPage(c PageConfig) error | func NewPage(c PageConfig) Page |
func NewContextMenu(c MenuConfig) (Menu, error) | func NewContextMenu(c MenuConfig) Menu |
func NewFilePanel(c FilePanelConfig) error | func NewFilePanel(c FilePanelConfig) Elem |
func NewSaveFilePanel(c SaveFilePanelConfig) error | func NewSaveFilePanel(c SaveFilePanelConfig) Elem |
func NewShare(v interface{}) error | func NewShare(v interface{}) Elem |
func NewNotification(c NotificationConfig) error | func NewNotification(c NotificationConfig) Elem |
func MenuBar() (Menu, error) | func MenuBar() Menu |
func NewStatusMenu(c StatusMenuConfig) (StatusMenu, error) | func NewStatusMenu(c StatusMenuConfig) StatusMenu |
func Dock() (DockTile, error) | func Dock() DockTile |
func NewAction(name string, arg interface{}) | func PostAction(name string, arg interface{}) |
func NewActions(a ...Action) | func PostActions(a ...Action) |
func Handle(name string, h ActionHandler) | func HandleAction(name string, h ActionHandler) |
func NewEventSubscriber() EventSubscriber | func NewEventSubscriber() *EventSubscriber |
func CSSResources() []string | removed |
func CompoNameFromURL(u *url.URL) string | removed |
func CompoNameFromURLString(rawurl string) string | removed |
func NewErrNotFound(object string) error | removed |
func NotFound(err error) bool | removed |
func NewErrNotSupported(feature string) error | removed |
func NotSupported(err error) bool | removed |
Window
v2 | v3 |
---|---|
Load(url string, v ...interface{}) error | Load(url string, v ...interface{}) |
Render(Compo) error | Render(Compo) |
LastFocus() time.Time | removed |
Reload() error | Reload() |
Previous() error | Previous() |
Next() error | Next() |
Move(x, y float64) error | Move(x, y float64) |
Center() error | Center() |
Resize(width, height float64) error | Resize(width, height float64) |
Focus() error | Focus() |
ToggleFullScreen() error | FullScreen() |
ExitFullScreen() | |
ToggleMinimize() error | Minimize() |
Deminimize() | |
Close() error | Close() |
Page
v2 | v3 |
---|---|
Load(url string, v ...interface{}) error | Load(url string, v ...interface{}) |
Render(Compo) error | Render(Compo) |
LastFocus() time.Time | removed |
Reload() error | Reload() |
Previous() error | Previous() |
Next() error | Next() |
Close() error | Close() |
Menu
v2 | v3 |
---|---|
Load(url string, v ...interface{}) error | Load(url string, v ...interface{}) |
Render(Compo) error | Render(Compo) |
LastFocus() time.Time | removed |
StatusMenu
v2 | v3 |
---|---|
Load(url string, v ...interface{}) error | Load(url string, v ...interface{}) |
Render(Compo) error | Render(Compo) |
LastFocus() time.Time | removed |
SetIcon(name string) error | SetIcon(path string) |
SetText(text string) error | SetText(text string) |
Close() error | Close() |
DockTile
v2 | v3 |
---|---|
Load(url string, v ...interface{}) error | Load(url string, v ...interface{}) |
Render(Compo) error | Render(Compo) |
LastFocus() time.Time | removed |
SetIcon(name string) error | SetIcon(path string) |
SetBadge(v interface{}) error | SetBadge(v interface{}) |
Misc
- A lot of code has been refactored.
appjs
andhtml
has been moved tointernal
.
What next
- Dom engine replacement.
- Windows driver.
- Godoc overhaul.
2.6.1
- interfaces and funcs renamed with shorter names:
- interfaces:
Component
=>Compo
ElementWithComponent
=>ElemWithCompo
ComponentWithExtendedRender
=>CompoWithExtendedRender
- functions:
ComponentNameFromURLString
=>CompoNameFromURLString
- interfaces:
2.6.0
-
app.Element
is renamedapp.Elem
-
func to get an element changed.
Old way (deprecated/deleted):
func ElementByComponent(c Component) (ElementWithComponent, error) { ... } func NavigatorByComponent(c Component) (Navigator, error) { ... } func WindowByComponent(c Component) (Window, error) { ... } func PageByComponent(c Component) (Page, error) { ... }
New way:
func ElemByCompo(c Component) Elem { ... }
Example:
app.ElemByCompo(myCompo).WhenWindow(func(w app.Window) { w.Center() })
See Elem definition for more info.
-
Add compatibility with 10.11 (#144)
-
MacOS driver is now compatible with MacOS El Capitan (10.11). Thanks to tectiv3