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 node module.

Schema in place

Schema not yet in place

views.sort.node_created

Add additional parts of identified schemas.

Steps to review

Check Steps to check on meta.

Files: 
CommentFileSizeAuthor
#14 1991260-diff-6-14.txt6.22 KBvijaycs85
#14 1991260-config-schema-node-schema-14.patch6.15 KBvijaycs85
PASSED: [[SimpleTest]]: [MySQL] 59,311 pass(es). View
#12 1991260-config-schema-node-schema-12.patch7.01 KBvijaycs85
FAILED: [[SimpleTest]]: [MySQL] Unable to apply patch 1991260-config-schema-node-schema-12.patch. Unable to apply patch. See the log in the details link for more information. View
#6 1991260-views-config-schema-node-6.patch1.02 KBvijaycs85
PASSED: [[SimpleTest]]: [MySQL] 55,550 pass(es). View
#2 1991260-views-config-schema-node-2.patch553 bytesvijaycs85
PASSED: [[SimpleTest]]: [MySQL] 55,924 pass(es). View

Comments

vijaycs85’s picture

Title: Copy of Complete configurations schema for Views » Provide config schema to views field, argument, filter, sort in node module
vijaycs85’s picture

FileSize
553 bytes
PASSED: [[SimpleTest]]: [MySQL] 55,924 pass(es). View

Adding initial patch for views.sort.node_created

vijaycs85’s picture

Status: Active » Needs review
vijaycs85’s picture

Title: Provide config schema to views field, argument, filter, sort in node module » Provide config schema to views components in node module
vijaycs85’s picture

Updating tag.

vijaycs85’s picture

FileSize
1.02 KB
PASSED: [[SimpleTest]]: [MySQL] 55,550 pass(es). View

Adding more plugins...

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

The last submitted patch, 1991260-views-config-schema-node-6.patch, failed testing.

vijaycs85’s picture

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

Status: Needs review » Needs work

All of the plugins of node should be done here.

vijaycs85’s picture

As far as I can see, we got just those 2 in the patch at #6. Needs manual check for additional plugins.

vijaycs85’s picture

Issue summary: View changes

Updated issue summary.

vijaycs85’s picture

Issue summary: View changes

Updated issue summary.

vijaycs85’s picture

Assigned: Unassigned » vijaycs85
Issue summary: View changes
Issue tags: +LONDON_2013_DECEMBER

Working on this...

vijaycs85’s picture

Status: Needs work » Needs review
FileSize
7.01 KB
FAILED: [[SimpleTest]]: [MySQL] Unable to apply patch 1991260-config-schema-node-schema-12.patch. Unable to apply patch. See the log in the details link for more information. View

Updating other plugins...

Status: Needs review » Needs work

The last submitted patch, 12: 1991260-config-schema-node-schema-12.patch, failed testing.

vijaycs85’s picture

Status: Needs work » Needs review
FileSize
6.15 KB
PASSED: [[SimpleTest]]: [MySQL] 59,311 pass(es). View
6.22 KB

Missed the base patch from #6

vijaycs85’s picture

Assigned: vijaycs85 » Unassigned
dawehner’s picture

  1. +++ b/core/modules/node/config/schema/node.view.schema.yml
    @@ -0,0 +1,236 @@
    +    glossary:
    +      type: boolean
    +      label: 'Glossary mode'
    +    limit:
    +      type: integer
    +      label: 'Character limit'
    +    case:
    +      type: string
    +      label: 'Case'
    +    path_case:
    +      type: string
    +      label: 'Case in path'
    +    transform_dash:
    +      type: boolean
    +      label: 'Transform spaces to dashes in URL'
    +    break_phrase:
    +      type: boolean
    +      label: 'Allow multiple values'
    

    All of these options are defined in views.argument.string already, so I don't see why we have to re-add it.

  2. +++ b/core/modules/node/config/schema/node.view.schema.yml
    @@ -0,0 +1,236 @@
    +    break_phrase:
    +      type: boolean
    +      label: 'Allow multiple values'
    +    not:
    +      type: boolean
    +      label: 'Exclude'
    ...
    +    break_phrase:
    +      type: boolean
    +      label: 'Allow multiple values'
    +    not:
    +      type: boolean
    +      label: 'Exclude'
    

    These should be also inheritable.

  3. +++ b/core/modules/node/config/schema/node.view.schema.yml
    @@ -0,0 +1,236 @@
    +views.field.node_language:
    +  type: views_field
    +  label: 'Node language'
    ...
    +    link_to_node:
    +      type: boolean
    +      label: 'Link this field to the original piece of content'
    ...
    +  mapping:
    

    link_to_node should be inheritable from views.field.node ... basically all the options are defined in the plugin defineOptions methods so the schema should match this hierarchy, as far as I understand it.

dawehner’s picture

Status: Needs review » Needs work

I guess this is also kind of 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.