From a5154e13492a526397990e28d44d86e9582ac34f Mon Sep 17 00:00:00 2001 From: Marco Beretta <81851188+berry-13@users.noreply.github.com> Date: Tue, 1 Apr 2025 09:15:41 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=9A=80=20feat:=20enhance=20UI=20component?= =?UTF-8?q?s=20and=20refactor=20settings=20(#6625)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * ๐Ÿš€ feat: Add Save Badges State functionality to chat settings * ๐Ÿš€ feat: Remove individual chat setting components and introduce a reusable ToggleSwitch component * ๐Ÿš€ feat: Replace Switches with reusable ToggleSwitch component in General settings; style: improved HoverCard * ๐Ÿš€ feat: Refactor ChatForm and Footer components for improved layout and state management * ๐Ÿš€ feat: Add deprecation warning for GPT Plugins endpoint --------- Co-authored-by: Danny Avila --- client/src/components/Chat/Footer.tsx | 3 +- client/src/components/Chat/Input/ChatForm.tsx | 10 +- .../Endpoints/components/EndpointItem.tsx | 14 +- .../Nav/SettingsTabs/Chat/CenterChatInput.tsx | 34 ----- .../components/Nav/SettingsTabs/Chat/Chat.tsx | 121 ++++++++++++------ .../Nav/SettingsTabs/Chat/EnterToSend.tsx | 37 ------ .../Nav/SettingsTabs/Chat/LaTeXParsing.tsx | 37 ------ .../SettingsTabs/Chat/MaximizeChatSpace.tsx | 37 ------ .../Nav/SettingsTabs/Chat/ModularChat.tsx | 33 ----- .../{SaveDraft.tsx => SaveBadgesState.tsx} | 16 +-- .../Nav/SettingsTabs/Chat/ScrollButton.tsx | 35 ----- .../Nav/SettingsTabs/Chat/ShowCodeSwitch.tsx | 34 ----- .../General/AutoScrollSwitch.spec.tsx | 38 ------ .../Nav/SettingsTabs/General/General.tsx | 46 +++++-- .../Nav/SettingsTabs/ToggleSwitch.tsx | 49 +++++++ client/src/components/ui/HoverCard.tsx | 2 +- client/src/hooks/useChatBadges.ts | 12 ++ client/src/hooks/useNewConvo.ts | 7 +- client/src/locales/en/translation.json | 11 ++ client/src/store/settings.ts | 1 + 20 files changed, 227 insertions(+), 350 deletions(-) delete mode 100644 client/src/components/Nav/SettingsTabs/Chat/CenterChatInput.tsx delete mode 100644 client/src/components/Nav/SettingsTabs/Chat/EnterToSend.tsx delete mode 100644 client/src/components/Nav/SettingsTabs/Chat/LaTeXParsing.tsx delete mode 100644 client/src/components/Nav/SettingsTabs/Chat/MaximizeChatSpace.tsx delete mode 100644 client/src/components/Nav/SettingsTabs/Chat/ModularChat.tsx rename client/src/components/Nav/SettingsTabs/Chat/{SaveDraft.tsx => SaveBadgesState.tsx} (68%) delete mode 100644 client/src/components/Nav/SettingsTabs/Chat/ScrollButton.tsx delete mode 100644 client/src/components/Nav/SettingsTabs/Chat/ShowCodeSwitch.tsx delete mode 100644 client/src/components/Nav/SettingsTabs/General/AutoScrollSwitch.spec.tsx create mode 100644 client/src/components/Nav/SettingsTabs/ToggleSwitch.tsx diff --git a/client/src/components/Chat/Footer.tsx b/client/src/components/Chat/Footer.tsx index 8bdebfb474..b2d7b12270 100644 --- a/client/src/components/Chat/Footer.tsx +++ b/client/src/components/Chat/Footer.tsx @@ -56,7 +56,6 @@ export default function Footer({ className }: { className?: string }) { { return (