From 710c859f4ee6d8f6092f84e36f7c4de008465ed0 Mon Sep 17 00:00:00 2001 From: Antoine Moreaux Date: Fri, 23 May 2025 11:03:31 +0200 Subject: [PATCH] =?UTF-8?q?feat(settings):=20replace=20TextInputV2=20with?= =?UTF-8?q?=20TextInput=20and=20update=20hotkey=20=E2=80=A6=20(#12236)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit …scope Replaced TextInputV2 with TextInput in SettingsSecurityApprovedAccessDomain for consistency with the input component. Added a new hotkey scope for the REST Playground page in PageChangeEffect to enable keyboard shortcut menu functionality. Fix #10981 --- .../app/effect-components/PageChangeEffect.tsx | 11 +++++++++++ .../security/SettingsSecurityApprovedAccessDomain.tsx | 11 +++++------ 2 files changed, 16 insertions(+), 6 deletions(-) diff --git a/packages/twenty-front/src/modules/app/effect-components/PageChangeEffect.tsx b/packages/twenty-front/src/modules/app/effect-components/PageChangeEffect.tsx index 079be631f..793e31548 100644 --- a/packages/twenty-front/src/modules/app/effect-components/PageChangeEffect.tsx +++ b/packages/twenty-front/src/modules/app/effect-components/PageChangeEffect.tsx @@ -223,6 +223,17 @@ export const PageChangeEffect = () => { }); break; } + case isMatchingLocation( + location, + SettingsPath.RestPlayground, + AppBasePath.Settings, + ): { + setHotkeyScope(PageHotkeyScope.Settings, { + goto: false, + keyboardShortcutMenu: true, + }); + break; + } case isMatchingLocation( location, SettingsPath.WorkspaceMembersPage, diff --git a/packages/twenty-front/src/pages/settings/security/SettingsSecurityApprovedAccessDomain.tsx b/packages/twenty-front/src/pages/settings/security/SettingsSecurityApprovedAccessDomain.tsx index b8cf8fa19..d9d1986bf 100644 --- a/packages/twenty-front/src/pages/settings/security/SettingsSecurityApprovedAccessDomain.tsx +++ b/packages/twenty-front/src/pages/settings/security/SettingsSecurityApprovedAccessDomain.tsx @@ -11,9 +11,9 @@ import { Trans, useLingui } from '@lingui/react/macro'; import { z } from 'zod'; import { SettingsPageContainer } from '@/settings/components/SettingsPageContainer'; import { useCreateApprovedAccessDomainMutation } from '~/generated/graphql'; -import { TextInputV2 } from '@/ui/input/components/TextInputV2'; import { H2Title } from 'twenty-ui/display'; import { Section } from 'twenty-ui/layout'; +import { TextInput } from '@/ui/input/components/TextInput'; export const SettingsSecurityApprovedAccessDomain = () => { const navigate = useNavigateSettings(); @@ -115,12 +115,11 @@ export const SettingsSecurityApprovedAccessDomain = () => { field: { onChange, value }, fieldState: { error }, }) => ( - { - onChange(domain); - }} + onChange={onChange} fullWidth placeholder="yourdomain.com" error={error?.message} @@ -140,7 +139,7 @@ export const SettingsSecurityApprovedAccessDomain = () => { field: { onChange, value }, fieldState: { error }, }) => ( -