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


#1866610: Introduce Kwalify-inspired schema format for configuration introduced the idea of config schema. The changelog leads to (hopefully extensive) documentation on the format at 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

1. Create a configuration schema for views module general configuration(views.settings).
2. Add missing config keys and remove the keys that are not used.

Schema in place

Schema not yet in place

#8 2107693-views-settings-8.patch3.52 KBrych
PASSED: [[SimpleTest]]: [MySQL] 58,056 pass(es). View
#6 Screen Shot 2013-11-17 at 13.58.08.png44.63 KBvijaycs85
#5 2107693-views-settings-5.patch3.03 KBvijaycs85
PASSED: [[SimpleTest]]: [MySQL] 58,058 pass(es). View


vijaycs85’s picture

Title: Provide configuration schema for system.action » Provide configuration schema for views global configuration
Component: system.module » views.module
vijaycs85’s picture

Status: Active » Needs review
Issue tags: +Needs manual testing
9.85 KB
PASSED: [[SimpleTest]]: [MySQL] 58,628 pass(es). View

Initial patch...

vijaycs85’s picture

Issue summary: View changes

Update for views.settings

a_thakur’s picture

@vijaycs85: The patch applied successfully, but I am unable to view schema for views.settings in the config inspector.

After applying the patch, views.schema.yml did not get changed, rather the files as in git status shown below got changed.

ashish@xeon:/var/www/d8$ git status
# On branch 2107693
# Changes not staged for commit:
#   (use "git add <file>..." to update what will be committed)
#   (use "git checkout -- <file>..." to discard changes in working directory)
#       modified:   core/modules/action/config/schema/action.schema.yml
#       modified:   core/modules/node/config/schema/node.schema.yml
#       modified:   core/modules/system/config/schema/system.data_types.schema.yml
#       modified:   core/modules/system/config/schema/system.schema.yml
#       modified:   core/modules/user/config/schema/user.schema.yml
# Untracked files:
#   (use "git add <file>..." to include in what will be committed)
#       .project
#       core/modules/comment/config/schema/
#       modules/config_inspector/
#       sites/default/files/
#       sites/default/settings.php
no changes added to commit (use "git add" and/or "git commit -a")
ianthomas_uk’s picture

Issue summary: View changes
Status: Needs review » Needs work

@vijaycs85 I think you uploaded the wrong patch, presumably because this issue was initially mistitled.

vijaycs85’s picture

Title: Provide configuration schema for views global configuration » Provide configuration schema for views.settings + update views.settings to reflect current configuration setup
Issue summary: View changes
Status: Needs work » Needs review
3.03 KB
PASSED: [[SimpleTest]]: [MySQL] 58,058 pass(es). View

Yes, seems it is wrong patch. Updating correct patch with changes in config itself (Removed always_live_preview_button and added exposed_filter_any_label).

vijaycs85’s picture

Manually tested in config_inspector

dawehner’s picture

+++ b/core/modules/views/config/schema/views.schema.yml
@@ -1,5 +1,76 @@
+              label: 'Allow embedded displays'
+        custom_theme:
+          type: string
+          label: 'Custom theme'
+        always_live_preview:

+++ b/core/modules/views/config/views.settings.yml
@@ -15,7 +15,7 @@ ui:
     display_embed: '0'
   custom_theme: _default

custom_theme is also not used anymore in the UI, we should drop it.

rych’s picture

3.52 KB
PASSED: [[SimpleTest]]: [MySQL] 58,056 pass(es). View

I've removed custom_theme both from views.chema.yml and from views.settings.yml.

As I know, in settings.yml file there should be true or false values for boolean fields, so I've changed '0' values to false, '1' to true.

Setting up boolean values seems to me a little confusing. In core/modules/system/config/ file the value is false for admin_compact_mode, but in there is enabled: '0' in the "An introductory example" section.

What's the correct form? Does it matters anyway?

vijaycs85’s picture

Status: Needs review » Reviewed & tested by the community

thanks for working on this @rych. The boolean value should be true or false (not '0' or 0). Your patch looks good.

webchick’s picture

Status: Reviewed & tested by the community » Fixed

Committed and pushed to 8.x. Thanks!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.