Closed (fixed)
Project:
Drupal core
Version:
8.6.x-dev
Component:
ajax system
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
21 Jul 2017 at 17:11 UTC
Updated:
15 Sep 2023 at 08:57 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
tedbowPatch with trait from #2830584-120: Use modals for creating, updating, and deleting workflows, with a new DialogFormTrait and #2785047-69: In Outside In mode, form validation messages should appear in the off-canvas tray, not the main page
Added generic tests(originally from Settings Tray) but I think they will fail now.
Comment #4
wim leersClarified IS.
Comment #5
wim leersI'd be forced to repeat all of the review points that @effulgentsia raised at #2896535: Create a helper trait for Forms in ajax dialogs, especially #2896535: Create a helper trait for Forms in ajax dialogs. Which means we're repeating the same discussion we already had.
Either this should be postponed on #2785047: In Outside In mode, form validation messages should appear in the off-canvas tray, not the main page and #2830584: Use modals for creating, updating, and deleting workflows, with a new DialogFormTrait, or those two issues must be closed in favor of this. I'm assuming the former. If it's the latter, then I'll leave it to @tedbow to mark those two issues as duplicates and reopen this.
Comment #7
tim.plunkettThis soft-blocks Layout Builder.
Comment #8
xjm#2830584: Use modals for creating, updating, and deleting workflows, with a new DialogFormTrait is just adding a trait to its own namespace currently. What is the plan WRT the layout builder?
Comment #9
almaudoh commentedJust passing thru, but I couldn't resist...:)
Comment #11
timmillwoodMaybe as a first step we could move
\Drupal\layout_builder\Controller\AjaxHelperTraitto core.Then look at adding items from
\Drupal\layout_builder\Form\AjaxFormHelperTraitand #2830584: Use modals for creating, updating, and deleting workflows, with a new DialogFormTrait in a follow up?Comment #12
timmillwoodHere's a start for that.
I updated the patch in #2830584: Use modals for creating, updating, and deleting workflows, with a new DialogFormTrait so that the trait added there is now just a copy of the two LB traits, which will make the transition easier.
Comment #13
tim.plunkettPlease also remove the @todo in this file that points to this issue :)
Comment #14
timmillwoodLets add
AjaxFormHelperTraitto the patch, and update settings tray to use it.Still todo:
- Make
AjaxHelperTrait::isAjaxless brittle.@tedbow suggested
Comment #15
timmillwoodNeeds work based on the todo in #14 and the change record.
Comment #16
timmillwoodYesterday I started work on #2949991: Add workspace UI in top dialog and quickly found I needed an
isAjax()method, yet again copying the trait from LB. Although this time fully understanding how brittle it is, because I needed to adddrupal_dialog.off_canvas_topto the array of wrapper formats.Comment #17
timmillwoodI've created a change record for this https://www.drupal.org/node/2950404
Comment #18
timmillwoodHere's an update to make
isAjax()less brittle.Comment #19
tim.plunkettShould these still be marked @internal?
The changes to isAjax look good!
Comment #20
tim.plunkett@timmillwood points out that while we can always remove the @internal later, if we remove it now we're stuck. Better safe than sorry, and revisit that after issues like #2830584: Use modals for creating, updating, and deleting workflows, with a new DialogFormTrait and #2949991: Add workspace UI in top dialog land.
Comment #21
alexpottCommitted 9f61972 and pushed to 8.6.x. Thanks!
+1 for leaving internal for now as that does give us a chance to explore what's necessary to make this even more generic in #2830584: Use modals for creating, updating, and deleting workflows, with a new DialogFormTrait. Considering they are internal I think we should hold of publishing the CR until they are not.
There was an used use and a comment that needed properly re-flowing.
Comment #23
alexpottComment #25
quietone commentedpublish the change record