Overview
Flex Builder (src/Core/Theme/Parts + src/Plugins/flextheme) is the visual layout builder for headers (header), footers (footer), and page sections (section) in Domain-System. It uses a single compilation pipeline to guarantee pixel parity between the live Studio editor and the published storefront.
Key Capabilities
- Single Compilation Pipeline (
ThemePartCompilerInterface): Both Studio Live Preview and frontend rendering share the exact same compiler. - Pre-Save Structural Validation (
ThemePartValidatorInterface): Validates part types, grid presets, and block part-type compatibility (getAllowedPartTypes()) before persisting changes. - 4-Breakpoint Responsive Visibility with Auto-Reflow: Per-element visibility toggles across Desktop (100%), Laptop (1024px), Tablet (768px), and Mobile (375px). Empty columns automatically collapse and redistribute CSS Grid columns.
- Hierarchical Menus & Mobile Drawer (
ds-mobile-drawer): Horizontal drag-and-drop submenu nesting and 8 customizable hamburger toggle styles. - Native Theme Isolation (
"flex_builder": false): Dedicated e-commerce themes (such asrachidd_storein DomainDrop) that use their own native headers and footers are automatically isolated viaThemeDiscoveryService::supportsFlexBuilder(), displaying a clear notice inside the Flex Builder editor.
Extending with BlockProviderInterface
Plugins can register custom visual blocks into Flex Builder without modifying the core by implementing BlockInterface and BlockProviderInterface (such as DropshipShowcaseBlock in DomainDrop).