Problem

  • /core/modules/views/config/schema/views.display_extender.schema.yml is empty (0 bytes).

Obsolete schema file or is that a bug?

CommentFileSizeAuthor
#4 2197877-remove-empty-views-config-4.patch197 byteskirby14
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

sun’s picture

dawehner’s picture

Issue tags: +Novice

[18:21] sun: there is actually no used display extender in views itself, just contrib modules define some, so you probably don't need one schema file

vijaycs85’s picture

Title: views.display_extender.schema.yml is empty (0 bytes) » Remove emtpy views.display_extender.schema.yml file
kirby14’s picture

Status: Active » Needs review
FileSize
197 bytes

No idea if this even needs a patch but here you go.

sun’s picture

As I'm not familiar with this code, I don't know what the appropriate action here is, but to add some more insights from IRC:

18:23 sun dawehner: but if it's a known/declared thing in Views, then I guess the config schema should declare how the (base) display extender configuration is supposed to look in terms of data types, no?

18:31 aspilicious_home dawehner: sun has a point

18:35 dawehner sun: i guess we want something like at the beginning of views.style.schema.yml

So we likely still want to delete that file, but additionally add some base plugin data type schema for display extenders in views.display.schema.yml?

dawehner’s picture

Assigned: Unassigned » vijaycs85

Let's get someone in with more knowledge of schema files.

vijaycs85’s picture

Currently we don't have any display extender specific configuration in core (DefaultDisplayExtender has no addition options). If we need to introduce new data type, it can be something like below:

diff --git a/core/modules/views/config/schema/views.data_types.schema.yml b/core/modules/views/config/schema/views.data_types.schema.yml
index 4f3a87e..1a8f4dc 100644
--- a/core/modules/views/config/schema/views.data_types.schema.yml
+++ b/core/modules/views/config/schema/views.data_types.schema.yml
@@ -242,6 +242,9 @@ views_display:
       type: boolean
       label: 'Hide attachments in summary'

+views_display_extender:
+  type: mapping
+
 views_sort:
   type: views_handler
   label: 'Sort criteria'

But not sure how it would add value to plugins from contrib module

Gábor Hojtsy’s picture

The dedicated views_display_extender type would make sense if in the future core adds more properties to it by default. If not, then it is just an alternate name for mapping. AND since we don't allow schemas to change, it should not change in the future either, right? :) So don't see the use for a dedicated type until we have base data on it.

sun’s picture

Assigned: vijaycs85 » Unassigned
Status: Needs review » Reviewed & tested by the community

As long as Views maintainers are fine with having no schema for display extenders (and that was @dawehner's initial response), this is good to go :-)

sun’s picture

Title: Remove emtpy views.display_extender.schema.yml file » Remove empty views.display_extender.schema.yml file

Fixing that typo in the issue title. ;)

alexpott’s picture

Status: Reviewed & tested by the community » Fixed

Committed 1ca2032 and pushed to 8.x. Thanks!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.