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.

Files: 
CommentFileSizeAuthor
#5 random-sort.png55.36 KBvijaycs85
#5 standard-sort.png36.87 KBvijaycs85
#1 2019093-views-sort-config-schema-1.patch2 KBvijaycs85
PASSED: [[SimpleTest]]: [MySQL] 59,292 pass(es). View

Comments

vijaycs85’s picture

FileSize
2 KB
PASSED: [[SimpleTest]]: [MySQL] 59,292 pass(es). View

Seems 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

vijaycs85’s picture

Status: Active » Needs review

Status: Needs review » Needs work
Issue tags: -Configuration system, -D8MI, -language-config, -VDC, -Configuration schema, -views configuration schema

The last submitted patch, 2019093-views-sort-config-schema-1.patch, failed testing.

vijaycs85’s picture

Status: Needs work » Needs review
Issue tags: +Configuration system, +D8MI, +language-config, +VDC, +Configuration schema, +views configuration schema
vijaycs85’s picture

FileSize
36.87 KB
55.36 KB

Config inspector screenshot.

dawehner’s picture

This 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.

The last submitted patch, 2019093-views-sort-config-schema-1.patch, failed testing.

vijaycs85’s picture

Issue summary: View changes

Updated issue summary.

vijaycs85’s picture

Assigned: Unassigned » vijaycs85
Issue summary: View changes

Working on this....

vijaycs85’s picture

vijaycs85’s picture

Assigned: vijaycs85 » Unassigned
Status: Needs work » Needs review
dawehner’s picture

Status: Needs review » Needs work
+++ b/core/modules/views/config/schema/views.sort_expose.schema.yml
@@ -1,8 +1,28 @@
+  type: views_sort_expose
+  label: 'Random sort expose settings'
+  mapping:
+    order:
+      type: string
+      label: 'Order'
+
+views.sort_expose.standard:
+  type: views_sort_expose
+  label: 'Standard sort expose settings'
+  mapping:
+    order:
+      type: string
+      label: 'Order'
 
...
+views.sort_expose.random:

This 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.

vijaycs85’s picture

Status: Needs work » Closed (duplicate)
Related issues: +#2167623: Add test for all default configuration to ensure schema exists and is correct

The 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.