From 11233ba4490b9b0bad9363659d516b21ddb2f17b Mon Sep 17 00:00:00 2001 From: Elio Struyf Date: Tue, 30 Jan 2024 20:12:45 +0100 Subject: [PATCH 1/9] Fix localization string --- src/helpers/ContentType.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/helpers/ContentType.ts b/src/helpers/ContentType.ts index f187fbcc..900e28b0 100644 --- a/src/helpers/ContentType.ts +++ b/src/helpers/ContentType.ts @@ -273,8 +273,8 @@ export class ContentType { const configPath = await Settings.projectConfigPath(); const notificationAction = await Notifications.info( overrideBool - ? l10n.t(LocalizationKey.helpersContentTypeGenerateUpdatedSuccess) - : l10n.t(LocalizationKey.helpersContentTypeGenerateGeneratedSuccess), + ? l10n.t(LocalizationKey.helpersContentTypeGenerateUpdatedSuccess, contentTypeName) + : l10n.t(LocalizationKey.helpersContentTypeGenerateGeneratedSuccess, contentTypeName), configPath && (await existsAsync(configPath)) ? l10n.t(LocalizationKey.commonOpenSettings) : undefined From 273af6d80f5c032024c582312d0aec55f980d9a3 Mon Sep 17 00:00:00 2001 From: Elio Struyf Date: Wed, 31 Jan 2024 18:09:58 +0200 Subject: [PATCH 2/9] Remove of useThemeColors hook --- .../components/Chatbot/Chatbox.tsx | 8 +--- .../components/Common/ChoiceButton.tsx | 14 +------ .../components/Contents/ContentActions.tsx | 8 +--- .../components/Contents/List.tsx | 5 +-- .../components/Contents/Overview.tsx | 5 +-- .../components/DataView/EmptyView.tsx | 6 +-- .../components/DataView/SortableContainer.tsx | 5 +-- .../components/ErrorView/index.tsx | 5 +-- .../components/Header/Breadcrumb.tsx | 21 ++-------- .../components/Header/ClearFilters.tsx | 8 +--- .../components/Header/Pagination.tsx | 10 +---- .../components/Header/PaginationButton.tsx | 10 +---- .../components/Header/PaginationStatus.tsx | 9 +---- .../Header/RefreshDashboardData.tsx | 1 - .../components/Header/SyncButton.tsx | 8 +--- .../components/Header/ViewSwitch.tsx | 8 ++-- .../components/Layout/NavigationBar.tsx | 20 ++-------- .../components/Layout/NavigationItem.tsx | 17 +------- .../components/Layout/SponsorMsg.tsx | 17 +------- .../components/Media/DetailsItem.tsx | 7 +--- .../components/Media/FolderCreation.tsx | 14 +------ .../components/Media/Item.tsx | 32 ++++++--------- .../components/Media/Lightbox.tsx | 8 +--- .../components/Media/Media.tsx | 12 +----- .../components/Media/MediaHeaderBottom.tsx | 8 +--- .../components/Media/MediaHeaderTop.tsx | 8 +--- .../components/Menu/ActionMenuButton.tsx | 9 +---- .../components/Menu/MenuButton.tsx | 5 +-- .../components/Menu/MenuItem.tsx | 13 +------ .../components/Menu/MenuItems.tsx | 9 +---- .../components/Menu/QuickAction.tsx | 9 +---- .../components/Modals/Alert.tsx | 39 ++++--------------- .../components/Modals/FormDialog.tsx | 29 +++----------- .../components/Preview/Preview.tsx | 11 ++---- .../components/SnippetsView/Item.tsx | 32 +++------------ .../components/SnippetsView/NewForm.tsx | 16 ++------ .../components/SnippetsView/SnippetForm.tsx | 8 +--- .../SnippetsView/SnippetInputField.tsx | 2 - .../components/SnippetsView/Snippets.tsx | 16 ++------ .../components/Steps/StepsToGetStarted.tsx | 22 ++--------- .../TaxonomyView/TaxonomyLookup.tsx | 4 +- .../components/UnknownView/UnknownView.tsx | 5 +-- .../components/WelcomeView/WelcomeLink.tsx | 9 +---- src/dashboardWebView/hooks/index.ts | 1 - src/dashboardWebView/hooks/useThemeColors.tsx | 17 -------- src/dashboardWebView/styles.css | 4 +- 46 files changed, 96 insertions(+), 438 deletions(-) delete mode 100644 src/dashboardWebView/hooks/useThemeColors.tsx diff --git a/src/dashboardWebView/components/Chatbot/Chatbox.tsx b/src/dashboardWebView/components/Chatbot/Chatbox.tsx index 43ac25ac..f86d2fb4 100644 --- a/src/dashboardWebView/components/Chatbot/Chatbox.tsx +++ b/src/dashboardWebView/components/Chatbot/Chatbox.tsx @@ -1,7 +1,6 @@ import { PaperAirplaneIcon } from '@heroicons/react/24/outline'; import * as React from 'react'; import { useCallback } from 'react'; -import useThemeColors from '../../hooks/useThemeColors'; import * as l10n from '@vscode/l10n'; import { LocalizationKey } from '../../../localization'; @@ -13,7 +12,6 @@ export interface IChatboxProps { export const Chatbox: React.FunctionComponent = ({ isLoading, onTrigger }: React.PropsWithChildren) => { const [message, setMessage] = React.useState(""); const [isFocussed, setIsFocussed] = React.useState(false); - const { getColors } = useThemeColors(); const callAi = useCallback(() => { setTimeout(() => { @@ -29,11 +27,7 @@ export const Chatbox: React.FunctionComponent = ({ isLoading, onT