Commit Graph

58 Commits

Author SHA1 Message Date
f5ca452a85 feat: add test email admin page and comprehensive form fill button
- New Umzugsliste_Test_Email class with test data generator covering all
  fields: addresses, 7 rooms with items, all additional work sections, sonstiges
- Admin page under Moving List > Test Email with inline preview iframe
  and Send Test Email button (manage_options capability)
- Replace Step 1 dev fill button with Fill All that populates every field
  across all 9 steps (furniture, additional work, sonstiges)
- Fix getFieldVal crash when select has no selection (selectedIndex=-1)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-13 00:40:08 +09:00
60f82f1224 feat: rewrite email Weitere Arbeiten as single 3-column table with grand totals in last room
- Replace per-section tables with unified Weitere Arbeiten table matching legacy format
- Move grand totals row into last room table instead of standalone section
- Add get_field_key/get_field_value/get_field_anzahl helpers for field resolution
- Packarbeiten/Anfahrt use sub-headers matching legacy HTML structure

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-13 00:40:00 +09:00
a91425bd2d Merge pull request 'feature/ui-ux-modernization' (#1) from feature/ui-ux-modernization into main
Reviewed-on: #1
2026-02-12 14:35:22 +00:00
f6c7af7cbc fix: polish form UX and step 9 summary translations
- Add spacing below Datenschutzerklaerung text
- Fix missing Umzugstermin on step 9 (wrong field names in JS)
- Remove number-to-checkmark animation flicker on progress dots
- Add cbm unit label to furniture item values and summary
- Translate all summary field labels via l10n (Name, Strasse, etc.)
- Fix room names showing lowercase keys instead of proper titles
- Auto-check checkbox when quantity is entered on step 8
- Remove redundant Sonstiges textarea placeholder

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-12 23:31:25 +09:00
f1f5c760c2 feat: add 3 switchable color palettes with Slate Blue & Amber as default
Replace generic Google blue with 3 professional palettes (Deep Teal,
Slate Blue & Amber, Rich Olive & Copper) using CSS token overrides.
Palette B (Slate Blue + amber Next button) is the default. Includes
WP_DEBUG-only purple switcher button to cycle between palettes.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-12 23:02:55 +09:00
2ca1f4ff54 feat: redesign Step 8 with flat list layout matching room steps
Replace bordered card sections with flat rows using hairline dividers,
opacity dimming, and native radio controls to match the room step visual
pattern. Also includes structural refactors (step-sections, address-sections)
and running totals bar polish from the modernization branch.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-12 22:47:39 +09:00
89bd555dc1 feat: modernize wizard UX with smart rows, steppers, transitions, and edit links
- Hide montage toggles and dim furniture rows when quantity is 0
- Animate running totals bar with CSS transform instead of display toggle
- Add directional slide transitions (forward/backward) between steps
- Add +/- stepper buttons around quantity inputs for better affordance
- Increase mobile tap targets to 44px and show active step label
- Add "Edit" links to summary section headings for quick navigation
- Add "Step X of Y" counter below progress bar
- Add summaryEdit, stepLabel, stepOf l10n strings to both entry points

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-07 23:46:36 +09:00
b9ae7d707d fix: step navigation back-click bug and add shortcode lang attribute
Track highestStep so navigating backward preserves completed dots and
allows clicking forward to any previously visited step. Add [umzugsliste
lang="de|en"] shortcode attribute that switches locale via
switch_to_locale() for per-page language control.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-07 22:54:55 +09:00
39f94a6b2e docs(10): document post-release fixes phase
Add Phase 10 GSD documentation for three critical bugs found during
manual testing: form submit 404 (reserved query vars), handler init
timing, and missing CPT detail meta box. Update ROADMAP and STATE
tracking files.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-07 22:37:25 +09:00
64caccc5c1 fix: resolve form submission issues and add CPT detail view
- Rename day/month/year form fields to umzug_day/umzug_month/umzug_year
  to avoid conflict with WordPress reserved public query variables that
  caused a 404 on form POST
- Move form handler instantiation to init_hooks() so handle_submission
  registers on the init action before it fires
- Add standalone template fallback: detect [umzugsliste] shortcode in
  page content when form_page_id option is not set
- Add submission details meta box to CPT entries showing addresses,
  furniture, additional work, and status
- Add German translations for all new admin meta box strings

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-07 13:03:31 +09:00
c0021befe2 feat: add standalone form page, close all audit gaps, pass v1.0 milestone
Add standalone form page template that bypasses the theme, with admin
setting and auto-creation on plugin activation. Fix reCAPTCHA v3 double
submission, remove jQuery dependency, extend localized JS strings, and
overhaul form CSS/JS. Update milestone audit to PASSED (9/9, 10/10, 5/5).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-07 12:09:11 +09:00
a9b1f2eb40 docs(09): complete internationalization phase
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-07 00:06:49 +09:00
a7c70031d9 fix(09): wrap wp_die error strings in gettext and update translations
Verifier caught 5 hardcoded German strings in the email failure wp_die
block. Wrapped in esc_html__(), added German translations, regenerated
POT/PO/MO files.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-07 00:06:25 +09:00
54643b245c docs(09-02): complete form strings and translation files plan
Tasks completed: 2/2
- Task 1: Wrapped 222+ form-facing strings in gettext functions
- Task 2: Generated POT/PO/MO translation files

SUMMARY: .planning/phases/09-i18n/09-02-SUMMARY.md

Phase 9 (Internationalization) complete - all gaps from v1.0 audit now closed.
Plugin fully internationalized with German translations shipping out-of-box.
2026-02-06 23:59:53 +09:00
d452ff9c1e feat(09-02): generate POT, PO, and MO translation files
- Generated POT template with 224 translatable strings using WP-CLI
- Created German de_DE PO file with complete translations
- All room names translated (7 rooms)
- All 90+ furniture item names translated across all rooms
- All additional work section labels and fields translated
- All form UI strings translated (headers, labels, buttons, placeholders)
- All validation messages translated
- All settings page strings translated
- Compiled MO binary file for out-of-box German support
- POT file follows Loco Translate naming convention
- PO file has UTF-8 encoding with German umlauts (ä, ö, ü, ß)
- 222 of 224 strings translated (only empty msgid and metadata remain)
- MO file: 14K compiled binary
- Files ship with plugin for immediate German translation support
2026-02-06 23:58:04 +09:00
a32260dc87 feat(09-02): wrap form-facing strings and localize JS validation
- Wrap all room names and 90+ furniture item names in __()
- Wrap all additional work section labels and field names in __()
- Wrap all form renderer UI strings (headers, labels, buttons) in gettext
- Pass translated address field labels to render methods
- Wrap validation error messages in class-form-handler
- Force German locale for email generation via switch_to_locale()
- Restore locale after email with restore_previous_locale()
- Add wp_localize_script() for JS validation messages
- Update form.js to use umzugslisteL10n for translated strings
- Email generator remains untouched (hardcoded German as required)
- Email subject stays hardcoded German (not wrapped in gettext)
- All PHP files pass syntax check
- 163 gettext calls in furniture-data, 26 in form-renderer
2026-02-06 23:51:56 +09:00
0d60fc9530 docs(09-01): complete i18n infrastructure plan
Tasks completed: 2/2
- Text domain fix, loading infrastructure, and change_locale hook
- Wrap admin and infrastructure strings in gettext

SUMMARY: .planning/phases/09-i18n/09-01-SUMMARY.md
2026-02-06 23:42:57 +09:00
8982227d33 feat(09-01): wrap admin and infrastructure strings in gettext functions
- CPT labels: wrap all 13 labels in __() with English source strings
- Admin menu: wrap menu titles (Moving List, Entries, Settings) in __()
- Settings page: wrap all section titles, field labels, and descriptions with appropriate gettext functions
- Date helpers: wrap Day, Month, Year labels in esc_html__()
- All strings use English as source language per i18n strategy
- Text domain 'siegel-umzugsliste' applied throughout
- German translations will be provided in .po file (Plan 02)
2026-02-06 23:41:39 +09:00
8751eacdf2 chore(09-01): add i18n infrastructure and fix text domain
- Update text domain from 'umzugsliste' to 'siegel-umzugsliste' in plugin header
- Add siegel_umzugsliste_load_textdomain() function hooked on init priority 1
- Add change_locale hook to reload text domain (workaround for WP core bug #39210)
- Text domain loading enables translation file support in languages/ directory
2026-02-06 23:39:15 +09:00
0274a4d0a1 docs(09): create phase plan for internationalization
Phase 09: Internationalization
- 2 plans in 2 waves
- 1 parallel (wave 1), 1 sequential (wave 2)
- Ready for execution

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-06 23:31:07 +09:00
5ddc2a15a8 docs(09): research phase domain
Phase 09: Internationalization
- WordPress gettext patterns documented
- WP-CLI and Loco Translate compatibility confirmed
- switch_to_locale() bug #39210 workaround identified
- Text domain mismatch detected (needs correction)
- Email locale forcing strategy researched

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-06 23:24:06 +09:00
9aa1b9c107 docs(09): capture phase context
Phase 09: Internationalization
- Implementation decisions documented
- Phase boundary established
2026-02-06 23:17:28 +09:00
8bf60a851c docs(08): complete bug fixes & legacy parity phase
Phase 8 verified: session bug fixed, additional work sections integrated, Sonstiges field added.
2/2 plans executed, all must-haves verified against codebase.
2026-02-06 23:05:55 +09:00
8989d20a89 fix(08): add missing small-1 and small-8 grid column definitions
- checkbox_anzahl field type uses small-1/small-8/small-3 layout
- Only small-3 was defined, causing broken layout for those fields
2026-02-06 23:05:35 +09:00
2aa015bc05 docs(08-02): complete additional work & Sonstiges integration plan
Tasks completed: 2/2
- Render additional work sections and Sonstiges in form
- Sanitize additional work data and generate email sections

SUMMARY: .planning/phases/08-bugfixes-legacy-parity/08-02-SUMMARY.md
2026-02-06 23:02:02 +09:00
270349b82f feat(08-02): sanitize additional work data and generate email sections
- Added sanitization for additional_work array in sanitize_submission()
- Keys sanitized with sanitize_key(), values with sanitize_text_field()
- Added sanitization for sonstiges with sanitize_textarea_field()
- Added generate_additional_work_sections() to generate email tables
- Added has_additional_work_data() helper to check if section has data
- Added generate_sonstiges_section() for Sonstiges textarea in email
- Email tables use legacy bgcolor='#CCCCCC' header pattern
- All 4 field types (checkbox, abbau_aufbau, checkbox_anzahl, text) handled
- Empty sections omitted from email for clean formatting
- Line breaks preserved in Sonstiges with nl2br()

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-06 23:00:39 +09:00
d0edef9c00 feat(08-02): render additional work sections and Sonstiges in form
- Added render_additional_work_sections() method to loop through all sections
- Added render_additional_work_section() to render individual sections with correct field types
- Added render_sonstiges_field() for free text textarea
- Added get_field_key() helper to generate field keys from field names
- Field types: checkbox, abbau_aufbau (radio), checkbox_anzahl, text
- All fields use additional_work[section][key] naming pattern
- Added CSS styling for additional work sections and Sonstiges textarea

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-06 22:59:42 +09:00
94958ae7bb docs(08-01): complete session bug fix plan
Tasks completed: 1/1
- Replace session_id() with unique form_id pattern

SUMMARY: .planning/phases/08-bugfixes-legacy-parity/08-01-SUMMARY.md
2026-02-06 22:56:37 +09:00
28fcfcca34 fix(08-01): replace session_id with unique form_id to prevent error cross-contamination
- Remove all session_id() calls (unreliable on WordPress hosts)
- Generate unique form_id with uniqid() in form renderer
- Pass form_id via hidden field and GET parameter through redirect
- Use form_id for per-submission transient keys
- Fix validation error format to match expected array structure with 'messages' key
- Both captcha and validation errors now use consistent format

Fixes production-blocking bug where multiple users shared 'umzugsliste_errors_default' transient key.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-06 22:55:30 +09:00
718bdaf614 docs(08): create phase plan for bug fixes and legacy parity
Phase 08: Bug Fixes & Legacy Parity
- 2 plans in 2 waves
- 1 parallel (wave 1), 1 sequential (wave 2)
- Ready for execution

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-06 22:49:32 +09:00
c0df7c5cdf docs(08): research phase domain
Phase 08: Bug Fixes & Legacy Parity
- Session bug fix pattern identified (hidden field + uniqid)
- Additional work sections integration patterns documented
- Sonstiges field implementation researched
2026-02-06 22:44:34 +09:00
ab36dca53c docs(roadmap): add gap closure phases 8-9
Milestone audit found 4 gaps:
- Session ID bug in error handling (critical)
- Additional work sections not integrated (Montage, etc.)
- Sonstiges free text missing
- i18n not implemented (REQ-7)

Phase 8: Bug Fixes & Legacy Parity
Phase 9: Internationalization

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-06 22:34:01 +09:00
9c8ddc555c feat: add core implementation files for phases 4-6
Add missing implementation files and planning docs:
- Phase 04: Shortcode handler and date helpers for form rendering
- Phase 05: Planning documentation for volume calculations
- Phase 06: Email generator for legacy HTML table format

These complete the form rendering, calculation, and email system.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-16 23:06:23 +09:00
82e856e098 docs(07-01): complete captcha & validation plan
Phase 7 implementation complete:
- Created captcha verification class
- Added inline form validation
- Integrated captcha with form
- Added error styling
- Updated all documentation

All 7 phases now complete! Plugin ready for testing.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-16 12:33:10 +09:00
7967756a68 feat(07-01): load captcha class
- Add class-captcha.php to dependencies
- Load before form renderer for availability

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-16 12:30:53 +09:00
363bf2f9fc feat(07-01): add error styling
- Red border and background for invalid fields
- Error message styling (red text)
- Validation summary box with red border
- Captcha widget margin spacing
- Consistent error color (#d32f2f)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-16 12:30:49 +09:00
d1d71a5e4e feat(07-01): integrate captcha verification in form handler
- Verify captcha after nonce check
- Support all three providers
- Store captcha errors in transient
- Redirect back to form on verification failure
- German error message for failed captcha

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-16 12:30:42 +09:00
64f25041ad feat(07-01): add captcha widget and error display
- Render validation errors from transient at form top
- Display error summary with red border
- Integrate captcha widget in submit section
- Position captcha above submit button
- Delete transient after displaying errors

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-16 12:30:35 +09:00
78102c0ab4 feat(07-01): add inline form validation
- Client-side validation on blur and submit
- Email format validation
- Required field validation
- Furniture items validation (at least one)
- Date field validation
- Inline error messages (no JavaScript alerts)
- Auto-scroll to first error
- Error clearing on field input

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-16 12:30:26 +09:00
486d88e5b1 feat(07-01): create captcha verification class
- Support for reCAPTCHA v2, v3, and hCaptcha
- Server-side verification with wp_remote_post
- Automatic script enqueuing based on provider
- Widget rendering for all three providers
- reCAPTCHA v3 score checking (>= 0.5)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-16 12:30:18 +09:00
17cc2db0a0 docs(03-01): complete settings system plan
Tasks completed: 3/3
- Settings class with WordPress Settings API
- Settings sections and fields with German labels
- Settings save confirmation

SUMMARY: .planning/phases/03-settings/03-01-SUMMARY.md
2026-01-16 11:47:46 +09:00
dca1cf7f37 feat(03-01): add settings save confirmation
- Added settings_errors() call to display WordPress admin notices
- get_option() helper method already implemented for clean API access
- Settings now show success message after save
- All settings validated and persisted via WordPress Settings API
2026-01-16 11:46:23 +09:00
6cfa6e2451 feat(03-01): add settings sections and fields with German labels
- Three sections: Email, Captcha, Form settings
- Email: receiver address field with validation
- Captcha: provider dropdown (none/reCAPTCHA v2/v3/hCaptcha) with dynamic key fields
- Form: thank you URL field
- JavaScript to show/hide captcha keys based on provider selection
- All labels and descriptions in German
2026-01-16 11:46:08 +09:00
e87d974f71 feat(03-01): create settings class with WordPress Settings API
- Settings class with singleton pattern
- Registered 5 settings: receiver_email, captcha_provider, captcha_site_key, captcha_secret_key, thankyou_url
- Proper sanitization callbacks for each setting type
- Helper method get_option() for clean API access
- Integrated with admin menu structure
2026-01-16 11:45:16 +09:00
b62b3467ca docs(03): create phase plan
Phase 03: Settings System
- 1 plan created
- 3 tasks defined
- Ready for execution
2026-01-16 11:38:01 +09:00
4ba0fed007 docs(02-01): complete legacy data extraction plan
- Created 02-01-SUMMARY.md with accomplishments and data breakdown
- Updated STATE.md: Phase 2 complete, progress 29%
- Updated ROADMAP.md: Phase 2 marked complete (1/1 plans)
- All 118 furniture items + 32 additional work fields extracted

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-16 11:34:18 +09:00
4d2a584e08 feat(02-01): extract additional work sections from legacy
- Added 6 additional work sections: Montage, Schrank, Elektriker, Dübelarbeiten, Packarbeiten, Anfahrt
- Each section includes label, fields with type information
- Field types: checkbox, abbau_aufbau, checkbox_anzahl, text
- Total: 32 additional work fields across 6 sections
- Preserves exact field names and structure from legacy

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-16 11:32:56 +09:00
5bb324c4c3 feat(02-01): extract furniture data from legacy into structured class
- Created Umzugsliste_Furniture_Data class with singleton pattern
- Extracted all 118 furniture items from 7 rooms with exact cbm values
- Preserved exact item names and order from legacy liste.php
- Room structure: wohnzimmer (32), schlafzimmer (15), arbeitszimmer (11), bad (3), kueche_esszimmer (18), kinderzimmer (18), keller (21)
- All items have name, cbm (float), and montage (boolean) properties

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-16 11:30:51 +09:00
c4a4727123 docs(02): create phase plan
Phase 02: Legacy Data Extraction
- 1 plan created
- 3 total tasks defined
- Ready for execution
2026-01-16 11:14:19 +09:00
28bcc2b5e2 docs(01-01): complete foundation plan with bug fix
Tasks completed: 3/3 + 1 bug fix
- Create main plugin file with bootstrap code
- Register Custom Post Type for form submissions
- Create admin menu structure
- Fix CPT registration hook timing (bug)

SUMMARY: .planning/phases/01-foundation/01-01-SUMMARY.md
2026-01-16 11:10:10 +09:00