╭ changed ──────────────────╮ │src/ui/Repo/Discussions.zig│ ╰───────────────────────────╯ ╭───────────────────────────────────────────────────────────────────────────────────────────────────────╮ │222 pub fn initHeader(allocator: std.mem.Allocator, session: *ui.Session, data: *const Self) !Header {│ │223 var header = try Header.init(allocator, session, data.search); │ │224 errdefer header.deinit(allocator); │ │225 - const aa = session.page_arena.allocator(); │ │225 const selected_index = View.viewIndex(data.view); │ │226 const page_selected = std.meta.activeTag(session.data.current_page) == .repo_discussions; │ │227 │ ╰───────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │234 try header.addTab(allocator, label, link, 0); │ │235 } │ │236 │ │238 - // labels tab, showing the active label filter │ │237 + // labels tab │ │238 { │ │239 const labels_route = try thread.searchRoute(ui.RoutablePage.repoThreadLabelsRoute(.discuss, data.identity, data.label), data.search);│ │240 const labels_link = try ui.inPageTabLink(session, labels_route, page_selected and selected_index == View.viewIndex(.labels)); │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────────────╮ │242 - const label = if (data.label.len == 0) labels_tab_label else blk: { │ │243 - const decoded = std.Uri.percentDecodeInPlace(try aa.dupe(u8, data.label)); │ │244 - break :blk try aa.print(labels_tab_label ++ " ({s})", .{decoded}); │ │245 - }; │ │246 - try header.addTab(allocator, label, labels_link, View.viewIndex(.labels)); │ │241 + try header.addTab(allocator, labels_tab_label, labels_link, View.viewIndex(.labels));│ │242 } │ │243 │ │244 // new-discussion tab; an edit or comment url shows its tab in this place │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭ changed ─────────────╮ │src/ui/Repo/Header.zig│ ╰──────────────────────╯ ╭────────────────────────────────────────────────────────────────────────────────╮ │32 ref_or_oid: RefOrOid, │ │33 ref_or_oid_value: []const u8, │ │34 // each thread tab's label filter, url-encoded ("" = unfiltered), so the tab│ │35 -// links back to the filtered list. │ │35 +// links back to the filtered list and shows the label beneath it. │ │36 discussions_label: []const u8, │ │37 issues_label: []const u8, │ │38 patches_label: []const u8, │ ╰────────────────────────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │79 const aa = session.page_arena.allocator(); │ │80 const ref_name = std.Uri.percentDecodeInPlace(try aa.dupe(u8, page.files.patchrev_id orelse data.ref_or_oid_value)); │ │81 const bottom_label = try ui.clippedBottomLabel(try aa.alloc(u8, ui.clipped_bottom_label_max_len), ref_name); │ │82 + const discussions_bottom_label = try ui.clippedBottomLabel(try aa.alloc(u8, ui.clipped_bottom_label_max_len), std.Uri.percentDecodeInPlace(try aa.dupe(u8, data.discussions_label)));│ │83 + const issues_bottom_label = try ui.clippedBottomLabel(try aa.alloc(u8, ui.clipped_bottom_label_max_len), std.Uri.percentDecodeInPlace(try aa.dupe(u8, data.issues_label))); │ │84 + const patches_bottom_label = try ui.clippedBottomLabel(try aa.alloc(u8, ui.clipped_bottom_label_max_len), std.Uri.percentDecodeInPlace(try aa.dupe(u8, data.patches_label))); │ │85 const changes_label = switch (page.changes) { │ │86 .diff => diff_tab_label, │ │87 .commits => |c| if (c.commit_count) |count| try aa.print(commits_tab_label ++ " ({d})", .{count}) else commits_tab_label, │ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │227 │ │228 // discuss tab, unless it is off │ │229 if (page.repo.event.discuss_role != null) { │ │227 - var text_box = try wgt.TextBox.init(allocator, discuss_tab_label, .{ .border = .single, .round_corners = true, .wrap_kind = .none }); │ │230 + var text_box = try wgt.TextBox.init(allocator, discuss_tab_label, .{ .border = .single, .round_corners = true, .wrap_kind = .none, .bottom_label = .{ .text = discussions_bottom_label } });│ │231 errdefer text_box.deinit(allocator); │ │232 text_box.getFocus().mode = .all; │ │233 text_box.getFocus().kind = .{ .custom = discussions_link }; │ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │242 │ │243 // issues tab, unless it is off │ │244 if (page.repo.event.issue_role != null) { │ │242 - var text_box = try wgt.TextBox.init(allocator, issues_tab_label, .{ .border = .single, .round_corners = true, .wrap_kind = .none }); │ │245 + var text_box = try wgt.TextBox.init(allocator, issues_tab_label, .{ .border = .single, .round_corners = true, .wrap_kind = .none, .bottom_label = .{ .text = issues_bottom_label } });│ │246 errdefer text_box.deinit(allocator); │ │247 text_box.getFocus().mode = .all; │ │248 text_box.getFocus().kind = .{ .custom = issues_link }; │ ╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │257 │ │258 // patches tab, unless it is off │ │259 if (page.repo.event.patch_role != null) { │ │257 - var text_box = try wgt.TextBox.init(allocator, patches_tab_label, .{ .border = .single, .round_corners = true, .wrap_kind = .none }); │ │260 + var text_box = try wgt.TextBox.init(allocator, patches_tab_label, .{ .border = .single, .round_corners = true, .wrap_kind = .none, .bottom_label = .{ .text = patches_bottom_label } });│ │261 errdefer text_box.deinit(allocator); │ │262 text_box.getFocus().mode = .all; │ │263 text_box.getFocus().kind = .{ .custom = patches_link }; │ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭ changed ─────────────╮ │src/ui/Repo/Issues.zig│ ╰──────────────────────╯ ╭───────────────────────────────────────────────────────────────────────────────────────────────────────╮ │378 pub fn initHeader(allocator: std.mem.Allocator, session: *ui.Session, data: *const Self) !Header {│ │379 var header = try Header.init(allocator, session, data.search); │ │380 errdefer header.deinit(allocator); │ │381 - const aa = session.page_arena.allocator(); │ │381 const selected_index = View.viewIndex(data.view); │ │382 const page_selected = std.meta.activeTag(session.data.current_page) == .repo_issues; │ │383 │ ╰───────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │391 try header.addTab(allocator, label, link, index); │ │392 } │ │393 │ │395 - // labels tab, showing the active label filter │ │394 + // labels tab │ │395 { │ │396 const labels_route = try thread.searchRoute(ui.RoutablePage.repoThreadLabelsRoute(.issue, data.identity, data.label), data.search);│ │397 const labels_link = try ui.inPageTabLink(session, labels_route, page_selected and selected_index == View.viewIndex(.labels)); │ ╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭──────╮ │next →│ ╰──────╯