From 1b26ba6d8039008716580dc5fb6f9e1a049ccc22 Mon Sep 17 00:00:00 2001 From: Aleix Soler Date: Fri, 21 Nov 2025 08:04:30 +0100 Subject: [PATCH 1/8] feat: add lucid icons support --- components/FileExplorer/FileExplorerIcon.tsx | 1 + .../GroupedStatusView/GroupedStatusView.tsx | 2 + .../components/StatusGroup.tsx | 6 +- components/SettingsUI/CustomStatusItem.tsx | 50 +++++-- .../SettingsUI/CustomStatusSettings.tsx | 3 +- components/SettingsUI/LucideIconPicker.tsx | 133 ++++++++++++++++++ components/SettingsUI/StatusGroup.tsx | 10 +- components/SettingsUI/TemplateEditorModal.tsx | 6 +- components/SettingsUI/UISettings.tsx | 2 +- components/StatusBar/StatusBar.tsx | 10 +- components/Toolbar/EditorToolbarButton.tsx | 27 ++-- components/atoms/StatusDisplay.tsx | 27 +++- components/atoms/StatusIcon.tsx | 52 +++++++ components/atoms/StatusIconPreview.tsx | 13 +- components/atoms/StatusSelector.tsx | 3 +- integrations/views/grouped-dashboard-view.tsx | 2 + integrations/views/grouped-status-view.tsx | 1 + styles/components/file-explorer.css | 3 + styles/components/settings.css | 114 ++++++++++++++- styles/components/status-icon.css | 6 + styles/components/toolbar-button.css | 3 + styles/index.css | 1 + types/noteStatus.ts | 1 + utils/iconUtils.ts | 51 +++++++ 24 files changed, 477 insertions(+), 50 deletions(-) create mode 100644 components/SettingsUI/LucideIconPicker.tsx create mode 100644 components/atoms/StatusIcon.tsx create mode 100644 styles/components/status-icon.css create mode 100644 utils/iconUtils.ts diff --git a/components/FileExplorer/FileExplorerIcon.tsx b/components/FileExplorer/FileExplorerIcon.tsx index 92d6cf8..01642df 100644 --- a/components/FileExplorer/FileExplorerIcon.tsx +++ b/components/FileExplorer/FileExplorerIcon.tsx @@ -65,6 +65,7 @@ export const FileExplorerIcon: FC = memo( return ( { name: noteStatus.name, color: noteStatus.color || "white", icon: noteStatus.icon, + lucideIcon: noteStatus.lucideIcon, }; const scopedIdentifier = noteStatus.templateId diff --git a/components/GroupedStatusView/components/StatusGroup.tsx b/components/GroupedStatusView/components/StatusGroup.tsx index 8a34f9c..e7cc35c 100644 --- a/components/GroupedStatusView/components/StatusGroup.tsx +++ b/components/GroupedStatusView/components/StatusGroup.tsx @@ -54,7 +54,11 @@ export const StatusGroup = ({
diff --git a/components/SettingsUI/CustomStatusItem.tsx b/components/SettingsUI/CustomStatusItem.tsx index 8df4afd..511ac51 100644 --- a/components/SettingsUI/CustomStatusItem.tsx +++ b/components/SettingsUI/CustomStatusItem.tsx @@ -1,13 +1,15 @@ import { NoteStatus } from "@/types/noteStatus"; import React from "react"; import { Input } from "@/components/atoms/Input"; +import { StatusIcon } from "@/components/atoms/StatusIcon"; +import { LucideIconPicker } from "./LucideIconPicker"; export type Props = { status: NoteStatus; index: number; onCustomStatusChange: ( index: number, - column: "name" | "icon" | "color" | "description", + column: "name" | "icon" | "color" | "description" | "lucideIcon", value: string, ) => void; onCustomStatusRemove: (index: number) => void; @@ -28,26 +30,47 @@ export const CustomStatusItem: React.FC = ({ canMoveDown = false, }) => { const isValid = status.name.trim().length > 0; - const displayIcon = status.icon.trim() || "πŸ“"; - return (
- {/* Simple horizontal layout with all inputs in a row */} -
- {/* Icon field - simple text input */} -
- +
+
+ onCustomStatusChange(index, "icon", value || "") } - placeholder="πŸ“" + placeholder="Example: βœ… or 🚧" className="custom-status-item__input custom-status-item__input--icon" /> +

+ This fallback icon is shown anywhere Lucide is not + available. +

+
+ + + onCustomStatusChange(index, "lucideIcon", value) + } + /> +

+ Matches Obsidian's toolbar icons so your status + button blends in. +

+
+
+ + {/* Simple horizontal layout with remaining inputs */} +
{/* Name field */}