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 sort plugin.
Schema in place
Please refer core/modules/views/config/schema/views.sort.schema.yml
Date.php
Schema not yet in place
Broken.php
GroupByNumeric.php
MenuHierarchy.php
Random.php
Standard.php
Steps to review
Check Steps to check on meta.
| Comment | File | Size | Author |
|---|---|---|---|
| #5 | random-sort.png | 55.36 KB | vijaycs85 |
| #5 | standard-sort.png | 36.87 KB | vijaycs85 |
| #1 | 2019093-views-sort-config-schema-1.patch | 2 KB | vijaycs85 |
Comments
Comment #1
vijaycs85Seems Broken.php and GroupByNumeric.php has no effect on config, so schema. Not sure how to get MenuHierarchy.php in config. This patch covers random and standard.
Todo:
MenuHierarchy.php
Comment #2
vijaycs85Comment #4
vijaycs85#1: 2019093-views-sort-config-schema-1.patch queued for re-testing.
Comment #5
vijaycs85Config inspector screenshot.
Comment #6
dawehnerThis handler will be reused once #1853524: Reintroduce Views integration for Book is in again.
If you want to have a list of the config just look at the defineOptions() method and you will have all information you will ever need.
Comment #7.0
vijaycs85Updated issue summary.
Comment #8
vijaycs85Working on this....
Comment #9
vijaycs851: 2019093-views-sort-config-schema-1.patch queued for re-testing.
Comment #10
vijaycs85Comment #11
dawehnerThis kind of shares the same keys, don't they both inherit from the same base class, so they could use similar things. Additional I am a bit worried about the fact that we have a dedicated file for sort_expose, even there is no class, just some functionality in core.
Comment #12
vijaycs85The patch on this issue has been updated as part of #2167623: Add test for all default configuration to ensure schema exists and is correct. As this issue doesn't have any test to confirm/validate the schema, making this change and closing this issue as duplicate of #2167623: Add test for all default configuration to ensure schema exists and is correct. The contributors of this issue (in commit message) is copied to #2167623: Add test for all default configuration to ensure schema exists and is correct.