web/repo: a ribbon's line counts take the ribbon's size, and its file tree button centres its icon
171 unmodified linesExpand all17217317417517617617717817918070 unmodified lines171 unmodified linesExpand all > {/if} {#if stat && (stat.insertions > 0 || stat.deletions > 0)} <span class="y-seg shrink-10" class:hidden={gone(2)} ><DiffStatPill {stat} size="small" /></span ><DiffStatPill {stat} size="inherit" /></span > {/if} {#if pipelineStatuses} <Pending>70 unmodified lines118 unmodified linesExpand all11912012112212312312412512612744 unmodified lines118 unmodified linesExpand all {@render refSegment("compare", compare.head, headOptions, pickHead)} </div> <div class="y-rb ml-auto" role="group" aria-label="compare actions"> {#if diff.data} <span class="y-seg"><DiffStatPill stat={diff.data.stat} size="small" /></span> <span class="y-seg"><DiffStatPill stat={diff.data.stat} size="inherit" /></span> {/if} <button type="button" class="y-seg cursor-pointer font-[inherit] hover:text-(--y-accent) disabled:cursor-default disabled:text-(--y-muted)"44 unmodified lines2 unmodified lines345677891011121 unmodified line14151617171819202122232425267 unmodified lines2 unmodified lines
interface Props { stat: LineStat; class?: string; // inherit: the size of the ribbon or line it sits in, so it lines up with the text beside it size?: "small" | "regular"; size?: "small" | "regular" | "inherit"; }
let { stat, class: className = "", size = "regular" }: Props = $props();</script>1 unmodified line{#if stat.insertions > 0 || stat.deletions > 0} <span class={[ "inline-flex items-center gap-xs tabular-nums select-none", size === "small" ? "typography-monospace-small" : "typography-monospace-regular", { small: "typography-monospace-small", regular: "typography-monospace-regular", inherit: "font-mono" }[size], className ]} > {#if stat.insertions > 0}7 unmodified lines83 unmodified lines84858687888889909192124 unmodified linesExpand all83 unmodified lines </span> {/if} {#if stat} <span class="y-seg stat"> <DiffStatPill {stat} size="small" /> <DiffStatPill {stat} size="inherit" /> <DiffBar {stat} /> {#if stat.files > 1} <span class="y-seg-m">{stat.files} {plural(stat.files, "file", "files")}</span> {/if}124 unmodified linesExpand all658 unmodified linesExpand all6596606616626636636646656666671 unmodified line669670671672673673674675676677155 unmodified linesExpand all658 unmodified linesExpand all onclick={() => (commitsOpen = !commitsOpen)}>commits</button > {#if shown} {#if shown.stat.insertions || shown.stat.deletions}<span class="y-seg" ><DiffStatPill stat={shown.stat} size="small" /></span ><DiffStatPill stat={shown.stat} size="inherit" /></span >{/if} <span class="y-seg y-seg-m max-sm:hidden" data-testid="changedFilesCount"1 unmodified line >{shown.files.length} {plural(shown.files.length, "file", "files")}</span > <button type="button" class={["y-seg", diffView?.treeShown() && "y-seg-b"]} class={["y-seg ic-box", diffView?.treeShown() && "y-seg-b"]} aria-pressed={diffView?.treeShown()} title="file tree" aria-label="file tree" onclick={() => diffView?.toggleTree()}155 unmodified linesExpand all