The IDE you know, rebuilt in Rust. IntelliJ IDEA–style keymap, tool windows and search-everywhere in a fast native app: editor, code insight, debugger, Git, terminal, database and HTTP clients for 60+ languages.
TypeScript code-editorcross-platformdapdatabase-clientdebuggerdesktop-appdeveloper-toolsgithttp-clientideintellijlsprusttauriterminal
fix(vcs): refine log ref labels, row height and favorite star (#335)
l0ng-ai95068f5885d8
diff --git a/src/features/project-tree/ProjectView.module.css b/src/features/project-tree/ProjectView.module.cssindex 6166ed30b..fb4a141a9 100644--- a/src/features/project-tree/ProjectView.module.css+++ b/src/features/project-tree/ProjectView.module.css@@ -42,6 +42,9 @@.excluded {color: var(--vcs-ignored);}+.excludedRow {+ background: color-mix(in srgb, var(--vcs-ignored) 14%, transparent);+}.error {text-decoration: underline wavy var(--danger);text-decoration-skip-ink: none;diff --git a/src/features/project-tree/ProjectView.tsx b/src/features/project-tree/ProjectView.tsxindex 87b8b8bb3..329ac6c1b 100644--- a/src/features/project-tree/ProjectView.tsx+++ b/src/features/project-tree/ProjectView.tsx@@ -654,6 +654,7 @@ export function ProjectView() {isExpandable={isExpandable}loadChildren={loadChildren}renderNode={renderNode}+ rowClassName={(n) => (n.excluded ? styles.excludedRow : undefined)}expanded={expanded}onExpandedChange={onExpandedChange}selected={selected}diff --git a/src/features/vcs/GitLog.module.css b/src/features/vcs/GitLog.module.cssindex 088c07f34..43cc97951 100644--- a/src/features/vcs/GitLog.module.css+++ b/src/features/vcs/GitLog.module.css@@ -144,7 +144,7 @@top: 0;left: 0;width: 100%;- height: 22px;+ height: 26px;display: flex;align-items: center;gap: 8px;@@ -153,9 +153,10 @@cursor: default;font-size: var(--fs-ui);}-/* View Options › Highlight › Current Branch (before .row:hover / .selected so they win). */-.currentBranch {- background: color-mix(in srgb, var(--accent) 7%, transparent);+/* View Options › Highlight › Current Branch: commits outside HEAD are dimmed. */+.offBranch .subject,+.offBranch .muted {+ color: var(--fg-subtle);}.row:hover {background: var(--bg-tree-hover);@@ -232,6 +233,7 @@margin-left: 0;}.ref {+ --tag-glyph: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M1.5 1.5h4.2l4.8 4.8-4.2 4.2-4.8-4.8z' fill='none' stroke='black' stroke-width='1.1' stroke-linejoin='round'/%3E%3Ccircle cx='4' cy='4' r='.9'/%3E%3C/svg%3E");display: inline-flex;align-items: center;gap: 4px;@@ -242,14 +244,15 @@text-overflow: ellipsis;max-width: 180px;}-/* IDEA's branch label: a small flag in the ref's colour. */+/* Outlined tag glyph in the ref's colour. */.ref::before {content: "";flex: none;- width: 7px;- height: 10px;+ width: 11px;+ height: 11px;background: var(--ref-color);- clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 72%, 0 100%);+ -webkit-mask: var(--tag-glyph) center / contain no-repeat;+ mask: var(--tag-glyph) center / contain no-repeat;}.refHead {--ref-color: var(--warning);diff --git a/src/features/vcs/GitLog.tsx b/src/features/vcs/GitLog.tsxindex 3844cef72..79fb170dd 100644--- a/src/features/vcs/GitLog.tsx+++ b/src/features/vcs/GitLog.tsx@@ -92,8 +92,8 @@ import { gitTabs, shownTab } from "./gitTabs";import { ChangesTree, StashContent, tabItems, useStashTabCounts } from "./CommitView";import { WorktreesPanel } from "./gitMenuDialogs";-const ROW = 22;-const LANE = 12;+const ROW = 26;+const LANE = 14;/** The Git window's tabs (they depend on the commit interface) and the one shown. */function useGitTabs() {@@ -1021,7 +1021,7 @@ function CommitList() {selected={selectedSet.has(commitKey(c))}head={headKeys.has(commitKey(c))}mine={opts.highlightMine && isMine(c, user)}- onBranch={!!onBranch?.has(commitKey(c))}+ onBranch={!onBranch || onBranch.has(commitKey(c))}opts={opts}remoteNames={new Set((c as RepoCommit).remoteNames ?? remoteNames)}onPick={pick}@@ -1075,7 +1075,7 @@ const CommitRow = memo(function CommitRow({id={id}role="option"aria-selected={selected}- className={clsx(styles.row, onBranch && styles.currentBranch, selected && styles.selected)}+ className={clsx(styles.row, !onBranch && styles.offBranch, selected && styles.selected)}style={{ top }}onMouseDown={(e) => {if (e.shiftKey) e.preventDefault(); // no text selection on range clicks@@ -1149,7 +1149,7 @@ export function GraphCell({ row, head }: { row: GraphRow; head?: boolean }) {<circlecx={x(row.lane)}cy={cy}- r={head ? 4 : 3.2}+ r={head ? 4.5 : 3.8}fill={head ? "var(--bg-app)" : laneColor(row.color)}stroke={laneColor(row.color)}strokeWidth={head ? 2 : 0}diff --git a/src/ui/Tree.tsx b/src/ui/Tree.tsxindex 0f0e1304b..cf6a9ef49 100644--- a/src/ui/Tree.tsx+++ b/src/ui/Tree.tsx@@ -103,6 +103,7 @@ export interface TreeProps<T> {rowHeight?: number;indent?: number;className?: string;+ rowClassName?: (node: T) => string | undefined;"aria-label"?: string;handleRef?: Ref<TreeHandle>;empty?: ReactNode;@@ -145,6 +146,7 @@ export function Tree<T>(props: TreeProps<T>) {rowHeight = 24,indent = 20,className,+ rowClassName,handleRef,empty,} = props;@@ -537,7 +539,12 @@ export function Tree<T>(props: TreeProps<T>) {aria-setsize={positions[v.index]![1]}aria-expanded={row.expandable ? row.expanded : undefined}aria-selected={isSelected}- className={clsx(styles.row, isSelected && styles.selected, isLead && styles.lead)}+ className={clsx(+ styles.row,+ rowClassName?.(row.node),+ isSelected && styles.selected,+ isLead && styles.lead,+ )}style={style}onMouseDown={(e) => onRowMouseDown(e, v.index)}onDoubleClick={(e) => activate(row, e)}diff --git a/src/ui/openidea/vcs/favorite.svg b/src/ui/openidea/vcs/favorite.svgindex 03221cf01..84f0a6839 100644--- a/src/ui/openidea/vcs/favorite.svg+++ b/src/ui/openidea/vcs/favorite.svg@@ -1,3 +1,3 @@<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">-<path d="M8 1.75L9.93 5.66L14.25 6.29L11.12 9.33L11.86 13.63L8 11.6L4.14 13.63L4.88 9.33L1.75 6.29L6.07 5.66L8 1.75Z" fill="#FFAF0F" stroke="#E08855" stroke-linejoin="round"/>+<path d="M8 2.6L9.5 6L13.2 6.4L10.4 8.9L11.2 12.5L8 10.6L4.8 12.5L5.6 8.9L2.8 6.4L6.5 6z" fill="#FFAF0F" stroke="#FFAF0F" stroke-width="2.2" stroke-linejoin="round"/></svg>diff --git a/src/ui/openidea/vcs/favorite_dark.svg b/src/ui/openidea/vcs/favorite_dark.svgindex 2ff1e632e..f1a3c9d4d 100644--- a/src/ui/openidea/vcs/favorite_dark.svg+++ b/src/ui/openidea/vcs/favorite_dark.svg@@ -1,3 +1,3 @@<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">-<path d="M8 1.75L9.93 5.66L14.25 6.29L11.12 9.33L11.86 13.63L8 11.6L4.14 13.63L4.88 9.33L1.75 6.29L6.07 5.66L8 1.75Z" fill="#F2C55C" stroke="#D6AE58" stroke-linejoin="round"/>+<path d="M8 2.6L9.5 6L13.2 6.4L10.4 8.9L11.2 12.5L8 10.6L4.8 12.5L5.6 8.9L2.8 6.4L6.5 6z" fill="#F2C55C" stroke="#F2C55C" stroke-width="2.2" stroke-linejoin="round"/></svg>diff --git a/src/ui/openidea/vcs/notFavorite.svg b/src/ui/openidea/vcs/notFavorite.svgindex 2d0824078..da2395a6d 100644--- a/src/ui/openidea/vcs/notFavorite.svg+++ b/src/ui/openidea/vcs/notFavorite.svg@@ -1,3 +1,3 @@<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">-<path d="M8 1.75L9.93 5.66L14.25 6.29L11.12 9.33L11.86 13.63L8 11.6L4.14 13.63L4.88 9.33L1.75 6.29L6.07 5.66L8 1.75Z" stroke="#6C707E" stroke-linejoin="round"/>+<path d="M8 2.6L9.5 6L13.2 6.4L10.4 8.9L11.2 12.5L8 10.6L4.8 12.5L5.6 8.9L2.8 6.4L6.5 6z" stroke="#6C707E" stroke-width="1.2" stroke-linejoin="round"/></svg>diff --git a/src/ui/openidea/vcs/notFavorite_dark.svg b/src/ui/openidea/vcs/notFavorite_dark.svgindex 198a9ba6d..8eaca0f4d 100644--- a/src/ui/openidea/vcs/notFavorite_dark.svg+++ b/src/ui/openidea/vcs/notFavorite_dark.svg@@ -1,3 +1,3 @@<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">-<path d="M8 1.75L9.93 5.66L14.25 6.29L11.12 9.33L11.86 13.63L8 11.6L4.14 13.63L4.88 9.33L1.75 6.29L6.07 5.66L8 1.75Z" stroke="#CED0D6" stroke-linejoin="round"/>+<path d="M8 2.6L9.5 6L13.2 6.4L10.4 8.9L11.2 12.5L8 10.6L4.8 12.5L5.6 8.9L2.8 6.4L6.5 6z" stroke="#CED0D6" stroke-width="1.2" stroke-linejoin="round"/></svg>