From c16593aeeee4b993a1e3112019a98c122d6f34ee Mon Sep 17 00:00:00 2001 From: Fringg Date: Fri, 24 Apr 2026 14:10:28 +0300 Subject: [PATCH] fix: mobile/responsive issues in FAQ and info pages MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - FAQ builder: touch targets 36px → 44px (move up/down/delete buttons) - Filter tabs: add flex-wrap to prevent overflow on narrow screens - Accordion: add ResizeObserver for dynamic content height (images loading, viewport rotation won't clip content anymore) - Accordion: use stable key (index+question) instead of filtered array index — search+toggle no longer opens wrong item --- src/pages/AdminInfoPageEditor.tsx | 6 ++--- src/pages/AdminInfoPages.tsx | 2 +- src/pages/InfoPageView.tsx | 42 +++++++++++++++++++------------ 3 files changed, 30 insertions(+), 20 deletions(-) diff --git a/src/pages/AdminInfoPageEditor.tsx b/src/pages/AdminInfoPageEditor.tsx index 2b242eb..1cac8bd 100644 --- a/src/pages/AdminInfoPageEditor.tsx +++ b/src/pages/AdminInfoPageEditor.tsx @@ -325,7 +325,7 @@ function FaqBuilder({ items, onChange, locale, localeLabel }: FaqBuilderProps) { type="button" onClick={() => handleMoveUp(index)} disabled={index === 0} - className="min-h-[36px] min-w-[36px] rounded-lg p-2 text-dark-400 transition-colors hover:bg-dark-700 hover:text-dark-200 disabled:cursor-not-allowed disabled:opacity-30" + className="min-h-[44px] min-w-[44px] rounded-lg p-2 text-dark-400 transition-colors hover:bg-dark-700 hover:text-dark-200 disabled:cursor-not-allowed disabled:opacity-30" title={t('admin.infoPages.faq.moveUp')} > @@ -334,7 +334,7 @@ function FaqBuilder({ items, onChange, locale, localeLabel }: FaqBuilderProps) { type="button" onClick={() => handleMoveDown(index)} disabled={index >= items.length - 1} - className="min-h-[36px] min-w-[36px] rounded-lg p-2 text-dark-400 transition-colors hover:bg-dark-700 hover:text-dark-200 disabled:cursor-not-allowed disabled:opacity-30" + className="min-h-[44px] min-w-[44px] rounded-lg p-2 text-dark-400 transition-colors hover:bg-dark-700 hover:text-dark-200 disabled:cursor-not-allowed disabled:opacity-30" title={t('admin.infoPages.faq.moveDown')} > @@ -342,7 +342,7 @@ function FaqBuilder({ items, onChange, locale, localeLabel }: FaqBuilderProps) {