This is a sub-issue of #1910624: [META] Introduce and complete configuration schemas in all of core.

Problem/motivation

#1866610: Introduce Kwalify-inspired schema format for configuration introduced some config schema coverage for views, 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 view components access, area, argument, argument_default, argument_validator, cache, display, display_extender, exposed_form, field, filter, handler, pager, sort, style (whichever applicable) in taxonomy module.

Schema in place

Schema not yet in place

Arguments:
IndexTid.php
IndexTidDepth.php
IndexTidDepthModifier.php
Taxonomy.php
VocabularyVid.php

Argument validators:
views.argument_validator.taxonomy_term

Argument default:
views.argument_default.taxonomy_tid

Filters:
TaxonomyIndexTid.php
TaxonomyIndexTidDepth.php

Fields:
Language.php
LinkEdit.php
Taxonomy.php
TaxonomyIndexTid.php

Relationship:
NodeTermData.php

Steps to review

Check Steps to check on meta.

Files: 
CommentFileSizeAuthor
#6 1992892-diff-4-6.txt802 bytesvijaycs85
#6 1992892-config-schema-views_taxonomy-6.patch4.66 KBvijaycs85
PASSED: [[SimpleTest]]: [MySQL] 59,257 pass(es). View
#4 1992892-diff-1-4.txt4.17 KBvijaycs85
#4 1992892-config-schema-views_taxonomy-4.patch4.67 KBvijaycs85
FAILED: [[SimpleTest]]: [MySQL] 58,199 pass(es), 246 fail(s), and 12 exception(s). View
#1 1992892-views-config-schema-taxonomy-1.patch1.07 KBvijaycs85
PASSED: [[SimpleTest]]: [MySQL] 56,093 pass(es). View

Comments

vijaycs85’s picture

Status: Active » Needs review
FileSize
1.07 KB
PASSED: [[SimpleTest]]: [MySQL] 56,093 pass(es). View

Initial patch...

dawehner’s picture

Status: Needs review » Needs work

All of the plugins of taxonomy should be done here.

vijaycs85’s picture

Issue summary: View changes

Updated issue summary.

vijaycs85’s picture

Issue summary: View changes
Issue tags: +LONDON_2013_DECEMBER

Working on this...

vijaycs85’s picture

Issue summary: View changes
Status: Needs work » Needs review
FileSize
4.67 KB
FAILED: [[SimpleTest]]: [MySQL] 58,199 pass(es), 246 fail(s), and 12 exception(s). View
4.17 KB

Updated for all plugins except relationship as we don't have one from views...

The last submitted patch, 4: 1992892-config-schema-views_taxonomy-4.patch, failed testing.

vijaycs85’s picture

FileSize
4.66 KB
PASSED: [[SimpleTest]]: [MySQL] 59,257 pass(es). View
802 bytes
dawehner’s picture

+++ b/core/modules/taxonomy/config/schema/taxonomy.view.schema.yml
@@ -0,0 +1,193 @@
+views.argument.taxonomy:
+  type: views_argument
+  label: 'Taxonomy'
+  mapping:
+    break_phrase:
+      type: boolean
+      label: 'Allow multiple values'
+    not:
+      type: boolean
+      label: 'Exclude'
+
+views.argument.vocabulary_vid:
+  type: views_argument
+  label: 'Vocabulary'
+  mapping:
+    break_phrase:
+      type: boolean
+      label: 'Allow multiple values'
+    not:
+      type: boolean
+      label: 'Exclude'

I wonder why this is specific multiple times?

vijaycs85’s picture

so all PluginBase has content type (e.g ArgumentPluginBase is views_argument) and the plugin extends base use this content type (e.g. Numeric extends ArgumentPluginBase, so views.argument.numeric is of type views_argument). But we don't really use this plugin as content type for the plugin extending it.

So in our example (actual/current implementation),

VocabularyVid extends Numeric extends ArgumentPluginBase. We use views_argument as content type for both Numeric and VocabularyVid

Whereas, it should be (expected)
VocabularyVid should be of type Numeric. If it can be done, then the change would be:

views.argument.vocabulary_vid:
  type: views_argument

will be changed to

views.argument.vocabulary_vid:
  type: views.argument.numeric

But I never tried it.

dawehner’s picture

Status: Needs review » Needs work

I think this means this is needs work.

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.