Problem/Motivation

I would like to be able to select a reference to my entity directly from the layout configuration field layout

like this
like

Proposed resolution

Create context resolver for loading entity and bundle so that the reference fields can then be selected in the administration panel.

CommentFileSizeAuthor
like.png31.07 KBanwoon
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

anwoon created an issue. See original summary.

anwoon’s picture

Issue summary: View changes

anwoon’s picture

Status: Active » Needs review
anwoon’s picture

Issue summary: View changes
just_like_good_vibes’s picture

Status: Needs review » Needs work

Hello,
thank you for reporting this and proposing code.
would you please fix the MR to be green so we could make a review?
eventually also, if you have time, please provide one or more basic automatic tests.
thank you

anwoon’s picture

the pipeline failed by git at upload artefact https://git.drupalcode.org/issue/ui_patterns-3560994/-/jobs/7519212 i don't see any errors

pdureau’s picture

hi @anwoon, the pipele is green now 👍 Is this ticket now in review?

Also, @just_like_good_vibes, I am currently working on #3540247: Tidy source contexts and we will need to check how this proposal fits with the plan where both ui_patterns:form_state context and ContextEntityResolverInterface may be removed. To be sure we will not break the current proposal, we will need a dedicated test.