# WooNooW Page Editor v1.0 - Release Notes ## Summary This release implements comprehensive improvements to the WooNooW Page Editor system, focusing on WYSIWYG consistency between the admin editor canvas and frontend rendering, improved SSR coverage for SEO, and robust backward compatibility with legacy structures. --- ## Key Improvements ### 1. Canonical Section Schema **What changed:** - Unified section schema definition in `admin-spa/src/routes/Appearance/Pages/schema/sectionSchema.ts` - Normalized `feature-grid` to use `items` prop (not `features`) - Standardized default values across all section types **Why it matters:** - Single source of truth for section types, prop names, and defaults - Consistent naming eliminates `items` vs `features` confusion - Easier maintenance and extension of new section types **Files affected:** - `admin-spa/src/routes/Appearance/Pages/schema/sectionSchema.ts` - `admin-spa/src/routes/Appearance/Pages/store/usePageEditorStore.ts` - `admin-spa/src/routes/Appearance/Pages/components/CanvasRenderer.tsx` --- ### 2. Enhanced PHP SSR with Full Style Support **What changed:** - All section renderers now support section styles: background, gradient, images, overlay, padding, content width, height presets - Hero, Content, Image+Text, Feature Grid, CTA Banner, Contact Form, Bento Grid, Product Carousel, Shoppable Image, and Marquee Banner all render with full style parity **Why it matters:** - Bots now see the same styled content as human visitors - Better SEO with proper semantic HTML and styling - Consistent experience across all section types **Files affected:** - `includes/Frontend/PageSSR.php` --- ### 3. Dynamic Source Resolution Architecture **What changed:** - Moved complex dynamic resolution from controller to `PlaceholderRenderer` - Added typed output contracts (scalar, html, url, array) - Added explicit fallback behavior for empty/invalid dynamic sources - Added caching for post data resolution **Why it matters:** - `related_posts` special-casing removed from controller - Consistent handling of all dynamic sources - Better fallback UX when sources resolve to empty **Files affected:** - `includes/Frontend/PlaceholderRenderer.php` - `includes/Api/PagesController.php` --- ### 4. Schema Migration System **What changed:** - New `SchemaMigration` class handles backward compatibility - Automatic migration of legacy structures on read - Schema versioning (`schemaVersion`) tracking **Why it matters:** - Legacy pages/templates with `features` key automatically normalized to `items` - Old style keys (`container_width`, `height`) normalized to new keys (`contentWidth`, `heightPreset`) - Zero breaking changes for existing content **Files affected:** - `includes/Frontend/SchemaMigration.php` - `includes/Api/PagesController.php` --- ### 5. Feature Flags for Safe Rollout **What changed:** - New `Features` class for feature toggles - Default flags: `dynamic_preview`, `schema_v1`, `enhanced_ssr`, `placeholder_cache` - Per-user override support for testing **Why it matters:** - Staged rollout capability for new features - Easy rollback if issues arise - Admin control over feature enablement **Files affected:** - `includes/Features.php` --- ## Test Coverage ### New Test Files | Test File | Coverage | |-----------|----------| | `tests/SchemaMigrationTest.php` | Migration of legacy structures, feature-grid normalization, style key conversions | | `tests/PlaceholderRendererTest.php` | Dynamic source resolution, typed output contracts, fallback behavior | | `tests/PageSSRTest.php` | All section renderers, resolve_props(), HTML output validation | | `tests/schema-integration.test.ts` | TypeScript schema validation, canvas prop flattening | | `tests/feature-grid-regression.test.ts` | items/features naming, default values, style keys regression | | `tests/parity.test.ts` | React vs SSR content parity, CSS class matching, color scheme parity | ### CI Guardrails - `scripts/check-schema-drift.mjs` - Validates schema consistency between TypeScript and PHP ### Verification Checklist - `tests/VERIFICATION_CHECKLIST.md` - Pre-flight checks and manual verification procedures --- ## Migration Guide ### For Existing Installations **No action required.** All existing pages and templates will be automatically migrated on first access: - `features` → `items` normalization - `container_width` → `contentWidth` normalization - `height` → `heightPreset` normalization - `backgroundType` defaults added ### For Custom Code If you have custom code referencing section props: - Replace `section.props.features` with `section.props.items` for feature-grid sections - Replace `section.styles.container_width` with `section.styles.contentWidth` - Replace `section.styles.height` with `section.styles.heightPreset` --- ## Breaking Changes **None.** This release maintains full backward compatibility. --- ## Deprecations The following are deprecated and will be removed in a future version: | Deprecated | Replacement | Estimated Removal | |------------|-------------|-------------------| | `features` prop on feature-grid | `items` | v2.0 | | `container_width` style | `contentWidth` | v2.0 | | `height` style | `heightPreset` | v2.0 | | Generic `render_generic()` fallback | Explicit section renderers | v2.0 | --- ## Support & Documentation - Internal support playbook: See project documentation - Schema contract: `project_info__1.md` - Test fixtures: `tests/fixtures/page-editor/` --- ## Contributors This release implements the work planned in the Page Editor audit and consistency improvements.