Improve how shared folders appear in the navigation sidebar

Hide the "Shared with me" header in certain views and add tooltips to indicate folder owners.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 77cfe984-2c65-4152-bb7a-0df28274fe66
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Event-Id: 26650ab1-4e19-4da3-8ed7-e3535055e62a
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/c3c252e4-c83d-40ca-9fff-99a3ea60701e/77cfe984-2c65-4152-bb7a-0df28274fe66/R0O2qN7
Replit-Helium-Checkpoint-Created: true
This commit is contained in:
riyadhafraa
2026-05-10 09:54:00 +00:00
parent 5868507bcc
commit 0e384b6898
@@ -537,9 +537,11 @@ export function FoldersRail({
className="contents md:block md:pt-3"
data-testid="shared-with-me-section"
>
<div className="hidden md:block text-[11px] font-semibold uppercase tracking-wider text-muted-foreground px-2 mb-1 mt-3">
{t("notes.folders.sharedWithMe", "Shared with me")}
</div>
{mode === "rail" && (
<div className="hidden md:block text-[11px] font-semibold uppercase tracking-wider text-muted-foreground px-2 mb-1 mt-3">
{t("notes.folders.sharedWithMe", "Shared with me")}
</div>
)}
{sharedFolders.map((sf: SharedFolder) => {
const isSel =
selected.kind === "shared-folder" && selected.id === sf.id;
@@ -567,6 +569,9 @@ export function FoldersRail({
onClick={() => onSelect({ kind: "shared-folder", id: sf.id })}
className="w-full flex items-center gap-2 px-2.5 py-1.5 text-sm text-start whitespace-nowrap"
data-testid={`shared-folder-select-${sf.id}`}
title={t("notes.folders.sharedByName", "by {{name}}", {
name: ownerName,
})}
>
<span className="shrink-0">
<Share2 size={14} />