Problem/Motivation

We want to customize our "section" add button at a specific entity bundle. Right now, the only way to do this is loading the layout from the temp storage and then check to which entity it belongs to.
The problem is, this is not effective, and especially if there are many components in the actual field, the query and the unserializing of the data can eat up more 80% of the page delivery time.

Proposed resolution

Provide more info in the layout_paragraphs_insert_component_btn theme function, especially about the host entity and the host field.

Remaining tasks

User interface changes

Nothing.

API changes

Nothing.

Data model changes

Nothing.

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

huzooka created an issue. See original summary.

huzooka’s picture

Assigned: huzooka » Unassigned
Status: Active » Needs review

One MR for LP v2, another for LP v3.

PHPStan issues and Cypress test failure are unrelated.
No automated tests were provided.

alorenc’s picture

Assigned: Unassigned » alorenc
alorenc’s picture

Assigned: alorenc » Unassigned
Status: Needs review » Reviewed & tested by the community

The patch allows us to customize the code without using TempStore.

justin2pin made their first commit to this issue’s fork.

alorenc’s picture

Can this be merged into 3.0.x?