- Issue created by @Wim Leers
- 🇫🇮Finland lauriii Finland
From DX perspective the value of duplicating this information in the config seems questionable. There could be implementation reasons why it's needed but it's hard for me to consider this from that perspective. However, if we do it, we need to somehow allow getting changes to components, as well as the field type + widget settings to the config (if that's what defines what gets used in XB). During development, it seems normal that these values get changed. We have to account for the effort to address that, and the complexity it introduces for us to manage that.
- 🇬🇧United Kingdom catch
However, if we do it, we need to somehow allow getting changes to components, as well as the field type + widget settings to the config (if that's what defines what gets used in XB).
How will that work if there is already data associated with the component in the database?
- 🇧🇪Belgium Wim Leers Ghent 🇧🇪🇪🇺
From DX perspective the value of duplicating this information in the config seems questionable.
It would be transparent towards SDC developers.
We need some record of what exists, is being used, and what the expected shape is. That's necessary for the following product requirements:
1.2 Design systems (foundations)
(nutshell: "which components exist?")14. Configuration management
(nutshell: "changes to components")15. Developer-created components
(nutshell: "easy way to expose components" + "not all SDCs should be exposed automatically")49. Component migration
(nutshell: "change component props and migrate existing content")63. Shared components
(nutshell: "can use the UI to create a component")64. Module shipped no-code components
(nutshell: "build component in UI, export and ship with my module so that consumers can import and edit it")
So as an MVP example, we need to know what props for each component exist and how the Content Creator can populate them. That is some sort of state. That state must remain in sync with the code base. That's why configuration is the most natural choice to track that state: because it already must be kept in sync with the code. Which means that tracking this under the hood in configuration also means there's no new deployment requirements being imposed!
👆 explains the rationale for both 📌 Auto-create/update Component config entities for all discovered SDCs that meet XB's minimum criteria Fixed and this issue.
But I do recognize the need for a smooth DX! The key thing there though is that not every SDC change is equal:
- The above already works fine with deployment
- You're worried about front-end developer-created/modified SDCs not taking effect. For that, the solution is: #3463999-9: [PP-1] Auto-generate Component config entities for all discovered SDCs that meet XB's minimum criteria →
- You're worried about SDCs built by the Site Builder through XB's future "Theme Builder" not taking effect. For that, the solution is: selectively update the
ComponentPluginManager
's cache and Twig's cache: the component being edited should have its changes reflected immediately. (And once that component is already being used, no existing properties can be renamed, and no new required properties can be added. For that, we'll need the44. Component usage
product requirement to be solved.)
Related: .
- Status changed to Postponed
about 1 month ago 10:37am 2 August 2024 - 🇧🇪Belgium Wim Leers Ghent 🇧🇪🇪🇺
Actually, as of 📌 [PP-2] Add ComponentAuditabilityTest Active , that earlier issue would already unblock this 👍
- 🇧🇪Belgium Wim Leers Ghent 🇧🇪🇪🇺
📌 Introduce `hook_storable_prop_shape_alter()`, use it to prefer the Media Library widget for "image" PropShape if Media Library is installed Fixed is in! 🚀
Because that added both an alter hook and a concrete implementation (
media_library_storage_prop_shape_alter()
), the status with initially NOT the Media Library module installed, and then WITH that module installed, will cause configuration changes … at least once 📌 Auto-create/update Component config entities for all discovered SDCs that meet XB's minimum criteria Fixed lands.That means this will for sure be unblocked by #3463999 👍
I.e. this is no longer blocked by 📌 [PP-1] Introduce `FieldTypeStorageForJsonSchemaDefinition` plugin type Postponed !
- 🇧🇪Belgium Wim Leers Ghent 🇧🇪🇪🇺
📌 Auto-create/update Component config entities for all discovered SDCs that meet XB's minimum criteria Fixed landed weeks ago.
I think that now it makes sense to wait for 📌 [PP-2] Add ComponentAuditabilityTest Active , which will introduce part of what this aims to address: the beginnings of a UI that allows auditing what components are available in XB or not, and if not: why not.