- Issue was unassigned.
- π«π·France pdureau Paris
We need to rethink the "drilling" without breaking compatibility (we stay in 1.x)
Because they are 2 issues:
- First, the wrapping happens to early, instead of first looking down the render tree.
- Second, the current implementation shows our lesser knowledge of the Render API 4 years ago. We are better and more confident now.
)
1. Let's create a lot of unit test with various render tree. Some will be OK with current codebase, they are the regression we want to avoid. Some will be KO with the current codebase, they are the improvements we want to achieve.
2. Let's implement a recursive function which is drilling/digging the render tree to find a renderable (or a list of renderables, like we already do for in UI Patterns ) which accept an attribute object. If none is found, we go back to the top of tree and we add the wrapper.
Doing so, let's find a more elegant and generic way, all in one place :
- Removing the logic from StylePluginManager::addClass() (and maybe removing this method in UI Styles 2.0.0)
- Removing the StylePluginManager::addStyleToBlockContent() method
- Removing the StylePluginManager::addStyleToFieldFormatterItems() method
- First commit to issue fork.
- π·πΊRussia lexbritvin
Reworked the drilling.
We lack some Functional tests for the fixed case when we have block layout builder with multiple sections. - Status changed to Needs work
19 days ago 10:03pm 8 June 2024