[2.0.x] Ensure using always the "replaced " component structure

Created on 7 May 2025, 8 days ago

Problem/Motivation

The "replace" replaces a existing component inside the find method. Layout builder and library using the plugin definition instead the replaced plugin. This leads to wrong slots/props in layout builder and library.

Feature request
Status

Active

Version

2.0

Component

Code

Created by

🇩🇪Germany Christian.wiedemann

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

  • Issue created by @Christian.wiedemann
  • 🇩🇪Germany Christian.wiedemann

    Can you check this if the behavior is right now. Now the component with "replaces" inside is taken into account for building slots and props in layout builder and library. But still both component appears. Is this right?

  • 🇫🇷France pdureau Paris

    I think we need to leverage this Core issue SDC: Add a method to retrieve only components not replaced by others Needs work to:

    • show all components in the component library (ui_patterns_library)
    • but only the non-replaced components:
      • in the components selector (ui_patterns) when #render_slots is true
      • in specific integration when #render_slots is false (so in ui_patterns_layouts)

    If we don't want to wait for the Core issue to be fixed, let's accelerate it and make a compatible change while waiting.

    Don't you think?

  • 🇩🇪Germany Christian.wiedemann

    Yes you are right but I think we should also hide the component in the library.

  • 🇩🇪Germany Christian.wiedemann

    So I hide the components with a "replaces" from component selector / Layout and UIP UI. Inside the library it is a bit more complicated. Right now both components are visible but htis does not make sense from my point of view.

    We should also hide the "replaces" component and inside the single view of the component we should switch from "replaces" to "Replaced by". Good?

  • 🇫🇷France pdureau Paris

    Yes you are right but I think we should also hide the component in the library.

    I don't have strong opinion about this. So, let's do as you want or let's ask the team.

    We should also hide the "replaces" component and inside the single view of the component we should switch from "replaces" to "Replaced by". Good?

    We must hide the replaced component and show only the replacing component, right? So what would be the use of showing "Replaced by" info in replaced components?

Production build 0.71.5 2024