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 the idea of config schema. 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

Create a configuration schema for taxonomy module.

Schema in place

Schema not yet in place
taxonomy.settings.yml

Files: 
CommentFileSizeAuthor
#11 1919208-taxonomy-schema-11.patch1.03 KBGábor Hojtsy
PASSED: [[SimpleTest]]: [MySQL] 53,365 pass(es). View
#10 Screenshot_3_25_13_11_36_AM.png28.91 KBGábor Hojtsy
#8 1919208-list.png18.03 KBvijaycs85
#8 1919208-form.png20.3 KBvijaycs85
#7 1919208-taxonomy-schema-7.patch1.04 KBvijaycs85
PASSED: [[SimpleTest]]: [MySQL] 53,282 pass(es). View
#2 1919208-taxonomy-schema-2.patch662 bytesrahuldolas123
PASSED: [[SimpleTest]]: [MySQL] 52,274 pass(es). View
#1 1919208-taxonomy-schema-1.patch490 bytesvijaycs85
PASSED: [[SimpleTest]]: [MySQL] 50,973 pass(es). View

Comments

vijaycs85’s picture

Status: Active » Needs review
FileSize
490 bytes
PASSED: [[SimpleTest]]: [MySQL] 50,973 pass(es). View

Adding schema file...

rahuldolas123’s picture

FileSize
662 bytes
PASSED: [[SimpleTest]]: [MySQL] 52,274 pass(es). View

Adding code styles according to http://drupal.org/node/1905070#codestyle

pfrenssen’s picture

Assigned: Unassigned » pfrenssen

Assigning for review.

pfrenssen’s picture

Assigned: pfrenssen » Unassigned
Status: Needs review » Reviewed & tested by the community

Looking good.

webchick’s picture

Status: Reviewed & tested by the community » Fixed

Committed and pushed to 8.x. Thanks!

Gábor Hojtsy’s picture

Status: Fixed » Needs work

This does not seem like it covers taxonomy vocabulary config entities? Create a couple vocabularies and check your active configuration store for such files :)

vijaycs85’s picture

Status: Needs work » Needs review
FileSize
1.04 KB
PASSED: [[SimpleTest]]: [MySQL] 53,282 pass(es). View

Adding patch for taxonomy.vocabulary.*

vijaycs85’s picture

FileSize
20.3 KB
18.03 KB

Adding manual test screenshot from config_inspector.
1919208-list.png

1919208-form.png

Gábor Hojtsy’s picture

Status: Needs review » Needs work
+++ b/core/modules/taxonomy/config/schema/taxonomy.schema.ymlundefined
@@ -14,3 +14,28 @@ taxonomy.settings:
+taxonomy.vocabulary.*:
+  type: mapping
+  label: 'Vocabulary settings'
+  mapping:

Looks like this should be "Vocabulary" simply. We use "* settings" for module settings, and this is a configuration entity.

+++ b/core/modules/taxonomy/config/schema/taxonomy.schema.ymlundefined
@@ -14,3 +14,28 @@ taxonomy.settings:
+    vid:
+      type: string
+      label: 'Machine name'
+    name:
+      type: label
+      label: 'Name'
+    description:
+      type: label
+      label: 'Description'
+    hierarchy:
+      type: boolean
+      label: 'Hierarchy'
+    weight:
+      type: integer
+      label: 'Weight'
+    status:
+      type: boolean
+      label: 'Status'
+    langcode:
+      type: string

I was wondering if there are other missing pieces, like uuid when saving a new vocabulary, but double checking, this indeed seemed like the full set.

Marking needs work for the main label. :)

Gábor Hojtsy’s picture

Otherwise tested this with http://drupal.org/project/config_translation and this finally makes taxonomy vocabulary translation work on the UI :) Just in need of that tiny label fix :)

Screenshot_3_25_13_11_36_AM.png

Gábor Hojtsy’s picture

Status: Needs work » Reviewed & tested by the community
FileSize
1.03 KB
PASSED: [[SimpleTest]]: [MySQL] 53,365 pass(es). View

Fixed the taxonomy vocabulary label only. Should be good to go :)

Gábor Hojtsy’s picture

#11: 1919208-taxonomy-schema-11.patch queued for re-testing.

xjm’s picture

Issue tags: +Quick fix
webchick’s picture

Status: Reviewed & tested by the community » Fixed

Committed and pushed to 8.x. Thanks!

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