- Issue created by @nicxvan
- πΊπΈUnited States nicxvan
@dww mentioned on slack one area for possible improvement:
Yeah, it could potentially be refactored to not make it so hard to use. Eg this badness of the class trying to save changes that then trigger views_view_presave() instantiating the class again to redo the work, etc.
- πΊπΈUnited States nicxvan
I think it may be out of scope for this issue, but one of the issues is also that views config updates often require fixture updates which is a whole layer of complexity since they are zipped.
- πΊπΈUnited States nicxvan
Here is how ECA approaches a similar issue: https://git.drupalcode.org/project/eca/-/merge_requests/423/diffs#031db4...
- πΊπΈUnited States nicxvan
Additional issues adding this now:
β¨ Allow a custom HTML element to be selected for a grouping field Needs work
β¨ Add support for tables with two headers in views table display Needs work - πΊπΈUnited States dww
My comment is linked in the summary, but copying here for visibility:
However, I had to completely rewrite
ViewsConfigUpdater::processEntityArgumentUpdate()
to operate on entire View entities, instead of using all the per-handler plumbing we've got. To my great dismay, if you copy the existing patterns,ViewsConfigUpdater
process functions make a bunch of changes to handler config, then try to save the view, but that instantiates anotherViewsConfigUpdater
object (this time, with deprecations enabled) to do all the work again. π€― So apparently, The Right Wayβ’οΈ to update a view with all this plumbing is that your process function has to directly update the$view
(which isn't even normally passed in to your process function if you think you're just dealing with handlers), not just fix the$handler
. π€¦ββοΈIt's probably out of scope to actually fix that as part of an issue with the title "Document ...", but maybe we want to expand the scope here?
- πΊπΈUnited States nicxvan
I'm ok with slightly expanding scope or making this more of a META.
Honestly, especially now that we are starting to validate config and deprecate it a more generic config updater may be necessary.
@jurgenhaas wrote an updater too to help with ECA token changes. π Provide post update helper function to rename tokens Fixed
Having some generic update notification / modification almost like a hook would be helpful for core and for contrib to keep configuration up to date.