Don't rerender the islands which stay the same
When a request is sent from an interactive view panel (for example, if we move an instance in Builder, Layers or Tree panels; if we change the settings in InstanceForm), the HTMX response has OOB-Swap also to replace content in this panel.
It seems useless to replace something already in the right state, and it add weight to the HTTP Response body and one swap more for HTMX.
Can we skip it? We may need to add a triggering_panel value in the HTTP Request.
Don't trigger useless "move" requests
If we drag a source to the same slot, same position, the set (instance, slot, position) will be the same, nothing will change in the StateManager, so we don't need to trigger the HTTP request.
Don' forget to do the same for the root dropzone.
Moved to its own issue: #3544361: Don't trigger useless "move" requests
Issue fork display_builder-3531269
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
Comment #2
pdureau commentedComment #3
pdureau commentedComment #4
mogtofu33 commentedComment #5
mogtofu33 commentedComment #6
pdureau commentedThis may also help the use of
iframeinbuilderand preview panelsComment #7
pdureau commentedComment #8
pdureau commentedLet's go
Comment #9
pdureau commentedThis may also the opportunity of tidying ApiController:
updateandthirdPartySettingsUpdate?Comment #10
pdureau commentedSo, when do we want to block refresh:
BuilderPanel&LayersPanel:onRootDropandonSlotDrop, but only on move (because we need the refresh to get the placeholder replacement when on add)InstanceFormPanel:onInstanceFormChangeandonInstanceUpdateButtonClickOther islands triggering HTMX events but which needs to be refreshed:
Those islands don't trigger events:
Comment #11
pdureau commentedComment #12
pdureau commentedComment #13
pdureau commentedWe will also do those non-relaetd tasks:
readonlykeywords to HistoryStepComment #15
pdureau commentedComment #16
pdureau commentedMaybe the opportunity of little clean-up
Comment #17
pdureau commented2 things to be careful about:
if there is any doubt, let's revert it and move the change to a dedicated issue
If we merge it like that, here is the related Dev Tools issue: #3544616: Follow IslandEventSubscriberInterface::onUpdate() changed
Comment #19
pdureau commentedComment #21
pdureau commented