╭ changed ───────────────╮ │src/ui/widget/thread.zig│ ╰────────────────────────╯ ╭───────────╮ │← all files│ ╰───────────╯ ╭──────────╮ │← previous│ ╰──────────╯ ╭────────────────────────────────────────────────────────────────────────────────────────────────────╮ │958 } │ │959 │ │960 switch (child.*) { │ │961 - .tag_flow => |*tags| self.tagsInput(child_index, tags, key, root_focus), │ │961 + .word_flow => |*labels| self.labelsInput(child_index, labels, key, root_focus),│ │962 .copyable_text => |*copyable| switch (key) { │ │963 .arrow_up => if (!self.moveVertical(root_focus, false)) { │ │964 self.exit = .header; │ ╰────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │1264 return true; │ │1265 } │ │1266 │ │1267 - fn tagsInput(self: *This, child_index: usize, tags: *TagFlow, key: Key, root_focus: *Focus) void { │ │1268 - const child_id = tags.focus.child_id orelse return; │ │1269 - const cur = tags.indexOfFocusId(child_id) orelse return; │ │1270 - const count = tags.text_boxes.items.len; │ │1267 + fn labelsInput(self: *This, child_index: usize, labels: *WordFlow, key: Key, root_focus: *Focus) void {│ │1268 + const child_id = labels.focus.child_id orelse return; │ │1269 + const cur = labels.indexOfFocusId(child_id) orelse return; │ │1270 + const count = labels.text_boxes.items.len; │ │1271 switch (key) { │ │1272 - .arrow_left => if (cur > 0) self.focusTag(child_index, tags, root_focus, cur - 1) else { │ │1272 + .arrow_left => if (cur > 0) self.focusLabel(child_index, labels, root_focus, cur - 1) else { │ │1273 self.exit = .list; │ │1274 }, │ │1275 - .arrow_right => if (cur + 1 < count) self.focusTag(child_index, tags, root_focus, cur + 1), │ │1276 - .arrow_up => if (tags.rowStep(cur, false)) |index| { │ │1277 - self.focusTag(child_index, tags, root_focus, index); │ │1275 + .arrow_right => if (cur + 1 < count) self.focusLabel(child_index, labels, root_focus, cur + 1),│ │1276 + .arrow_up => if (labels.rowStep(cur, false)) |index| { │ │1277 + self.focusLabel(child_index, labels, root_focus, index); │ │1278 } else { │ │1279 _ = self.moveVertical(root_focus, false); │ │1280 }, │ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭──────────────────────────────────────────────────────────────────────────────────╮ │1281 - .arrow_down => if (tags.rowStep(cur, true)) |index| { │ │1282 - self.focusTag(child_index, tags, root_focus, index); │ │1281 + .arrow_down => if (labels.rowStep(cur, true)) |index| { │ │1282 + self.focusLabel(child_index, labels, root_focus, index);│ │1283 } else { │ │1284 _ = self.moveVertical(root_focus, true); │ │1285 }, │ ╰──────────────────────────────────────────────────────────────────────────────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────╮ │1286 - .home => self.focusTag(child_index, tags, root_focus, 0), │ │1287 - .end => self.focusTag(child_index, tags, root_focus, count - 1), │ │1286 + .home => self.focusLabel(child_index, labels, root_focus, 0), │ │1287 + .end => self.focusLabel(child_index, labels, root_focus, count - 1),│ │1288 else => {}, │ │1289 } │ │1290 } │ ╰──────────────────────────────────────────────────────────────────────────────────────────╯ ╭───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │1291 │ │1292 - fn focusTag(self: *This, child_index: usize, tags: *TagFlow, root_focus: *Focus, item: usize) void { │ │1293 - root_focus.setFocus(tags.text_boxes.items[item].getFocus().id); │ │1294 - if (self.session.is_terminal and item < tags.rects.items.len) { │ │1292 + fn focusLabel(self: *This, child_index: usize, labels: *WordFlow, root_focus: *Focus, item: usize) void {│ │1293 + root_focus.setFocus(labels.text_boxes.items[item].getFocus().id); │ │1294 + if (self.session.is_terminal and item < labels.rects.items.len) { │ │1295 if (self.inner().children.values()[child_index].rect) |flow_rect| { │ │1296 - var rect = tags.rects.items[item]; │ │1296 + var rect = labels.rects.items[item]; │ │1297 rect.x += flow_rect.x; │ │1298 rect.y += flow_rect.y; │ │1299 self.scroll.scrollToRect(rect); │ ╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────╮ │1424 const This = @This(); │ │1425 // a vertical box: the header tabs on top, then a stack holding a │ │1426 // master-detail split (thread list + description pane) per status list, │ │1427 - // plus the tags view. │ │1427 + // plus the labels view. │ │1428 box: wgt.Box(Widget), // vert: [header_index] = tabs, [stack_index] = stack│ │1429 data: *const Self, │ │1430 session: *ui.Session, │ ╰─────────────────────────────────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────╮ │1433 const stack_index: usize = 1; │ │1434 // indices within the stack, 1:1 with the header tabs. │ │1435 const status_count = @typeInfo(Status).@"enum".fields.len; │ │1436 - const tags_view_index: usize = status_count; │ │1436 + const labels_view_index: usize = status_count; │ │1437 // the new-thread form, or the edit, comment, or resolve form when the page was│ │1438 // loaded at one of their urls. │ │1439 - const form_view_index: usize = tags_view_index + 1; │ │1439 + const form_view_index: usize = labels_view_index + 1; │ │1440 // the conflicts split; the tab and stack child exist only when the repo │ │1441 // has conflicted threads. │ │1442 const drafts_view_index: usize = form_view_index + 1; │ ╰─────────────────────────────────────────────────────────────────────────────────────────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │1450 │ │1451 pub fn viewIndex(view: ViewKind) usize { │ │1452 const name = @tagName(view); │ │1453 - if (std.mem.eql(u8, name, "tags")) return tags_view_index; │ │1453 + if (std.mem.eql(u8, name, "labels")) return labels_view_index; │ │1454 if (std.mem.eql(u8, name, "new") or std.mem.eql(u8, name, "edit") or std.mem.eql(u8, name, "publish") or std.mem.eql(u8, name, "merge") or std.mem.eql(u8, name, "new_comment") or std.mem.eql(u8, name, "edit_comment") or std.mem.eql(u8, name, "remove") or std.mem.eql(u8, name, "resolve")) return form_view_index;│ │1455 if (std.mem.eql(u8, name, "conflicts")) return conflict_view_index; │ │1456 if (std.mem.eql(u8, name, "drafts")) return drafts_view_index; │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │1489 return if (supports_drafts) entry.draft else false; │ │1490 } │ │1491 │ │1492 - fn listRoute(identity: []const u8, status: Status, tag: []const u8, selected: []const u8) ?ui.RoutablePage { │ │1493 - return Data.listRoute(identity, status, tag, selected); │ │1492 + fn listRoute(identity: []const u8, status: Status, label: []const u8, selected: []const u8) ?ui.RoutablePage {│ │1493 + return Data.listRoute(identity, status, label, selected); │ │1494 } │ │1495 │ │1496 fn draftsRoute(identity: []const u8) ?ui.RoutablePage { │ ╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │1513 return if (supports_conflicts) Data.resolveRoute(identity, selected, picks) else null; │ │1514 } │ │1515 │ │1516 - // a list link keeps the filters the page carries: the tag, and the │ │1516 + // a list link keeps the filters the page carries: the label, and the │ │1517 // search query when one is set │ │1518 - fn listLink(page_arena: *std.heap.ArenaAllocator, identity: []const u8, status: Status, tag: []const u8, id: []const u8, search: []const u8) ![]const u8 { │ │1519 - var route = listRoute(identity, status, tag, id) orelse return error.RouteTooLong; │ │1518 + fn listLink(page_arena: *std.heap.ArenaAllocator, identity: []const u8, status: Status, label: []const u8, id: []const u8, search: []const u8) ![]const u8 {│ │1519 + var route = listRoute(identity, status, label, id) orelse return error.RouteTooLong; │ │1520 if (search.len != 0) route = route.withSearch(search) orelse return error.RouteTooLong; │ │1521 return std.fmt.allocPrint(page_arena.allocator(), "a:{s}", .{try route.toUrl(page_arena)}); │ │1522 } │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭──────╮ │next →│ ╰──────╯