This is a sub-issue of #1910606: Improve the configurations schemas for Views significantly.

Problem/motivation

#1866610: Introduce Kwalify-inspired schema format for configuration introduced some config schema coverage for views and #1910606: Improve the configurations schemas for Views significantly extended it, but it is not complete. The changelog leads to (hopefully extensive) documentation on the format at http://drupal.org/node/1905070. While there are little cleanups planned for the format overall, the current format is a result of months of back and forths, so it should be perfectly fine to apply it more widely to core.

Proposed solution

Figure out the missing pieces that are not yet covered. Write schema file sections for them. Clean up / fix any issues in current schema.

Create a configuration schema for missing view style plugin.

Schema in place
Please refer core/modules/views/config/schema/views.style.schema.yml
DefaultStyle.php
HtmlList.php
Grid.php
Table.php
DefaultSummary.php

Schema not yet in place
Mapping.php - Ref #4
Rss.php
UnformattedSummary.php

Files: 
CommentFileSizeAuthor
#7 2019095-views-style-missing-schema-7.patch767 bytespiyuesh23
PASSED: [[SimpleTest]]: [MySQL] 56,757 pass(es). View
#7 interdiff.txt473 bytespiyuesh23
#4 2019095-views-style-missing-schema-4.patch766 bytesvijaycs85
PASSED: [[SimpleTest]]: [MySQL] 57,667 pass(es). View
#4 2019095-diff-1-4.txt790 bytesvijaycs85
#1 adding-views-style-missing-schema-2019095-1.patch769 bytescrispiatico
FAILED: [[SimpleTest]]: [MySQL] 57,978 pass(es), 4 fail(s), and 1 exception(s). View

Comments

crispiatico’s picture

Status: Active » Needs review
FileSize
769 bytes
FAILED: [[SimpleTest]]: [MySQL] 57,978 pass(es), 4 fail(s), and 1 exception(s). View

Added Schema for
Rss.php
UnformattedSummary.php

For insert Mapping.php we need more information.

Thanks :-)

vijaycs85’s picture

Thanks for working on this @crispiatico. Just few points:
1. The label should match with UI label/title of the field. If the field is not displayed anywhere in front end then we can use our name.
2. If 'description' is free text then we need to use type:text instead of string to make it traslatable.

I do manual test on this patch later today.

Status: Needs review » Needs work

The last submitted patch, adding-views-style-missing-schema-2019095-1.patch, failed testing.

vijaycs85’s picture

Status: Needs work » Needs review
FileSize
790 bytes
766 bytes
PASSED: [[SimpleTest]]: [MySQL] 57,667 pass(es). View

Seems mapping isn't really a style. More details at #1765824: Provide a way to map views fields to a certain meaning. Not sure how unformated_summary is in style, but can see it in action at glossary view => attachment-display => Contextual filter => title.

PS: Thanks to @timplunkett for the valuable details & references.

dawehner’s picture

+++ b/core/modules/views/config/schema/views.style.schema.ymlundefined
@@ -110,3 +110,22 @@ views.style.default_summary:
+    separator:
+      type: label
+      label: 'Separator'

I don't think we should make the separator translatable...

dawehner’s picture

Status: Needs review » Needs work
piyuesh23’s picture

FileSize
473 bytes
767 bytes
PASSED: [[SimpleTest]]: [MySQL] 56,757 pass(es). View

Changed the type from label to string for separator.

piyuesh23’s picture

Status: Needs work » Needs review
dawehner’s picture

Status: Needs review » Reviewed & tested by the community

Nice.

alexpott’s picture

Status: Reviewed & tested by the community » Fixed

Committed e0f675f and pushed to 8.x. Thanks!

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

Anonymous’s picture

Issue summary: View changes

Updated issue summary.