Views should depend on all the things (config, modules, and content) that if they disappear would break the view.
Ensure that views can depend on:
- Entity view modes used in any displays
- Fields used in any displays
- Fields used in any filters
- Default values used in arguments
- ... anything more...
This issue cannot handle two things, which have their own issues:
- dependencies on the config entities representing fields, for the fields that are listed in field views, see instead
- dependencies on referenced content/config entities, for the Views entity area, see instead
Discover everything a view should depend on Write patch
- Unpostpone when this is committed
User interface changes
Original report by @alexpott
I don't want to hold up this patch, but I was always under the impression that this patch would bring support for config entity dependencies as well? I.e. if a view lists entities in a certain view mode (the front page lists entities in 'teaser' view mode) it should depend on the view mode entities in question. If it filters to article nodes, it should depend on the article node type config entity. And so on. I suppose that is now out of scope? Or perhaps I'm mistaken and that's a different issue?
It's essential that we can figure out those config entity dependencies as well, because we'll need to make sure that cached views are invalidated when any of those config entities change. It is also essential to use more granular entity list cache tags in the future (i.e. if we know we're only listing 'Blog' nodes, then we can use a Blog node-specific list cache tag so that we invalidate as rarely as possible).