Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

fago created an issue. See original summary.

fago’s picture

Status: Active » Needs review

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.

useernamee’s picture

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?

useernamee’s picture

Assigned: Unassigned » fago
fago’s picture

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

yes, but that can be a follow-up!

useernamee’s picture

Assigned: fago » roderik
Status: Needs review » Reviewed & tested by the community

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

roderik’s picture

Reminder to self, to make CR (also for #3449151: Improve custom-element default names for entiteis).

Release will be done hopefully very soon.

  • roderik committed c6a12884 on 3.x authored by fago
    Issue #3469268 by fago, useernamee: Rename layout-section element to...
roderik’s picture

Status: Reviewed & tested by the community » Fixed

Created followup #3470343: Move layout builder code into processor service for the idea discussed.

Created CR https://www.drupal.org/node/3470342. 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.)

roderik’s picture

Assigned: roderik » Unassigned

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.