1.0.1
Fixed
- Form submission in the reference document. A click on a submit button (a
buttonof typesubmitor with no type or an unknown one, aninputof typesubmitorimage) now submits its form owner: the form'ssubmitevent is raised, bubbles, and can be cancelled, as in the HTML Standard. The form owner follows theformattribute; disabled controls and fieldsets,type=buttonandtype=resetnever submit; arequiredcontrol without a value blocks submission (itsinvalidevent is raised and it takes focus) unless the submitter hasformnovalidateor the form hasnovalidate. Enter in a text-like field submits implicitly: through a click on the form's first submit button, or directly when the form has at most one such field and no submit button. Enter or Space on a focused submit button, and a click on a label for one, submit too. The click and the submit run as one user action, so they commit as one change set.invalidis now reported as an event that does not bubble (changeset.BubblesNot). - Browser backend: forms submit natively, so handlers see the browser's own
submitevent once; the bridge cancels the submission's navigation for a form with noaction, so a form withon:submitno longer reloads the page.
Added
oneuitest.Page.Press(selector, key).
1.0.0 — 2026-12-05
The API as it stands for 1.0.
HTML rendering
oneui generatewrites aRenderHTML(w io.Writer) errormethod on every component with a template, andoneui.RenderHTML(w, c)calls it for anyoneui.Component(oneui.HTMLRendereris the interface,oneui.ErrNotRenderablethe error, tested witherrors.Is). It writes the markup for the component's current state without nodes or change sets, for first paint and server-side rendering. The output is the reference document's serialisation after a mount, with a two-way binding's DOM property written as the HTML attribute with the same meaning (value,checked; a textarea's value as content), and U+00A0 written as the character.oneui.HTMLRendererdocuments what it contains and when to mount instead.
Performance
- Mounting a list roughly halves its allocations and time, and updating one row of a long keyed list no longer visits the others: a row whose item (a value type) and index are unchanged skips its row bindings, and a list whose keys did not change skips the reconcile. Rows and bindings take one allocation each, the context swaps its two change buffers instead of copying, and the reference document keeps nodes in a dense table. No API or protocol change.
Packages
oneui: the component runtime.Componentis sealed on purpose: embedBaseand implementBuildandUpdate.oneui/oneuitest:Mount(t, component)mounts a component in the reference document with a manual clock and returns aPagewithClick,Type,Text,HTMLandAdvance. Each action applies what the component did and fails the test on an error.oneui/changeset: change-set protocol 3, JSON and binary encodings, a constructor for each change kind (NewSetText,NewInsert, ...), bounded decoders (Limits).oneui/dom: the reference document with selector and accessibility queries.dom.New(dom.WithMaxCommits(n));Queryreturns an error wrappingErrNotFoundwhen nothing matches; a*NodehasClick,Input,DispatchandSetBox.oneui/template: the template and stylesheet parser.Parse,ParseCSSandParseInlinereturnerror;*template.ErrorwrapsErrSyntax,ErrorListholds several,Errors(err)lists them.oneui/genand theoneuicommand:genisGenerate,Input,Result,DiagnosticandGeneratedMark.Diagnosticis an error (File,Line,Col,Msg,ID);Result.Err()joins them and wrapsErrDiagnostics; a Go syntax error in a source file is returned as a*Diagnosticwith an empty ID. The command prints every problem asfile:line:col: ...and exits 0, 1 or 2 (seego doc ./cmd/oneui).oneui/reload:Template,Result,Status,CauseandAvailable, for template reload in programs built with theoneui_reloadtag.oneui/rtandoneui/rt/reload: support code that generated files call. Outside the compatibility promise and versioned with the generator: generated files checkrt.RuntimeVersionat start-up and stop with a message to rungo generateagain when it differs.oneui/uiandoneui/ui/kit: the engine-free retained UI tree and the widget kit.oneui/browser(GOOS=js GOARCH=wasm): the browser backend.browser.Glue()returns the bundled script.
Names and shapes
oneui.NodeIDnames a node;oneui.Append(0) as the "before" argument places a node last. Arguments are(parent, child, before)everywhere, includingBase.MountandContext.MountAt.oneui.ElementRefis the type ofref="{Name}"fields.- Handlers take
*oneui.Event; there are no per-kind event types. RectandSizefields areX, Y, W, HandW, Hinchangesetandui.oneui.WithErrorHandlerreceives problems the context cannot return to a caller (browser.WithErrorHandlerlikewise).Scheduler.Schedulereturns a*Timer;Timer.Stopreports whether it stopped the call, liketime.Timer.Loop.Postreturns false once the loop is closed.oneui.Newconnects a sink that hasSetDispatcher(the reference document, the browser host) to the context.Context.Batch(fn)is the only way to batch.Base.RuntimeandBase.SetRuntimehold generated code's update scope.oneui.Formatisrt.Format;ScrollAlignis the scroll alignment ofScrollIntoView.ui:Element.SetAcceptsTextandAcceptsText,IDSelector,Element.TextContent,BoxSizingBorderandBoxSizingContent,Tree.SetValueandTree.Value.ui/kit: constructors take required arguments positionally and the rest as options (kit.ID,kit.Kind,kit.Placeholder,kit.Horizontal,kit.ShowValue,kit.Danger,kit.OnCancel,kit.ConfirmText,kit.CancelText); lists and tables takeListOptionsandTableOptions. Clipboards belong to aHost(kit.WithClipboard,Host.SetTreeClipboard); there is no package-level clipboard.
Generated code
The generated files use named state-bit constants, role-named parameters (parent, before), oneui.Append, and no empty import. Setters of types Go cannot compare say they always update.