Skip to content

Commit dfd84c0

Browse files
committed
fix: typography and avatar polish from copilot review
- Use a proper ellipsis character in the search placeholder - Give maintainer avatars explicit width/height and lazy loading to prevent layout shift for non-critical images
1 parent 1bb8b9e commit dfd84c0

2 files changed

Lines changed: 8 additions & 2 deletions

File tree

‎apps/web/app/components/cnpm/MaintainersCard.tsx‎

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,13 @@ function MaintainerRow({ maintainer }: { maintainer: Maintainer }) {
2626
return (
2727
<div className="flex items-center gap-2.5">
2828
<Avatar className="size-8">
29-
<AvatarImage src={gravatarUrl(hash)} alt={maintainer.name} />
29+
<AvatarImage
30+
src={gravatarUrl(hash)}
31+
alt={maintainer.name}
32+
width={32}
33+
height={32}
34+
loading="lazy"
35+
/>
3036
<AvatarFallback>{initials(maintainer.name)}</AvatarFallback>
3137
</Avatar>
3238
<div className="min-w-0">

‎apps/web/app/components/cnpm/NpmSearchForm.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ export function NpmSearchForm({
4949
value={value}
5050
autoFocus={autoFocus}
5151
onChange={(event) => setValue(event.target.value)}
52-
placeholder="搜索 npm 包,如 react、@babel/core..."
52+
placeholder="搜索 npm 包,如 react、@babel/core…"
5353
aria-label="搜索 npm 包"
5454
className={cn("h-full", large && "text-base")}
5555
/>

0 commit comments

Comments
 (0)