Commit Graph

30 Commits

Author SHA1 Message Date
Konrad M. 1e438af5a7 fix(modal): fix sheet swipe tap-cancel and modal close race condition on iOS
Sheet swipe: add 10 px dead zone before transform, reset via rAF in touchend
so iOS WebKit does not cancel subsequent click events on child buttons.

Modal close: capture active overlay before animation to prevent race where
_doClose() removes the new modal instead of the old one when a confirm dialog
opens immediately after another modal closes (delete button not responding).
2026-04-21 22:17:28 +02:00
Ulas Kalayci e89f4259bc chore: complete colour-redesign follow-up — PWA theme sync, glass tokens, print normalisation (v0.20.16)
- index.html: theme-color #2563EB → #4F46E5 (Indigo-600)
- oikos-install-prompt.js: CSS fallback #2554C7 → #4338CA; #fff → var(--color-text-on-accent)
- tokens.css: add --glass-inset-{soft,base,medium,elevated,strong} tokens
- glass.css: replace 9 inset rgba() literals with --glass-inset-* token refs
- tasks.css: replace 1 inset rgba() literal with --glass-inset-base
- layout.css: normalise @media print shorthand hex to six-digit notation

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-19 22:22:30 +02:00
Ulas Kalayci 3c2a2fe6e9 fix: resolve modal header scroll-behind issue on iOS PWA (closes #50)
position: sticky on .modal-panel__header failed on iOS WebKit when the
scroll container had padding-top applied (drag-handle spacing). Restructured
modal layout: .modal-panel is now a flex-column with overflow:hidden and
.modal-panel__body handles scrolling (overflow-y:auto, flex:1). The header
is a non-scrolled flex sibling, so it stays visible without sticky. Updated
swipe-to-close to read .modal-panel__body scroll position.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-19 07:19:42 +02:00
Ulas Kalayci 6746a5a175 feat: Ukrainian translation, UAH currency, shopping category i18n (closes #52)
- Add Ukrainian (uk) locale to SUPPORTED_LOCALES and locale picker
- Add public/locales/uk.json (622 keys, full Ukrainian translation)
- Add UAH (Ukrainian Hryvnia) to SUPPORTED_CURRENCIES and VALID_CURRENCIES
- Add CATEGORY_I18N map and catLabel() in settings.js to translate default
  shopping category names in the settings panel; rename and delete dialogs
  now also use the translated name instead of the raw German DB string
- Align server VALID_CURRENCIES with frontend: add missing AED, BRL, INR, SAR

Co-Authored-By: baragoon <baragoon@users.noreply.github.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-18 22:09:42 +02:00
Ulas 8af730e9cf feat: add Japanese, Arabic, Hindi, Portuguese locales + new currencies
- 4 new locale files (ja, ar, hi, pt) with 567 keys each - full coverage
- Japanese (日本語): Hiragana/Kanji script
- Arabic (العربية): RTL-ready text
- Hindi (हिन्दी): Devanagari script
- Portuguese (Português): Brazilian Portuguese
- SUPPORTED_LOCALES updated in i18n.js (10 → 14 locales)
- LOCALE_LABELS updated in oikos-locale-picker.js
- New currencies: AED, BRL, INR, SAR added to budget settings
- Service Worker v31: new locale files pre-cached in APP_SHELL
- Docs: README, SPEC.md, BACKLOG.md, CHANGELOG.md updated
2026-04-14 10:28:17 +02:00
Ulas 370b9948a3 feat: Phase 0 - Audit-Fixes + Glass-Token-Layer
Accessibility fixes (WCAG 2.2):
- K1: Entferne user-scalable=no aus viewport (WCAG 1.4.4)
- K2: Korrigiere var(--color-background) → var(--color-bg) in settings.css
- H1: --color-text-tertiary #737370 → #6B6B68 (WCAG AA: 4.52:1)
- H2: --color-info #54AEFF → #0969DA (WCAG AA: 4.6:1 auf weiß)
- H4+H5: Korrigiere nicht-existente Token-Referenzen in settings.css
  (--color-surface-raised → --color-surface-2, --duration-fast → --transition-fast)
- H7: aria-label + role=presentation auf Modal-Overlay
- N1: theme-color Meta-Tags auf tatsächliche Design-Tokens angleichen
- N2: var(--color-text) → var(--color-text-primary) in notes.css
- N3: Hardcoded #1E5CB3 → var(--color-accent-deep) in dashboard.css
- N4: Hardcoded padding 2px 8px → Token-Referenzen in meals.css

Neue Tokens:
- --color-accent-deep: tiefer Akzent für Gradienten
- Glass-Token-Layer (Section 16) mit 7 Kategorien:
  Hintergründe, Blur-Stufen, Opazitäten, Highlights,
  Schatten, Radien, Übergänge
- Dark-Mode-Varianten für alle Glass-Tokens
- prefers-reduced-transparency: opake Fallbacks
- prefers-contrast: more: Kontrast-Fallbacks ohne Blur

i18n: modal.overlayLabel in allen 9 Sprachen ergänzt
2026-04-13 16:54:19 +02:00
Ulas e61644702c feat: add French, Turkish, Russian, Greek and Chinese UI languages + TRY/RUB currencies 2026-04-13 09:40:38 +02:00
Ulas f4268ce696 fix(modal): fix modal not closing in iOS PWA (#29)
- Add cursor:pointer to .modal-overlay so iOS Safari fires click events
  on the backdrop (iOS ignores clicks on non-interactive divs without it)
- Add touchend fallback listener on overlay for belt-and-suspenders iOS support
- Enlarge close button from target-sm (32px) to target-md (40px) to meet
  Apple touch-target guidelines; remove now-redundant ::before expansion
- Swipe-to-close now only activates from the top handle zone (< 48px) or
  when the panel is scrolled to top, preventing accidental dismissal while
  scrolling form content downward
2026-04-06 09:59:37 +02:00
Ulas 6702bc5291 feat(i18n): add Spanish (Español) language support 2026-04-05 22:17:08 +02:00
Ulas 1722e70e7f fix(ux): microinteraction fixes - swipe hint, locale loading, haptics, weather toast, FAB backdrop
- tasks.js: add maybeShowSwipeHint (long loop, max 3x) - matches shopping.js pattern
- tasks.js: vibrate(15) on task status toggle
- oikos-locale-picker: show disabled/loading state for both reload and setLocale paths
- dashboard: show success toast after weather refresh (all 4 locales)
- dashboard: add semi-transparent FAB backdrop to signal open mode
2026-04-05 13:23:16 +02:00
Ulas 796fe38913 fix(test): use bare matchMedia() instead of window.matchMedia() for Node ESM compat
global.window assignment doesn't expose 'window' as an identifier in ESM modules
in Node.js 22. matchMedia() is a global in browsers - no window. prefix needed.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-05 13:06:18 +02:00
Ulas a5ae0bac7e fix(ux): locale reload feedback, submit validation, dedup blur logic
- Locale-Picker: disable select + fade before location.reload() (system mode)
  gives visual feedback before the page jumps
- Extract _validateField() helper from wireBlurValidation to avoid duplication
- Add validateAll(formContainer): validates all required fields on demand,
  marks inline errors, focuses first invalid field
- tasks.js: call validateAll() at submit to catch untouched required fields
2026-04-05 12:33:57 +02:00
Ulas 44e5a879b9 fix(ux): replace native confirm() dialogs, add undo-toast, fix prefers-reduced-motion
- Replace all 13 native confirm() calls with confirmModal() across 7 page modules
- Add confirmModal() to modal.js (Promise-based, danger variant, focus management)
- Fix double-confirm bug in contacts.js and budget.js (modal + deleteContact/deleteEntry)
- Extend showToast() with onUndo callback and max-3-toast limit
- Implement optimistic undo-toast (4s window) for shopping item and bulk-checked delete
- Add prefers-reduced-motion guard to btnSuccess() and btnError() in modal.js
- Add btn--error-static CSS class as motion-reduced fallback for btnError()
- Add toast__undo button styles to layout.css
- Add common.confirm and common.undo i18n keys (de, en, it, sv)
- Add shopping.itemDeletedToast i18n key (de, en, it, sv)
2026-04-05 12:31:16 +02:00
Ulas 3a6ae4a64a feat(i18n): add Swedish (sv) translation and Italian as explicit language option (#19)
Swedish translation contributed by @olsson82 (PR #19), integrated with
minor corrections (dayShortSunday: Sun → Sön, amountLabel aligned with
v0.11.2, new v0.11.2 currency keys added).

Italian was already supported server-side but is now explicitly listed
in the locale picker alongside German, English, and Swedish.
2026-04-05 12:01:16 +02:00
Ulas 72515c5a69 fix(styles): resolve design system audit violations and touch scrolling
- Replace hardcoded px values with design tokens (--space-0h, --space-px,
  --space-1, --target-sm/md/lg) across layout, calendar, dashboard CSS
- Fix rgba(255,255,255,0.35) spinner border to use var(--color-glass-hover)
- Fix modal close icon from off-grid 18px to 16px
- Fix touch scrolling on mobile: add min-height: 0 and
  -webkit-overflow-scrolling: touch to .app-content
2026-04-05 01:23:38 +02:00
Ulas 7eb06ed905 fix(modal): replace native prompt() with custom modal dialogs
Native browser prompt() is unreliable on mobile browsers and PWAs,
often requiring multiple clicks to close. Replace all prompt() calls
with custom promptModal() and selectModal() functions that use the
existing modal system with proper focus management and animations.

Affected pages: shopping (create/rename list), tasks (add subtask),
meals (choose shopping list).

Fixes #12
2026-04-04 21:31:50 +02:00
Ulas 47b34c4829 fix(modal): add fallback timer for mobile close animation
On mobile, closeModal() relies on the CSS animationend event to call
_doClose(). When the animation does not fire (prefers-reduced-motion,
tab switch, browser quirk), the modal stays stuck and the user cannot
dismiss it. A 300ms fallback timer now guarantees cleanup runs.

Reported in discussion #9
2026-04-04 14:16:00 +02:00
Ulas 1122bd269b style: replace em dashes with hyphens throughout codebase
Replace all — with - in all source files (JS, CSS, HTML, JSON,
Markdown) for consistency and readability.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-03 17:04:39 +02:00
Ulas b1ee4439be feat(i18n): add Italian localization
Add complete Italian translation (497 keys) based on PR #7 by
@albanobattistella. Fixed filename from "it. json" to "it.json" and
registered Italian in SUPPORTED_LOCALES and the locale picker component.

Co-Authored-By: albanobattistella <34811668+albanobattistella@users.noreply.github.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-03 15:35:08 +02:00
Ulas af69431eac fix: weather icons in PWA + locale picker dropdown
- SW: skip cross-origin asset requests (opaque responses caused weather
  icons to break in PWA standalone mode on Android)
- Replace oikos-locale-picker radio buttons with <select> dropdown
- Add settings.localeLabel i18n key (de + en)
- Bump SW cache to v22

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-01 09:42:06 +02:00
Ulas 431d6af356 feat: add oikos-locale-picker component and language settings
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-31 23:29:13 +02:00
Ulas fe70cbf979 feat: i18n web components with locale-changed listener
Replace hardcoded German strings in modal.js and oikos-install-prompt.js
with t() calls; wire locale-changed event listener for live re-render on
locale switch.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-31 23:15:51 +02:00
Ulas 0ac2769fac feat: blur-triggered inline validation and submit button feedback
Task 13: wireBlurValidation() activates error/valid state on required
fields after blur. Task 14: btnSuccess() shows a checkmark for 700ms
then closes the modal; btnError() triggers a shake animation on failure.
Both wired into the tasks form submit handler.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-30 21:22:36 +02:00
Ulas 1684215da8 feat: bottom sheet modal on mobile with swipe-to-close and Enter-key form navigation
- Add sheet drag handle (::before pseudo-element) and closing animation (sheet-out keyframe) for mobile < 768px in layout.css
- Add prefers-reduced-motion support disabling all modal animations
- Refactor closeModal() to extract _doClose() and play slide-out animation on mobile before removing the overlay
- Add _wireSheetSwipe() for touch drag-to-dismiss (threshold 80px)
- Extend trapFocus() Enter handler: advances focus through inputs/selects and triggers primary button on last field

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-30 21:19:25 +02:00
Ulas 499ce2cd29 feat: delay install prompt, reset counter on dismiss, scroll inputs into view
- Install prompt now waits for 2 interactions before showing
- Dismiss duration reduced from 30d to 7d
- Interaction counter reset on dismiss (clean slate after 7d)
- Virtual keyboard: focused inputs scroll into view in modals (300ms delay)
2026-03-30 21:16:36 +02:00
Ulas e3e0b8081b feat: scroll focused inputs into view on virtual keyboard open 2026-03-30 17:31:09 +02:00
Ulas 4eacba2edd feat: delay install prompt until 2 interactions, reduce dismiss to 7 days
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-30 17:30:05 +02:00
Ulas 41e88e0acf Add PWA native feel: manifest, meta tags, install prompt, SW optimization, dynamic theme-color
Configure manifest.json with scope, maskable icons, and categories. Add iOS/Android
meta tags for standalone behavior. Create pwa.css for native touch/scroll handling
and safe area insets. Add oikos-install-prompt Web Component with Chrome install
flow and iOS guidance. Optimize service worker with network-first navigation and
expanded precache (v19). Add dynamic theme-color per route and modal overlay dimming
in standalone mode. Generate placeholder icons via sharp script.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-29 15:35:01 +02:00
ulsklyc d5a0e701b0 a11y: aria-hidden auf allen Icons + aria-label auf icon-only Buttons (Redesign Phase F)
- Alle data-lucide Icons: aria-hidden="true" (dekorativ)
- Icon-only Buttons/Links: title→aria-label (Screenreader-zugänglich)
- Betrifft: modal.js, contacts, meals, budget, calendar, notes, tasks,
  shopping, dashboard

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-26 13:48:23 +01:00
ulsklyc 7e718e2422 feat: shared modal system + migrate tasks module
- Add public/components/modal.js with focus-trap, escape-handler,
  overlay-click, focus-restore, scroll-lock, aria-modal (Spec §5.1/§5.2)
- Migrate tasks.js from custom modal to shared openModal/closeModal API
- Remove .modal-backdrop/.modal/.modal__* styles from tasks.css
- Add .modal-panel--sm/--lg sizing variants to layout.css

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-26 12:04:57 +01:00