Skip to content

Commit a7e48e0

Browse files
committed
fix: remove gap above sticky header on mobile
1 parent 58d6550 commit a7e48e0

File tree

2 files changed

+18
-6
lines changed

2 files changed

+18
-6
lines changed

frontend/src/app/dashboard/browse/page.tsx

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -256,19 +256,20 @@ function BrowsePageContent() {
256256
)}
257257

258258
<div className="relative">
259-
<div className="sticky top-[-26px] z-10 flex items-center justify-between gap-4 py-4 bg-background">
260-
<div className="flex items-center gap-2">
261-
<h2 className="text-2xl font-normal text-foreground">{currentFolderName}</h2>
259+
<div className="sticky top-[-12px] sm:top-[-26px] z-20 flex items-start sm:items-center justify-between gap-3 sm:gap-4 py-3 sm:py-4 px-1 sm:px-0 bg-background border-b border-border/30 sm:border-b-0">
260+
<div className="flex flex-col sm:flex-row sm:items-center gap-2 sm:gap-2 min-w-0 flex-1">
261+
<h2 className="text-lg sm:text-xl lg:text-2xl font-normal text-foreground break-words leading-tight sm:leading-normal">
262+
{currentFolderName}
263+
</h2>
262264
{totalVisibleItems > 0 && (
263-
<span className="item-count-badge">
265+
<span className="item-count-badge flex-shrink-0 self-start sm:self-auto">
264266
{hasMoreItems || canLoadMoreChunks
265267
? `Showing ${totalVisibleItems.toLocaleString()}+ items`
266268
: `${totalVisibleItems.toLocaleString()} item${totalVisibleItems === 1 ? '' : 's'}`}
267269
</span>
268270
)}
269271
</div>
270272

271-
{/* Sync/Refresh Button */}
272273
<button
273274
onClick={handleSync}
274275
disabled={isSyncing}

frontend/src/app/globals.css

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -285,9 +285,20 @@ body {
285285
font-weight: 500;
286286
padding: 0.25rem 0.75rem;
287287
border-radius: 0.5rem;
288-
margin-left: 0.75rem;
289288
backdrop-filter: blur(4px);
290289
transition: all 0.2s ease-in-out;
290+
white-space: nowrap;
291+
overflow: hidden;
292+
text-overflow: ellipsis;
293+
max-width: 200px;
294+
}
295+
296+
@media (max-width: 640px) {
297+
.item-count-badge {
298+
font-size: 0.625rem;
299+
padding: 0.125rem 0.5rem;
300+
max-width: 150px;
301+
}
291302
}
292303

293304
.show-more-btn {

0 commit comments

Comments
 (0)