From 77442bec677f98cc2bf12d0bdee20ccacb1f2df9 Mon Sep 17 00:00:00 2001 From: Aleix Soler Date: Wed, 16 Jul 2025 17:52:30 +0200 Subject: [PATCH] refactor: rename groupped to grouped --- .../GroupedStatusView.tsx} | 16 +-- .../components/FileList.tsx | 16 +-- .../components/FilterSection.tsx | 10 +- .../components/StatusGroup.tsx | 11 +-- .../components/TagSection.tsx | 8 +- .../StatusDashboard/StatusDashboard.tsx | 2 +- ...rd-view.tsx => grouped-dashboard-view.tsx} | 18 ++-- ...tatus-view.tsx => grouped-status-view.tsx} | 18 ++-- main.tsx | 6 +- ...tatus-view.css => grouped-status-view.css} | 98 +++++++++---------- styles/index.css | 2 +- 11 files changed, 101 insertions(+), 104 deletions(-) rename components/{GrouppedStatusView/GrouppedStatusView.tsx => GroupedStatusView/GroupedStatusView.tsx} (95%) rename components/{GrouppedStatusView => GroupedStatusView}/components/FileList.tsx (76%) rename components/{GrouppedStatusView => GroupedStatusView}/components/FilterSection.tsx (74%) rename components/{GrouppedStatusView => GroupedStatusView}/components/StatusGroup.tsx (85%) rename components/{GrouppedStatusView => GroupedStatusView}/components/TagSection.tsx (89%) rename integrations/views/{groupped-dashboard-view.tsx => grouped-dashboard-view.tsx} (88%) rename integrations/views/{groupped-status-view.tsx => grouped-status-view.tsx} (89%) rename styles/components/{groupped-status-view.css => grouped-status-view.css} (74%) diff --git a/components/GrouppedStatusView/GrouppedStatusView.tsx b/components/GroupedStatusView/GroupedStatusView.tsx similarity index 95% rename from components/GrouppedStatusView/GrouppedStatusView.tsx rename to components/GroupedStatusView/GroupedStatusView.tsx index ea18300..521836a 100644 --- a/components/GrouppedStatusView/GrouppedStatusView.tsx +++ b/components/GroupedStatusView/GroupedStatusView.tsx @@ -22,7 +22,7 @@ export type GroupedByStatus = { [frontmatterTag: string]: FilesByStatus; }; -export type GrouppedStatusViewProps = { +export type GroupedStatusViewProps = { getAllFiles: () => FileItem[]; processFiles: (files: FileItem[]) => GroupedByStatus; onFileClick: (file: FileItem) => void; @@ -32,13 +32,13 @@ export type GrouppedStatusViewProps = { const ITEMS_PER_LOAD = 20; -export const GrouppedStatusView = ({ +export const GroupedStatusView = ({ getAllFiles, processFiles, onFileClick, subscribeToEvents, getAvailableStatuses, -}: GrouppedStatusViewProps) => { +}: GroupedStatusViewProps) => { const [groupedData, setGroupedData] = useState({}); const [searchFilter, setSearchFilter] = useState(""); const [noteNameFilter, setNoteNameFilter] = useState(""); @@ -206,8 +206,8 @@ export const GrouppedStatusView = ({ if (isLoading) { return ( -
-
+
+
Loading statuses...
@@ -215,7 +215,7 @@ export const GrouppedStatusView = ({ } return ( -
+
-
+
{Object.entries(filteredData).map(([tag, statusGroups]) => { const tagKey = `tag-${tag}`; const isTagExpanded = expandedGroups.has(tagKey); @@ -247,7 +247,7 @@ export const GrouppedStatusView = ({ })} {Object.keys(filteredData).length === 0 && ( -
+
{searchFilter ? "No files match your search." : "No statuses found."} diff --git a/components/GrouppedStatusView/components/FileList.tsx b/components/GroupedStatusView/components/FileList.tsx similarity index 76% rename from components/GrouppedStatusView/components/FileList.tsx rename to components/GroupedStatusView/components/FileList.tsx index 3b66dcd..d5c3f41 100644 --- a/components/GrouppedStatusView/components/FileList.tsx +++ b/components/GroupedStatusView/components/FileList.tsx @@ -1,5 +1,5 @@ import React, { useCallback } from "react"; -import { FileItem } from "../GrouppedStatusView"; +import { FileItem } from "../GroupedStatusView"; interface FileListProps { files: FileItem[]; @@ -44,27 +44,27 @@ export const FileList = ({ ); return ( -
-
+
+
{visibleFiles.map((file) => (
handleFileClick(file)} > - + {file.name} - + {file.path}
))} {hasMoreItems && ( -
+