- Issue created by @f.mazeikis
- 🇧🇪Belgium wim leers Ghent 🇧🇪🇪🇺
@tedbow added
ClientServerConversionTrait
in ✨ AutoSave Entity Revision POC Active .I know that @larowlan has a clear idea in his head for how we should approach this. (In another issue I commented in the past hour he was talking about a PHP value object to contain the client-side data model — but I can't find it now 😭)
Alternatively, I could imagine
::toClientSideRepresentation(): ClientSide
and::fromClientSideRepresentation(ClientSide $representation)
being added to:ComponentTreeItem
PageTemplate
Pattern
- …
… and for them to share common logic using a trait.
I'm curious what @larowlan thinks 😊
- 🇧🇪Belgium wim leers Ghent 🇧🇪🇪🇺
@larowlan: perhaps you think we should close this in favor of 📌 Add a param converter and DTO for XB data model Active ? :)
- 🇧🇪Belgium wim leers Ghent 🇧🇪🇪🇺
While working on 📌 Improve or remove ComponentSourceInterface::getClientSideInfo() Active , it became clear that a related challenge appeared there, which relates closely to what I wrote in #2. See https://git.drupalcode.org/issue/experience_builder-3484678/-/tree/34846..., described in #3484678-20: Improve or remove ComponentSourceInterface::getClientSideInfo() → , @larowlan 🤓
- 🇧🇪Belgium wim leers Ghent 🇧🇪🇪🇺
ClientSideRepresentation
landed in 📌 Improve or remove ComponentSourceInterface::getClientSideInfo() Active , but it's kinda like JSON:API'sCacheableNormalization
.It's not doing the much more advanced transformation that this issue is suggesting/implying. But … I'd definitely be interested in seeing it evolve towards that.
Curious to read @larowlan's thoughts!
- 🇦🇺Australia larowlan 🇦🇺🏝.au GMT+10
Needed more of this in 📌 Support server side massage and validation of component prop form values Active
- 🇦🇺Australia larowlan 🇦🇺🏝.au GMT+10
There were 2 methods in ApiLayoutController that had '@todo make this a trait' pointing here.
I ended up making them a trait to share with ApiPreviewController, but I like your proposal on the issue to make it one controller. - Assigned to larowlan
- Status changed to Postponed
3 months ago 12:46am 16 May 2025 - 🇦🇺Australia larowlan 🇦🇺🏝.au GMT+10
Doing this in 📌 [PP-1] Consider not storing the ComponentTreeStructure data type as a JSON blob Postponed because rewriting the same thing twice for the new data is naff
- 🇧🇪Belgium wim leers Ghent 🇧🇪🇪🇺
Reviewing 📌 [PP-1] Consider not storing the ComponentTreeStructure data type as a JSON blob Postponed right now, updating this issue's title to reflect direction.
- Issue was unassigned.
- Status changed to Active
5 days ago 7:50pm 11 August 2025