╭──────────╮ │← previous│ ╰──────────╯ ╭ changed ────────────╮ │src/ui/Auth/Login.zig│ ╰─────────────────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │50 var nav_ids: [3]usize = undefined; │ │51 │ │52 { │ │53 - var username = wgt.TextInput(ui.Widget).init(.{ .label = " username ", .name = "username", .rounded_corners = true, .render_content = !wasm }); │ │53 + var username = try wgt.TextInput(ui.Widget).init(allocator, .{ .label = " username ", .name = "username", .rounded_corners = true, .render_content = !wasm });│ │54 errdefer username.deinit(allocator); │ │55 username.getFocus().focusable = true; │ │56 nav_ids[username_index] = username.getFocus().id; │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │62 } │ │63 │ │64 { │ │65 - var password = wgt.TextInput(ui.Widget).init(.{ .label = " password ", .password = true, .name = "password", .rounded_corners = true, .render_content = !wasm }); │ │65 + var password = try wgt.TextInput(ui.Widget).init(allocator, .{ .label = " password ", .password = true, .name = "password", .rounded_corners = true, .render_content = !wasm });│ │66 errdefer password.deinit(allocator); │ │67 password.getFocus().focusable = true; │ │68 nav_ids[password_index] = password.getFocus().id; │ ╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │120 else │ │121 " password "; │ │122 │ │123 + // refresh our entries in the session's focus-id -> *TextInput map with │ │124 + // this frame's current input addresses, so the web/wasm form handling │ │125 + // can find them by focus id │ │126 + const inputs_arena = self.session.arena.allocator(); │ │127 + try self.session.text_inputs.put(inputs_arena, username_input.getFocus().id, username_input);│ │128 + try self.session.text_inputs.put(inputs_arena, password_input.getFocus().id, password_input);│ │129 + │ │130 try self.center.build(allocator, constraint, root_focus); │ │131 } │ │132 │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭ changed ─────────────╮ │src/ui/Auth/Logout.zig│ ╰──────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │27 const button_index: usize = 1; │ │28 │ │29 pub fn init(allocator: std.mem.Allocator, data: *const Self, session: *ui.Session, users_tab_id: usize) !View { │ │30 - var box = wgt.Box(ui.Widget).init(.{ .border_style = null, .rounded_corners = true, .direction = .vert }); │ │30 + var box = try wgt.Box(ui.Widget).init(allocator, .{ .border_style = null, .rounded_corners = true, .direction = .vert });│ │31 errdefer box.deinit(allocator); │ │32 // marks this subtree as an HTML form scope for the web overlay │ │33 box.getFocus().kind = .{ .custom = switch (session.data.current_page) { │ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────╮ │36 } }; │ │37 │ │38 { │ │39 - var prompt = wgt.Text(ui.Widget).init("are you sure?"); │ │39 + var prompt = try wgt.Text(ui.Widget).init(allocator, "are you sure?");│ │40 errdefer prompt.deinit(allocator); │ │41 try box.children.put(allocator, prompt.getFocus().id, .{ │ │42 .widget = .{ .text = prompt }, │ ╰──────────────────────────────────────────────────────────────────────────────────────╯ ╭ changed ──────╮ │src/ui/Home.zig│ ╰───────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │48 const stack_index: usize = 1; │ │49 │ │50 pub fn init(allocator: std.mem.Allocator, data: *const Self, session: *ui.Session) !View { │ │51 - var box = wgt.Box(ui.Widget).init(.{ .border_style = null, .rounded_corners = true, .direction = .vert }); │ │51 + var box = try wgt.Box(ui.Widget).init(allocator, .{ .border_style = null, .rounded_corners = true, .direction = .vert });│ │52 errdefer box.deinit(allocator); │ │53 │ │54 // build the header first so we can grab the users-tab focus id and │ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────╮ │62 } │ │63 │ │64 { │ │65 - var stack = wgt.Stack(ui.Widget).init(); │ │65 + var stack = try wgt.Stack(ui.Widget).init(allocator);│ │66 errdefer stack.deinit(allocator); │ │67 │ │68 { │ ╰─────────────────────────────────────────────────────────────────────╯ ╭ changed ─────────────╮ │src/ui/Home/Header.zig│ ╰──────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │28 tab_ids: std.AutoArrayHashMapUnmanaged(usize, void), │ │29 │ │30 pub fn init(allocator: std.mem.Allocator, data: *const Self, session: *ui.Session) !View { │ │31 - var box = wgt.Box(ui.Widget).init(.{ .border_style = .hidden, .rounded_corners = true, .direction = .horiz }); │ │31 + var box = try wgt.Box(ui.Widget).init(allocator, .{ .border_style = .hidden, .rounded_corners = true, .direction = .horiz });│ │32 errdefer box.deinit(allocator); │ │33 │ │34 var tab_ids: std.AutoArrayHashMapUnmanaged(usize, void) = .empty; │ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭────────────────────────────────────────────────────────────────────────╮ │49 │ │50 // spacer │ │51 { │ │52 - var text = wgt.Text(ui.Widget).init(" "); │ │52 + var text = try wgt.Text(ui.Widget).init(allocator, " ");│ │53 errdefer text.deinit(allocator); │ │54 try box.children.put(allocator, text.getFocus().id, .{ │ │55 .widget = .{ .text = text }, │ ╰────────────────────────────────────────────────────────────────────────╯ ╭────────────────────────────────────────────────────────────────────────────╮ │65 ) |name, focus_name| { │ │66 // spacer │ │67 if (focus_name.len == 0) { │ │68 - var spacer = ui.Spacer.init(); │ │68 + var spacer = try ui.Spacer.init(allocator); │ │69 errdefer spacer.deinit(allocator); │ │70 try box.children.put(allocator, spacer.getFocus().id, .{│ │71 .widget = .{ .spacer = spacer }, │ ╰────────────────────────────────────────────────────────────────────────────╯ ╭──────╮ │next →│ ╰──────╯