Skip to content

!!! FEATURE: Refactor for usage beyond fusion especially CPX#233

Draft
mficzel wants to merge 18 commits intomainfrom
task/refactorToEnableUseCasesBeyondFusion
Draft

!!! FEATURE: Refactor for usage beyond fusion especially CPX#233
mficzel wants to merge 18 commits intomainfrom
task/refactorToEnableUseCasesBeyondFusion

Conversation

@mficzel
Copy link
Member

@mficzel mficzel commented Dec 19, 2025

The direct handling of the styleguide is movef into new interfaces to allow additional usecases beyond fusion.

The allows to remove the dependency to fusion and only use the fusion classes when present from the NepsFusionSiteStyleguideProvider. This should allow using Monocle without Fusion and even without Neos.

Changed:

Added:

  • StyleguideProviderInterface and StyleguideInterface
  • CpxPackageStyleguideProvider and CpxPackageStyleguide

Removed Features:

  • Info Tabs (Code, Anatomy, Description)
  • Sitegeist.Monocle:CanRender
  • Sitegeist.Monocle:DataUri
  • Sitegeist.Monocle:MirrorUri

CPX Usage

Obviously to use monocle with CPX you have to install. It monocle does not declare Cpx as a dependency as it will only be used when present.

Configuration:

Sitegeist:
  Monocle:
    
  # address for the primary styleguide if none is given the first one is used
  defaultStyleguide: CpxPackage::Vendor.Site

  # configuration for the various styleguides, the styleguide address is used as key
  styleguides:
    'CpxPackage::Vendor.Site':
      test: foo
      preview:
       component: Test.Cpx1/Page/Page.cpx

Components and Props

The styleguide will render all items that have a __name__.styleguide.yaml alongside the cpx.file. The content of this file contains the styleguide annotations witj. props, propSets and useCases.

title: Composite

# the default props
props:

  # simple props are taken directly from yaml
  title: "Hello"
  subtitle: "World"

  # components are specified as an array with the keys `component` and `props`
  content:
    component: Vendor.Site/Text/Text.cpx
    props:
      content: "Lorem ipsum"
      
   # backed enums are converted from the props
   variant : "speciaö"

# containers get wrap the rendered component
# they are a component themselves and take the component as `content`
container: 
  component: Vendor.Site/Container/Container.cpx
 
# prop sets are merged with default props
propSets: 
   small: 
      title: "another Title"
      
      
# use cases override default props and containers
useCases: 
  special:
    container: 
    props: 
        title: "very different" 
        ...

Todos:

  • Restore handling of props, propSets etc on the fusion side
  • Cleanup
  • PhpStan
  • Tests
  • Grid has to move to monocle ui
  • Monocle UI should be able to handle component ids with /

@mficzel mficzel marked this pull request as draft December 19, 2025 15:27
@mficzel mficzel changed the title TASK: Refactor to enable use cases beyond fusion TASK: Refactor to enable use cases beyond fusion especially cpx Dec 19, 2025
@mficzel mficzel changed the title TASK: Refactor to enable use cases beyond fusion especially cpx TASK: Refactor for usage beyond fusion especially CPX Dec 19, 2025
@mficzel mficzel changed the title TASK: Refactor for usage beyond fusion especially CPX !!! FEATURE: Refactor for usage beyond fusion especially CPX Dec 19, 2025
@mficzel mficzel force-pushed the task/refactorToEnableUseCasesBeyondFusion branch from e0184fe to a9cdb32 Compare December 19, 2025 16:54
@mficzel mficzel force-pushed the task/refactorToEnableUseCasesBeyondFusion branch from 1164ae9 to 254179d Compare January 14, 2026 17:48
@mficzel mficzel force-pushed the task/refactorToEnableUseCasesBeyondFusion branch from 66f0566 to abc23ca Compare January 27, 2026 14:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant