MyGo 0.3.3 fixes native UI input ordering so inline actions read the latest bound edits and combobox choices update dependent UI before the frame is painted.
Fixes
- Inline click and shortcut handlers see pending edits. When a text edit and a click or shortcut arrive before the next frame, an inline save now reads the edited value.
Clicked(),Clicks(),DoubleClicked(),RightClicked(),Element.Shortcut(),Element.OverlayShortcut(),Context.Shortcut(), andListState.Shortcut()apply pending bound input to controls built so far before returning. - Combobox choices are available in the same build.
ComboboxParts.Chosen()applies pending input and reports the chosen option afterPopup, whether selected by a click or Enter. Handling the choice rebuilds dependent UI before paint, and the choice is not reported again in a later build pass. - Fluent input configuration remains effective. Internal widget queries keep their construction ordering, so caller-supplied options such as
DisabledandReadOnlytake effect before bound input is applied. Regression tests cover batched edits and actions, scoped shortcuts, pointer and keyboard choices, and repeated frames.
Input queries and callbacks
Inline control flow remains supported:
ui.TextInput(c.Key("draft"), &app.draft).Label("Draft")
if ui.Button(c, "Save").Clicked() || c.Shortcut(ui.Cmd, ui.KeyS) {
app.save() // reads the latest draft
}Configure input options before querying a response. Queries apply input only to controls already built; later configuration cannot undo an edit already applied.
OnClick, OnShortcut, OnChange, and OnSubmit run after construction and bound input, before rebuilding. Use them when an action should wait until construction finishes, such as when it changes the collection being built.
For upgrades from 0.3.0 or 0.3.1, 0.3.2 also restored Changed() and Submitted() polling for local bound values in the same build pass:
viewed := app.viewed[file.ID]
if ui.Checkbox(c, &viewed, "Viewed").Changed() {
app.viewed[file.ID] = viewed
}See the migration guide and input and action documentation.
Upgrade
go get github.com/egoist/mygo@v0.3.3If your project pins the CLI as a Go tool:
go get -tool github.com/egoist/mygo/cmd/mygo@v0.3.3For projects with a web frontend, update the matching packages:
bun add mygo-runtime@0.3.3
bun add -d mygo-cli@0.3.3Update any installed @mygo-plugins/fetch, @mygo-plugins/websocket, or @mygo-plugins/sqlite packages to 0.3.3 as well.
Full changelog: 0.3.2 → 0.3.3