RFC: Decoupling inspector editors from the inspector

Inspector editors are a very nice set of input elements, packed with validation and nice configuration format. But currently it’s implemented in a way that it’s not possible to reuse them in other parts of Neos UI, thus refactoring should be considered.

Places where editors could be used:

  • Inspector (of course)
  • Inline editing (inline datepicker, or image picker)
  • Structured editing
  • Node creation wizard
  • Possibly even in custom backend modules (should there be a set of Fluid VH’s for them?)

Thus the editors must be decoupled from inspector to be easily reusable in a generic way.

The plan:

  • Editors should be moved to some shared location, e.g. Shared/Editors from Content/Inspector/Editors
  • Validation logic needs to be refactored and put in abstract editor class (guess what, now it resides in NodeSelection.js…)
  • Logic of adding defaults for the editor options now resides in NodeTypeConfigurationEnrichmentAspect and should be abstracted away from inspector too. Possibly it should be moved elsewhere, but @christianm has something to say about it
  • Some editors have a hard dependency on inspector, and don’t make sense outside of it (e.g. NodeTypeEditor). How do we go about them?
  • Probably a lot more to do. Will update this post when I discover more stuff.

I would really appreciate some guidance on this refactoring, as it is HUGE : )

2 Likes