From 3c9b70df7922244536b827a74f33f6e8f289bc53 Mon Sep 17 00:00:00 2001 From: Matiss Janis Aboltins Date: Tue, 16 Sep 2025 21:33:30 +0100 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20Integrate=20responsive=20design=20f?= =?UTF-8?q?or=20RecurringSchedulePicker=20component=20=20(#5733)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../select/RecurringSchedulePicker.tsx | 58 ++++++++++++------- upcoming-release-notes/5733.md | 6 ++ 2 files changed, 43 insertions(+), 21 deletions(-) create mode 100644 upcoming-release-notes/5733.md diff --git a/packages/desktop-client/src/components/select/RecurringSchedulePicker.tsx b/packages/desktop-client/src/components/select/RecurringSchedulePicker.tsx index b2af66e275..250661b8f3 100644 --- a/packages/desktop-client/src/components/select/RecurringSchedulePicker.tsx +++ b/packages/desktop-client/src/components/select/RecurringSchedulePicker.tsx @@ -10,12 +10,14 @@ import { import { useTranslation, Trans } from 'react-i18next'; import { Button } from '@actual-app/components/button'; +import { useResponsive } from '@actual-app/components/hooks/useResponsive'; import { SvgAdd, SvgSubtract } from '@actual-app/components/icons/v0'; import { InitialFocus } from '@actual-app/components/initial-focus'; import { Input } from '@actual-app/components/input'; import { Menu } from '@actual-app/components/menu'; import { Popover } from '@actual-app/components/popover'; import { Select } from '@actual-app/components/select'; +import { SpaceBetween } from '@actual-app/components/space-between'; import { Stack } from '@actual-app/components/stack'; import { Text } from '@actual-app/components/text'; import { theme } from '@actual-app/components/theme'; @@ -32,6 +34,7 @@ import { import { DateSelect } from './DateSelect'; +import { Modal } from '@desktop-client/components/common/Modal'; import { Checkbox } from '@desktop-client/components/forms'; import { useDateFormat } from '@desktop-client/hooks/useDateFormat'; import { useLocale } from '@desktop-client/hooks/useLocale'; @@ -477,13 +480,7 @@ function RecurringScheduleTooltip({ /> )} - + Repeat every @@ -503,7 +500,6 @@ function RecurringScheduleTooltip({ options={FREQUENCY_OPTIONS.map(opt => [opt.id, opt.name])} value={config.frequency} onChange={value => updateField('frequency', value)} - style={{ marginRight: 5 }} /> {config.frequency === 'monthly' && (config.patterns == null || config.patterns.length === 0) ? ( @@ -516,7 +512,7 @@ function RecurringScheduleTooltip({ Add specific days ) : null} - + {config.frequency === 'monthly' && config.patterns && config.patterns.length > 0 && ( @@ -603,6 +599,7 @@ export function RecurringSchedulePicker({ onChange, }: RecurringSchedulePickerProps) { const { t } = useTranslation(); + const { isNarrowWidth } = useResponsive(); const triggerRef = useRef(null); const [isOpen, setIsOpen] = useState(false); const dateFormat = useDateFormat() || 'MM/dd/yyyy'; @@ -618,6 +615,14 @@ export function RecurringSchedulePicker({ [locale, value, dateFormat], ); + const tooltip = ( + setIsOpen(false)} + onSave={onSave} + /> + ); + return (