Todos

There are some things that needs improvement still:
- Merge CustomElementsEntityDisplayFormBase into EntityCustomElementsDisplayEditForm
- Empty plugin settings forms should not see a "settingsForm" edit icon
- Fix editing keys and pressing save bug

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

Title: Improve entity display editing » Improve entity display editing UI
fago’s picture

checkbox: "Force rendering as custom element"

fago’s picture

ok, I worked over the checkbox labelling and logic, please see
https://git.drupalcode.org/project/custom_elements/-/merge_requests/55/d...
I think we can merge this is as a first step.

> - Fix editing keys and pressing save bug

I took a quick look at this. This is not as simple as I hoped it is. Turns out there is some complex ajax-refresh logic going on, which is handled/implemented by the attached JS library "field_ui.js" ($form['#attached']['library'][] = 'field_ui/drupal.field_ui'). It seems this JS is atm necessary to handle updates of the region field when elements are moved into "hidden" and back to "content" region. This JS also somehow takes care of changing the submitted POST data to incude the "name" field. Let's create a follow-up.

let's also check whether we can drop this:
* \Drupal\custom_elements_ui\Plugin\Derivative\CustomElementsUiLocalTask::alterLocalTasks
* custom_elements_ui_local_tasks_alter()
seems unneeded to me.

fago’s picture

  • fago committed 2d89db3e on 3.x
    Issue #3446302 by fago: Improve checkbox to take over entity rendering.
    

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

junkuncz’s picture

Okay I'll do the class merge.

Regarding the local tasks: looks like unfortunately we cannot drop out that hook at
https://git.drupalcode.org/project/views_local_tasks/-/blob/1.0.x/views_...
https://git.drupalcode.org/project/custom_elements/-/blob/3.x/modules/cu...

It's weird but probably there is no better way atm.

junkuncz’s picture

Assigned: Unassigned » junkuncz
Status: Active » Needs work

junkuncz’s picture

Assigned: junkuncz » Unassigned
Status: Needs work » Needs review

  • fago committed 4da2b1e9 on 3.x authored by junkuncz
    Issue #3446302 by junkuncz: Refactor to remove...
fago’s picture

Status: Needs review » Needs work

thanks, works well, merged. thus, this point is still open, right?

- Empty plugin settings forms should not see a "settingsForm" edit icon

junkuncz’s picture

Status: Needs work » Needs review
junkuncz’s picture

DONE:
- empty plugin settings forms should not see a "settingsForm" edit icon
- hide "extra fields" on EntityCustomElementsDisplayEditForm
- move some logic from buildForm() to form() (it was a debt from an earlier MR)
- a few tiny code clean-up

roderik’s picture

Oops - mismatching availability may mean this waits until Thursday before I merge this -- because I had a question about the "Empty plugin settings forms should not see a "settingsForm" edit icon".

I guess that's fine though.

roderik’s picture

Status: Needs review » Needs work

Pushed inconsequential commit to this issue -- only to prevent merge conflicts (that would have occurred if I pushed it elsewhere)

roderik’s picture

Status: Needs work » Needs review

  • roderik committed aa717899 on 3.x authored by junkuncz
    Issue #3446302 by junkuncz, fago: Improve entity display editing UI
    
roderik’s picture

Status: Needs review » Fixed

Fixed, thanks!

fago’s picture

Thanks for bringing this home! When reviewing changes, I found an issue with it though. Created #3447556: Entity-CE-Display form sometimes displays form buttons for empty forms.

Status: Fixed » Closed (fixed)

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