Rename layout-section element to drupal-layout

Created on 20 August 2024, 5 months ago
Updated 9 September 2024, 4 months ago

Motivation

Implement 📌 Consistently prefix components with drupal- Active

📌 Task
Status

Fixed

Version

3.0

Component

Code

Created by

🇦🇹Austria fago Vienna

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

Merge Requests

Comments & Activities

  • Issue created by @fago
  • Merge request !85rename element → (Merged) created by fago
  • Status changed to Needs review 5 months ago
  • 🇦🇹Austria fago Vienna

    created the MR. This is a BC-breaking change, so we should add a change-record.

    I think we even better output elements like "drupal-layout-one-col" or "drupal-layout-two-col". So appending the layout-id would make sense. But unfortunately the layout-ids are not really nice, so we probably would end up with IDs like "drupal-layout-layout-one-col".

    Looking at the code, I think it would make sense to move it into a generator service + to invoke the CE-generator with the render array being $data. Then we have a place where we can improve this + allow contrib to override defaults.

    We could also consider support a special layout definition key, like "custom_element_name" and if it's there we use it, so people defining their own layouts could prefix them nicely with module names while still have short element names. Not sure, that'S needed though.

    Anyway, simply renaming this seems to be a good first step here.

  • 🇸🇮Slovenia useernamee Ljubljana

    Code changes look good and I'd move this ticket into RTBC, however I'm not sure to which code this comment applies:

    Looking at the code, I think it would make sense to move it into a generator service + to invoke the CE-generator with the render array being $data. Then we have a place where we can improve this + allow contrib to override defaults.

    @fago Did you suggest to create a custom elements processor plugin for layout section entity?

  • Assigned to fago
  • 🇸🇮Slovenia useernamee Ljubljana
  • 🇦🇹Austria fago Vienna

    > @fago Did you suggest to create a custom elements processor plugin for layout section entity?

    yes, but that can be a follow-up!

  • Assigned to roderik
  • Status changed to RTBC 5 months ago
  • 🇸🇮Slovenia useernamee Ljubljana

    RTBC. I'm assigning to @roderik to decide when to merge and release.

  • 🇳🇱Netherlands roderik Amsterdam,NL / Budapest,HU

    Reminder to self, to make CR (also for 🐛 drupal prefix is added to configured custom element names Active ).

    Release will be done hopefully very soon.

  • Pipeline finished with Skipped
    5 months ago
    #264263
  • Status changed to Fixed 5 months ago
  • 🇳🇱Netherlands roderik Amsterdam,NL / Budapest,HU

    Created followup Move layout builder code into processor service Active for the idea discussed.

    Created CR. It's very small and I don't think it needs extra info. So, for this time: closing this issue already. (If I see that CRs need more review, I'll change that practice.)

  • Issue was unassigned.
  • 🇳🇱Netherlands roderik Amsterdam,NL / Budapest,HU
  • Automatically closed - issue fixed for 2 weeks with no activity.

Production build 0.71.5 2024