- Issue created by @larowlan
- 🇧🇪Belgium wim leers Ghent 🇧🇪🇪🇺
📌 Maintain a per-component set of prop expressions/sources Active landed.
- 🇦🇺Australia larowlan 🇦🇺🏝.au GMT+10
Can I suggest something other than propSources - we'll likely want to ship jsonSchema for block components - and currently this sits under field_data.
Or if we rename it to propSources, can we move the schema elsewhere?
- 🇧🇪Belgium wim leers Ghent 🇧🇪🇪🇺
Or if we rename it to propSources, can we move the schema elsewhere?
I think this makes more sense?
Block
Components
useexport interface SimpleComponent {
on the client side, and they don't have this either. And 📌 [PP-1] Implement client-side validation of block settings Active will want that kind of information for
Block
s.So … expanding
SimpleComponent
with schema information seems sensible to me? 😊 - 🇧🇪Belgium wim leers Ghent 🇧🇪🇪🇺
This information that the server provides to the client is used to power various critical pieces of the XB UI. It merits a higher degree of clarity than it currently has. That absence of clarity is nobody's fault: everything grew organically. But now that we have many things actually working, it makes sense to increase clarity.
- 🇧🇪Belgium wim leers Ghent 🇧🇪🇪🇺
IOW, this is the goal:
diff --git a/openapi.yml b/openapi.yml index abf9473ad..f6668fda9 100644 --- a/openapi.yml +++ b/openapi.yml @@ -1176,7 +1176,7 @@ components: metadata: type: object description: SDC metadata - field_data: + propSources: type: object description: the StaticPropSources to use for each SDC prop # Keys are props for this SDC. Only required SDC props are required here. diff --git a/ui/src/types/Component.ts b/ui/src/types/Component.ts index 9680d4e38..4513294a4 100644 --- a/ui/src/types/Component.ts +++ b/ui/src/types/Component.ts @@ -57,8 +57,7 @@ export interface JSComponent extends BaseComponent { // PropSourceComponent Interface export interface PropSourceComponent extends BaseComponent { library: 'elements' | 'extension_components'; - // @todo rename this to propSources - https://www.drupal.org/project/experience_builder/issues/3504421 - field_data: FieldData; + propSources: FieldData; metadata: { slots?: { [key: string]: {
… plus anything else that needs changing because of that.
- Merge request !842Issue #3504421: Renamed `PropSourceComponent.field_data` to `.propSources`. → (Merged) created by meghasharma
- 🇮🇳India meghasharma
Renamed `PropSourceComponent.field_data` to `.propSources`.
- 🇧🇪Belgium wim leers Ghent 🇧🇪🇪🇺
Left a hint for what change is missing here :)
- 🇧🇪Belgium wim leers Ghent 🇧🇪🇪🇺
(The original intent for this issue was to only clean up the client side, but it totally makes sense to update the server side too — the server side should present data to the client on the client's terms — see
docs/adr/0005-Keep-the-front-end-simple.md
😄 - 🇮🇳India sandip
Thanks @wim leers, for the correction. Thanks @meghasharma, for the update. Now it needs just little change in
jsonSchema: $client_side_info['field_data'][$prop]['jsonSchema']
, and\assert(isset($client_side_info['field_data'][$prop]['jsonSchema']));
. I am working on it. - 🇧🇪Belgium wim leers Ghent 🇧🇪🇪🇺
Back-end parts look great — thanks!
I'll let @larowlan review the front-end parts :)
- Status changed to Needs work
17 days ago 1:21am 29 April 2025 - 🇦🇺Australia larowlan 🇦🇺🏝.au GMT+10
Needs reroll and there are some out of scope changes, but other than that looks good to me.
Sorry I didn't realise this was assigned to me. - 🇧🇪Belgium wim leers Ghent 🇧🇪🇪🇺
Looking good! Quite a few e2e tests failed though. Re-running those. 🤞
-
wim leers →
committed e8882c79 on 0.x authored by
meghasharma →
Issue #3504421 by sandip, meghasharma, wim leers, larowlan: Rename `...
-
wim leers →
committed e8882c79 on 0.x authored by
meghasharma →
Automatically closed - issue fixed for 2 weeks with no activity.