Skip to content

Commit fc65393

Browse files
committed
refactor(repo): streamline RepoList layout and spacing
- Reduce gap spacing from 3-4 to 2 for more compact list layout - Simplify padding from 4-5 to 2.5 and use px/py utilities for consistency - Decrease icon size from 10x10 to 8x8 and adjust border radius to md - Consolidate repo name and archived badge into single row layout - Move description to hidden state on mobile, show truncated on md+ screens - Remove separate metadata row displaying repo name in monospace font - Eliminate top border separator on mobile for action buttons - Reduce font sizes (base to sm for title, add xs for description) - Improve responsive behavior by removing unnecessary flex-col nesting
1 parent b055ccf commit fc65393

1 file changed

Lines changed: 25 additions & 30 deletions

File tree

apps/frontend/src/pages/repo/components/RepoList.tsx

Lines changed: 25 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -155,58 +155,53 @@ export const RepoList: React.FC<RepoListProps> = ({repos, selectedRepo}) => {
155155
}
156156

157157
return (
158-
<div className="grid grid-cols-1 gap-3 sm:gap-4">
158+
<div className="grid grid-cols-1 gap-2">
159159
{repos.map((repo) => {
160160
const isActive = isRepoActive(repo.name);
161161
return (
162162
<div
163163
key={repo.name}
164-
className={`group relative flex flex-col sm:flex-row sm:items-center justify-between gap-4 p-4 sm:p-5 rounded-xl border transition-all duration-200 ${
164+
className={`group relative flex flex-col sm:flex-row sm:items-center justify-between gap-2 px-4 py-2.5 rounded-lg border transition-all duration-200 ${
165165
isActive
166166
? "bg-app-hover border-app-accent/30"
167167
: "bg-app-surface/40 border-app-border hover:bg-app-surface/60 hover:border-app-border hover:shadow-sm"
168168
}`}
169169
>
170170
{/* Left: Icon + Repo Name */}
171-
<div className="flex items-start gap-4 flex-1 min-w-0">
172-
<div className="w-10 h-10 rounded-lg bg-app-border/50 flex items-center justify-center shrink-0 border border-app-border/30 group-hover:border-app-border/50 transition-colors">
173-
<FolderOpenIcon className="w-5 h-5 text-text-secondary group-hover:text-text-primary transition-colors" />
171+
<div className="flex items-center gap-3 flex-1 min-w-0">
172+
<div className="w-8 h-8 rounded-md bg-app-border/50 flex items-center justify-center shrink-0 border border-app-border/30 group-hover:border-app-border/50 transition-colors">
173+
<FolderOpenIcon className="w-4 h-4 text-text-secondary group-hover:text-text-primary transition-colors" />
174174
</div>
175175

176-
<div className="flex flex-col gap-1 min-w-0">
177-
<div className="flex items-center gap-2">
178-
<Link
179-
to={getRepoUrl(repo.name)}
180-
className="font-semibold text-base text-text-primary truncate hover:text-app-accent hover:underline transition-colors"
176+
<div className="flex items-center gap-2 min-w-0 flex-1">
177+
<Link
178+
to={getRepoUrl(repo.name)}
179+
className="font-semibold text-sm text-text-primary truncate hover:text-app-accent hover:underline transition-colors"
180+
>
181+
{displayName(repo.title || repo.name)}
182+
</Link>
183+
{repo.archived && (
184+
<Badge
185+
variant="neutral"
186+
size="sm"
187+
className="text-[10px] py-0 h-5 bg-app-border border-app-border"
181188
>
182-
{displayName(repo.title || repo.name)}
183-
</Link>
184-
{repo.archived && (
185-
<Badge
186-
variant="neutral"
187-
size="sm"
188-
className="text-[10px] py-0 h-5 bg-app-border border-app-border"
189-
>
190-
Archived
191-
</Badge>
192-
)}
193-
</div>
194-
<div className="flex items-center gap-2 text-xs text-text-tertiary">
195-
<span className="font-mono opacity-70">{repo.name}</span>
196-
</div>
189+
Archived
190+
</Badge>
191+
)}
197192
{repo.description && (
198-
<p
199-
className="text-sm text-text-secondary line-clamp-2 mt-1"
193+
<span
194+
className="hidden md:inline text-xs text-text-tertiary truncate max-w-[40ch]"
200195
title={repo.description}
201196
>
202-
{truncateDescription(repo.description)}
203-
</p>
197+
{repo.description}
198+
</span>
204199
)}
205200
</div>
206201
</div>
207202

208203
{/* Right: Action Buttons */}
209-
<div className="flex items-center gap-2 flex-shrink-0 pt-2 sm:pt-0 border-t sm:border-t-0 border-app-border/50 sm:pl-4">
204+
<div className="flex items-center gap-2 flex-shrink-0 sm:pl-4">
210205
<CloneDropdown
211206
sshUrl={repo.sshAddress}
212207
httpUrl={repo.httpAddress}

0 commit comments

Comments
 (0)