Skip to content

armgit / macro

Public Imported from GitHub
0

Macro is a unified workspace for teams: email, chat, docs, tasks, agents, calls, and CRM — @-linked together with shared AI memory.

Reorganize sidebar navigation: rename Documents to Files, move Folders to tab (#3857)

Jacob Beckerman7803f2f3046f
diff --git a/js/app/packages/app/component/app-sidebar/sidebar.tsx b/js/app/packages/app/component/app-sidebar/sidebar.tsx
index 75aa4e6fcb..4de83297a0 100644
--- a/js/app/packages/app/component/app-sidebar/sidebar.tsx
+++ b/js/app/packages/app/component/app-sidebar/sidebar.tsx
@@ -61,7 +61,6 @@ import { AnimatedCallIcon } from '@icon/wide-call';
import { AnimatedChannelIcon } from '@icon/wide-channel';
import { AnimatedEmailIcon } from '@icon/wide-email';
import { AnimatedFileMdIcon } from '@icon/wide-fileMd';
-import { AnimatedFolderIcon } from '@icon/wide-folder';
import { AnimatedInboxIcon } from '@icon/wide-inbox';
import { AnimatedNewSplitIcon } from '@icon/wide-newSplit';
import { AnimatedPlusIcon } from '@icon/wide-plus';
@@ -144,10 +143,10 @@ const SIDEBAR_LINKS = [
},
{
id: 'documents',
- label: 'Documents',
+ label: 'Files',
href: LIST_VIEW_PATHS.documents,
icon: AnimatedFileMdIcon,
- hotkey: 'd',
+ hotkey: 'f',
hotkeyToken: TOKENS.sidebar.goTo.documents,
},
{
@@ -166,14 +165,6 @@ const SIDEBAR_LINKS = [
hotkey: 'c',
hotkeyToken: TOKENS.sidebar.goTo.channels,
},
- {
- id: 'folders',
- label: 'Folders',
- href: LIST_VIEW_PATHS.folders,
- icon: AnimatedFolderIcon,
- hotkey: 'f',
- hotkeyToken: TOKENS.sidebar.goTo.folders,
- },
] satisfies SidebarItem[];
export type SidebarState = 'hidden' | 'expanded' | 'slim';
diff --git a/js/app/packages/app/component/app-sidebar/soup-filter-presets.ts b/js/app/packages/app/component/app-sidebar/soup-filter-presets.ts
index 61da0acd3f..3e649f5ca3 100644
--- a/js/app/packages/app/component/app-sidebar/soup-filter-presets.ts
+++ b/js/app/packages/app/component/app-sidebar/soup-filter-presets.ts
@@ -242,6 +242,12 @@ export const VIEW_TAB_PRESETS: Record<ListView, ViewTabConfig> = {
}),
clientFilters: { and: ['document-or-file'] },
}),
+ folders: () => ({
+ filters: defineQueryFilters({
+ exclude: { folderId: [NIL_UUID] },
+ }),
+ clientFilters: { and: ['folders'] },
+ }),
all: () => ({
filters: defineQueryFilters({
exclude: { subType: ['task'] },
diff --git a/js/app/packages/app/component/next-soup/soup-view/soup-view-tabs.tsx b/js/app/packages/app/component/next-soup/soup-view/soup-view-tabs.tsx
index 5f1b70f051..291cfc842e 100644
--- a/js/app/packages/app/component/next-soup/soup-view/soup-view-tabs.tsx
+++ b/js/app/packages/app/component/next-soup/soup-view/soup-view-tabs.tsx
@@ -60,6 +60,7 @@ export const VIEW_TAB_LISTS: Record<TabbedListView, TabItem[]> = {
{ value: 'owned', label: 'Owned' },
{ value: 'shared', label: 'Shared' },
{ value: 'attachments', label: 'Attachments' },
+ { value: 'folders', label: 'Folders' },
{ value: 'all', label: 'All' },
],
tasks: [
diff --git a/js/app/packages/app/component/split-layout/componentRegistry.tsx b/js/app/packages/app/component/split-layout/componentRegistry.tsx
index 0099d8acb2..fd776713de 100644
--- a/js/app/packages/app/component/split-layout/componentRegistry.tsx
+++ b/js/app/packages/app/component/split-layout/componentRegistry.tsx
@@ -176,7 +176,7 @@ registerComponent(
});
return (
<SoupView
- viewName="Documents"
+ viewName="Files"
initialFilters={preset?.filters}
initialClientFilters={preset?.clientFilters}
initialGroupBy={preset?.groupBy}