Problem/Motivation
If you activate multiple recipes that have inputs, it...doesn't work. You'll be redirected to an input form for the first one, but not the others.
Proposed resolution
TBD, but probably we should redirect to a single form that knows which recipes you're trying to activate, and thus collects inputs for, and applies, all of them at once.
This will probably necessitate some backwards compatible changes in the activator system. We need some way for activators to indicate that they will process multiple projects at once. I discovered that we can keep ActivatorInterface as-is and do this in implementations:
public function activate(Project ...$projects): ?array { ... }
This would be an entirely reasonable way for an activator to show that it will handle, in one call, every project that it supports. Both ModuleActivator and RecipeActivator could implement this. This would allow RecipeActivator to redirect to RecipeForm once and handle several recipes.
Issue fork project_browser-3539152
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
phenaproximaComment #3
phenaproximaComment #5
phenaproximaIt might be worth postponing this on #3509738: If a module installs additional dependencies, they should show up as installed right away, since that will remove the inline project refresh that necessitates a weird dependency injection-related workaround.
Comment #6
phenaproximaPostponing on #3509738: If a module installs additional dependencies, they should show up as installed right away, which is already reviewable.
Comment #7
phenaproximaThis is gonna need explicit test coverage.
Comment #8
phenaproximaComment #9
phenaproximaAlso postponing on #3539389: RecipeForm doesn't set a checkpoint, since the logic change there will affect this issue.
Comment #10
phenaproximaOK, one blocker in!
Comment #11
phenaproximaAnd there goes the other blocker.
Comment #12
phenaproximaAssigning to the guy who will manually test and hopefully commit this bad boy. :) I still need to do a second MR to backport to 2.0.x.
Comment #14
chrisfromredfinFound an issue that if you apply three recipes and only two require config, it gives you the wrong titles on the fieldsets in the modal. To replicate, select article tags, AI assistant, and website contact form. (I'm not sure if order matters.) Test may need to be either improved or written.
Comment #15
phenaproximaNice catch. Fixed the bug and adjusted the tests. Turns out that order of selection was significant.
Comment #18
chrisfromredfineasy and cooooollllll