Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 14 additions & 3 deletions frontend/src/components/dependency-graph/minimap-content.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import { extractCellPreview } from "./utils/cell-preview";

interface MinimapCellProps {
cellId: CellId;
index: number;
cellPositions: Readonly<Record<CellId, number>>;
}

Expand Down Expand Up @@ -67,7 +68,7 @@ const MinimapCell: React.FC<MinimapCellProps> = (props) => {
className={cn(
"group bg-transparent text-left w-full flex relative justify-between items-center",
"border-none rounded cursor-pointer",
"h-[21px] pl-[51px] font-inherit",
"h-[21px] pl-[59px] font-inherit",
isSelected
? "text-primary-foreground"
: "text-(--gray-8) hover:text-(--gray-9)",
Expand All @@ -78,6 +79,12 @@ const MinimapCell: React.FC<MinimapCellProps> = (props) => {
// transitions from current cell -> null -> new cell.
onMouseDown={(e) => e.preventDefault()}
>
<span
className="absolute left-0 top-0 h-full w-5 flex items-center justify-end pr-1.5 text-[10px] tabular-nums pointer-events-none select-none text-(--gray-9)"
aria-hidden="true"
>
{props.index}
Comment thread
mscolnick marked this conversation as resolved.
</span>
<div
className={cn(
"group-hover:bg-(--gray-2) flex h-full w-full px-0.5 items-center rounded",
Expand All @@ -99,7 +106,7 @@ const MinimapCell: React.FC<MinimapCellProps> = (props) => {
</div>
<svg
className={cn(
"absolute overflow-visible top-[10.5px] left-[calc(var(--spacing-extra-small,8px)+17px)] pointer-events-none",
"absolute overflow-visible top-[10.5px] left-[calc(var(--spacing-extra-small,8px)+25px)] pointer-events-none",
isSelected ? "z-[1]" : "z-0",
getTextColor({ cell, selectedCell }),
)}
Expand Down Expand Up @@ -404,7 +411,11 @@ export const MinimapContent: React.FC = () => {
aria-hidden="true"
/>
)}
<MinimapCell cellId={cellId} cellPositions={cellPositions} />
<MinimapCell
cellId={cellId}
index={idx}
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nope

cellPositions={cellPositions}
/>
</React.Fragment>
);
})}
Expand Down
Loading