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
| Comment | File | Size | Author |
|---|---|---|---|
| #7 | 2019095-views-style-missing-schema-7.patch | 767 bytes | piyuesh23 |
| #7 | interdiff.txt | 473 bytes | piyuesh23 |
| #4 | 2019095-views-style-missing-schema-4.patch | 766 bytes | vijaycs85 |
| #4 | 2019095-diff-1-4.txt | 790 bytes | vijaycs85 |
| #1 | adding-views-style-missing-schema-2019095-1.patch | 769 bytes | crispiatico |
Comments
Comment #1
crispiatico commentedAdded Schema for
Rss.php
UnformattedSummary.php
For insert Mapping.php we need more information.
Thanks :-)
Comment #2
vijaycs85Thanks 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.
Comment #4
vijaycs85Seems 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.
Comment #5
dawehnerI don't think we should make the separator translatable...
Comment #6
dawehnerComment #7
piyuesh23 commentedChanged the type from label to string for separator.
Comment #8
piyuesh23 commentedComment #9
dawehnerNice.
Comment #10
alexpottCommitted e0f675f and pushed to 8.x. Thanks!
Comment #11.0
(not verified) commentedUpdated issue summary.