Show PR numbers without the # and make header buttons icon-only
PR badges in the sidebar rows, hover card, and right-sidebar PR tab now show the number alone. The Scripts and Open-in-editor header buttons drop their labels and gain a min height so they keep the same size icon-only.
This commit is contained in:
@@ -2,11 +2,11 @@ import { describe, expect, it } from "vitest";
|
||||
import { formatPrTabLabel } from "./tab-label";
|
||||
|
||||
describe("formatPrTabLabel", () => {
|
||||
it("returns #<number> when a pull request number is present", () => {
|
||||
expect(formatPrTabLabel(42)).toBe("#42");
|
||||
it("returns the number when a pull request number is present", () => {
|
||||
expect(formatPrTabLabel(42)).toBe("42");
|
||||
});
|
||||
|
||||
it("returns #— fallback when the pull request number is null", () => {
|
||||
expect(formatPrTabLabel(null)).toBe("#—");
|
||||
it("returns the — fallback when the pull request number is null", () => {
|
||||
expect(formatPrTabLabel(null)).toBe("—");
|
||||
});
|
||||
});
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
export function formatPrTabLabel(prNumber: number | null): string {
|
||||
return prNumber === null ? "#—" : `#${prNumber}`;
|
||||
return prNumber === null ? "—" : `${prNumber}`;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user