update
This commit is contained in:
120
.paul/phases/01-acf-migration-2707/01-01-SUMMARY.md
Normal file
120
.paul/phases/01-acf-migration-2707/01-01-SUMMARY.md
Normal file
@@ -0,0 +1,120 @@
|
||||
---
|
||||
phase: 01-acf-migration-2707
|
||||
plan: 01
|
||||
subsystem: ui
|
||||
tags: [wordpress, acf, flexible-content, php, migration]
|
||||
|
||||
requires:
|
||||
- phase: none
|
||||
provides: n/a
|
||||
provides:
|
||||
- ACF Flexible Content integration for page 2707
|
||||
- collaboration_steps ACF layout (reusable)
|
||||
- Migration script pattern for future pages
|
||||
affects: [02-acf-migration-2598, 03-acf-migration-2101]
|
||||
|
||||
tech-stack:
|
||||
added: []
|
||||
patterns: [acf-flexible-content-migration, one-time-php-migration-script]
|
||||
|
||||
key-files:
|
||||
created:
|
||||
- wp-content/themes/ostal_WP/template-parts/sections/section-collaboration-steps.php
|
||||
- wp-content/themes/ostal_WP/migrate-2707.php
|
||||
modified:
|
||||
- wp-content/themes/ostal_WP/sections.php
|
||||
- wp-content/themes/ostal_WP/page-2707.php
|
||||
- wp-content/themes/ostal_WP/template-parts/sections/section-hero-with-form.php
|
||||
- wp-content/themes/ostal_WP/css/custom.css
|
||||
- wp-content/themes/ostal_WP/acf-json/group_6494221367141.json
|
||||
|
||||
key-decisions:
|
||||
- "Hero text field: changed <p> to <div> wrapper to support multi-paragraph WYSIWYG content"
|
||||
- "Migration approach: one-time PHP script using update_field() instead of manual WP admin entry"
|
||||
- "ACF JSON: added collaboration_steps layout directly to JSON sync file"
|
||||
|
||||
patterns-established:
|
||||
- "ACF migration: create migrate-XXXX.php script with safety checks, run once, delete after"
|
||||
- "New layouts: add to both sections.php dispatcher AND acf-json group file"
|
||||
|
||||
duration: ~45min
|
||||
started: 2026-04-11
|
||||
completed: 2026-04-11
|
||||
---
|
||||
|
||||
# Phase 1 Plan 01: ACF Migration page-2707 Summary
|
||||
|
||||
**Migrated hardcoded "Ogrody zimowe" page (2707) to ACF Flexible Content with 10 layouts and auto-populated content via migration script.**
|
||||
|
||||
## Acceptance Criteria Results
|
||||
|
||||
| Criterion | Status | Notes |
|
||||
|-----------|--------|-------|
|
||||
| AC-1: Flexible Content dispatcher complete | Pass | 3 new layouts added to sections.php (hero_with_form, gallery, collaboration_steps) |
|
||||
| AC-2: Collaboration steps layout works | Pass | New partial renders numbered steps with repeater, hover effects, responsive CSS |
|
||||
| AC-3: Page 2707 uses Flexible Content | Pass | Page reduced to 3 lines (header + sections + footer) |
|
||||
| AC-4: Migration script populates content | Pass | All 10 layouts populated programmatically, user verified |
|
||||
|
||||
## Accomplishments
|
||||
|
||||
- Page 2707 fully editable from WP admin (10 ACF Flexible Content layouts)
|
||||
- New reusable `collaboration_steps` layout with ACF field group definition in JSON
|
||||
- Migration script pattern established for future page migrations (2598, 2101)
|
||||
|
||||
## Files Created/Modified
|
||||
|
||||
| File | Change | Purpose |
|
||||
|------|--------|---------|
|
||||
| `sections.php` | Modified | Added 3 layout dispatchers (hero_with_form, gallery, collaboration_steps) |
|
||||
| `page-2707.php` | Modified | Replaced ~225 lines of hardcoded content with 3-line Flexible Content loader |
|
||||
| `section-collaboration-steps.php` | Created | New partial for numbered cooperation steps with repeater |
|
||||
| `migrate-2707.php` | Created | One-time migration script populating all 10 layouts (TO DELETE) |
|
||||
| `section-hero-with-form.php` | Modified | Changed `<p>` to `<div>` for multi-paragraph WYSIWYG support |
|
||||
| `custom.css` | Modified | Added darker gradient overlay on hero for page 2707 |
|
||||
| `group_6494221367141.json` | Modified | Added collaboration_steps layout definition to ACF JSON sync |
|
||||
|
||||
## Deviations from Plan
|
||||
|
||||
### Summary
|
||||
|
||||
| Type | Count | Impact |
|
||||
|------|-------|--------|
|
||||
| Auto-fixed | 3 | Essential fixes for visual fidelity |
|
||||
| Deferred | 0 | — |
|
||||
|
||||
### Auto-fixed Issues
|
||||
|
||||
**1. Hero text rendering broken (nested `<p>` tags)**
|
||||
- Found during: Checkpoint verification
|
||||
- Issue: Template wrapped text in `<p>`, WYSIWYG content also had `<p>` tags — browsers broke layout
|
||||
- Fix: Changed `<p class="hero-text">` to `<div class="hero-text">` in section-hero-with-form.php
|
||||
- Verification: User confirmed hero displays correctly
|
||||
|
||||
**2. Hero background too bright for text readability**
|
||||
- Found during: Checkpoint verification
|
||||
- Issue: White text on light background image had poor contrast
|
||||
- Fix: Added `body.page-id-2707 .hero-with-form .bg-filter` rule with darker gradient (55% → 25% opacity)
|
||||
- Verification: User confirmed "Jest ok"
|
||||
|
||||
**3. Layout 3 column order incorrect**
|
||||
- Found during: Checkpoint verification
|
||||
- Issue: "Co wyróżnia" section had image-left layout, user wanted text-left/image-right
|
||||
- Fix: Removed `imageLeft` class from layout 3 in migration script
|
||||
- Verification: User confirmed correct order
|
||||
|
||||
## Next Phase Readiness
|
||||
|
||||
**Ready:**
|
||||
- Migration pattern proven — same approach applies to page-2598 and page-2101
|
||||
- All existing ACF layouts verified working (two_col, two_col_with_bg, hero_with_form, gallery)
|
||||
- collaboration_steps layout reusable for page-2598 (which has identical section)
|
||||
|
||||
**Concerns:**
|
||||
- `migrate-2707.php` must be deleted from server after verification (security risk)
|
||||
- Gallery images require attachment IDs — if images aren't in Media Library, they won't appear
|
||||
|
||||
**Blockers:** None
|
||||
|
||||
---
|
||||
*Phase: 01-acf-migration-2707, Plan: 01*
|
||||
*Completed: 2026-04-11*
|
||||
Reference in New Issue
Block a user