From 4f38fa44964b981277f00f55d3097d29dc4da1f7 Mon Sep 17 00:00:00 2001 From: Knee Cola Date: Wed, 26 Nov 2025 20:31:41 +0100 Subject: [PATCH] Add expand and fade-in animations to conditional form sections MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add smooth animations to form sections that appear when toggles are enabled, improving user experience with visual feedback. Changes: - Add expandFadeIn keyframe animation to Tailwind config - Apply expand-fade-in animation to UserSettingsForm payment sections - Apply expand-fade-in animation to LocationEditForm conditional fields - Update account page HomeIcon color from green to white for consistency 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- app/[locale]/home/account/page.tsx | 2 +- app/ui/LocationEditForm.tsx | 8 ++++---- app/ui/UserSettingsForm.tsx | 8 ++++---- tailwind.config.ts | 13 +++++++++++++ 4 files changed, 22 insertions(+), 9 deletions(-) diff --git a/app/[locale]/home/account/page.tsx b/app/[locale]/home/account/page.tsx index 257f59c..d1371d7 100644 --- a/app/[locale]/home/account/page.tsx +++ b/app/[locale]/home/account/page.tsx @@ -17,7 +17,7 @@ const Page: FC = async () => {

{t('title')}

- {t('goto-home-button-label')} + {t('goto-home-button-label')} {t('goto-settings-button-label')}
diff --git a/app/ui/LocationEditForm.tsx b/app/ui/LocationEditForm.tsx index 00bf303..d63c4cb 100644 --- a/app/ui/LocationEditForm.tsx +++ b/app/ui/LocationEditForm.tsx @@ -119,7 +119,7 @@ export const LocationEditForm: FC = ({ location, yearMont {formValues.tenantPaymentMethod === "iban" && userSettings?.enableIbanPayment ? ( - <> +
{t("iban-payment--form-title")}
- +
) : // ELSE include hidden inputs to preserve existing values <> = ({ location, yearMont {formValues.rentDueNotification && ( - <> +
{t("rent-due-day-label")} = ({ userSettings, errors, message }) => {
{ formValues.enableRevolutPayment ? ( - <> +
{t("revolut-form-title")}
{t("payment-additional-notes")} - +
) : // ELSE include hidden input to preserve existing value <> diff --git a/tailwind.config.ts b/tailwind.config.ts index 2889b2d..bbe32ba 100644 --- a/tailwind.config.ts +++ b/tailwind.config.ts @@ -18,6 +18,9 @@ const config: Config = { 600: '#2F6FEB', }, }, + animation: { + 'expand-fade-in': 'expandFadeIn 0.3s ease-in-out forwards', + }, }, keyframes: { shimmer: { @@ -37,6 +40,16 @@ const config: Config = { maxHeight: '200px', }, }, + expandFadeIn: { + '0%': { + opacity: '0', + transform: 'scaleY(0.95)', + }, + '100%': { + opacity: '1', + transform: 'scaleY(1)', + }, + }, }, }, plugins: [