fix(tag-filter): update no tags message and improve layout

- Changed the message displayed when no tags are found to "No tags created yet." for better clarity.
- Added a consistent layout for the tag handling component in both TagFilter and TagSelector, ensuring a unified user experience.
This commit is contained in:
Mauricio Siu
2026-07-06 03:32:26 -06:00
parent 8db1250487
commit 8c900408bd
2 changed files with 12 additions and 12 deletions
@@ -94,9 +94,10 @@ export function TagFilter({
<CommandEmpty> <CommandEmpty>
<div className="flex flex-col items-center gap-2 py-1"> <div className="flex flex-col items-center gap-2 py-1">
<span className="text-sm text-muted-foreground"> <span className="text-sm text-muted-foreground">
No tags found. {tags.length === 0
? "No tags created yet."
: "No tags found."}
</span> </span>
<HandleTag />
</div> </div>
</CommandEmpty> </CommandEmpty>
<CommandGroup> <CommandGroup>
@@ -118,6 +119,9 @@ export function TagFilter({
); );
})} })}
</CommandGroup> </CommandGroup>
<div className="flex items-center justify-center p-2 border-t">
<HandleTag />
</div>
</CommandList> </CommandList>
</Command> </Command>
</PopoverContent> </PopoverContent>
@@ -111,19 +111,12 @@ export function TagSelector({
<CommandEmpty> <CommandEmpty>
<div className="flex flex-col items-center gap-2 py-1"> <div className="flex flex-col items-center gap-2 py-1">
<span className="text-sm text-muted-foreground"> <span className="text-sm text-muted-foreground">
No tags found. {tags.length === 0
? "No tags created yet."
: "No tags found."}
</span> </span>
<HandleTag />
</div> </div>
</CommandEmpty> </CommandEmpty>
{tags.length === 0 && (
<div className="flex flex-col items-center gap-2 py-4">
<span className="text-sm text-muted-foreground">
No tags created yet.
</span>
<HandleTag />
</div>
)}
<CommandGroup> <CommandGroup>
{tags.map((tag) => { {tags.map((tag) => {
const isSelected = selectedTags.includes(tag.id); const isSelected = selectedTags.includes(tag.id);
@@ -153,6 +146,9 @@ export function TagSelector({
); );
})} })}
</CommandGroup> </CommandGroup>
<div className="flex items-center justify-center p-2 border-t">
<HandleTag />
</div>
</CommandList> </CommandList>
</Command> </Command>
</PopoverContent> </PopoverContent>