From f42e74e7c5dcbeb630ac794f1e4886945cfbc43a Mon Sep 17 00:00:00 2001 From: Jaanus Sellin Date: Tue, 2 Jul 2024 13:59:18 +0300 Subject: [PATCH] chore: rename command bar files (#7516) Now we have nice logical naming ![image](https://github.com/Unleash/unleash/assets/964450/c24041bc-db94-463e-aa9c-d7ecd484ab12) --- frontend/src/component/commandBar/CommandBar.tsx | 12 ++++++------ ...CommandRecent.tsx => CommandQuickSuggestions.tsx} | 2 +- ...CommandFeatures.tsx => CommandSearchFeatures.tsx} | 2 +- .../{CommandPages.tsx => CommandSearchPages.tsx} | 2 +- 4 files changed, 9 insertions(+), 9 deletions(-) rename frontend/src/component/commandBar/{CommandRecent.tsx => CommandQuickSuggestions.tsx} (97%) rename frontend/src/component/commandBar/{CommandFeatures.tsx => CommandSearchFeatures.tsx} (96%) rename frontend/src/component/commandBar/{CommandPages.tsx => CommandSearchPages.tsx} (98%) diff --git a/frontend/src/component/commandBar/CommandBar.tsx b/frontend/src/component/commandBar/CommandBar.tsx index fc7ebbcfd7..0cc90f224b 100644 --- a/frontend/src/component/commandBar/CommandBar.tsx +++ b/frontend/src/component/commandBar/CommandBar.tsx @@ -21,10 +21,10 @@ import { CommandPageSuggestions } from './CommandPageSuggestions'; import { useRoutes } from 'component/layout/MainLayout/NavigationSidebar/useRoutes'; import { useAsyncDebounce } from 'react-table'; import useProjects from 'hooks/api/getters/useProjects/useProjects'; -import { CommandFeatures } from './CommandFeatures'; +import { CommandSearchFeatures } from './CommandSearchFeatures'; import { usePlausibleTracker } from 'hooks/usePlausibleTracker'; -import { CommandRecent } from './CommandRecent'; -import { CommandPages } from './CommandPages'; +import { CommandQuickSuggestions } from './CommandQuickSuggestions'; +import { CommandSearchPages } from './CommandSearchPages'; import { CommandBarFeedback } from './CommandBarFeedback'; import { RecentlyVisitedRecorder } from './RecentlyVisitedRecorder'; @@ -264,7 +264,7 @@ export const CommandBar = () => { show={ {searchString !== undefined && ( - { onClick={clearSearchValue} items={searchedProjects} /> - @@ -293,7 +293,7 @@ export const CommandBar = () => { elseShow={ showSuggestions && ( - diff --git a/frontend/src/component/commandBar/CommandRecent.tsx b/frontend/src/component/commandBar/CommandQuickSuggestions.tsx similarity index 97% rename from frontend/src/component/commandBar/CommandRecent.tsx rename to frontend/src/component/commandBar/CommandQuickSuggestions.tsx index 7961407a6c..ad4e9ea54d 100644 --- a/frontend/src/component/commandBar/CommandRecent.tsx +++ b/frontend/src/component/commandBar/CommandQuickSuggestions.tsx @@ -39,7 +39,7 @@ const toListItemButton = ( ); }; -export const CommandRecent = ({ +export const CommandQuickSuggestions = ({ routes, onClick, }: { diff --git a/frontend/src/component/commandBar/CommandFeatures.tsx b/frontend/src/component/commandBar/CommandSearchFeatures.tsx similarity index 96% rename from frontend/src/component/commandBar/CommandFeatures.tsx rename to frontend/src/component/commandBar/CommandSearchFeatures.tsx index 34b51f757b..035e8a7820 100644 --- a/frontend/src/component/commandBar/CommandFeatures.tsx +++ b/frontend/src/component/commandBar/CommandSearchFeatures.tsx @@ -10,7 +10,7 @@ interface ICommandBar { setSearchedFlagCount: (count: number) => void; onClick: () => void; } -export const CommandFeatures = ({ +export const CommandSearchFeatures = ({ searchString, setSearchedFlagCount, onClick, diff --git a/frontend/src/component/commandBar/CommandPages.tsx b/frontend/src/component/commandBar/CommandSearchPages.tsx similarity index 98% rename from frontend/src/component/commandBar/CommandPages.tsx rename to frontend/src/component/commandBar/CommandSearchPages.tsx index d1e191b7bf..a11bbaa257 100644 --- a/frontend/src/component/commandBar/CommandPages.tsx +++ b/frontend/src/component/commandBar/CommandSearchPages.tsx @@ -11,7 +11,7 @@ import { import { ListItemButton } from '@mui/material'; import { IconRenderer } from 'component/layout/MainLayout/NavigationSidebar/IconRenderer'; -export const CommandPages = ({ +export const CommandSearchPages = ({ items, onClick, }: {