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 tour module. Note that this may be one of the trickier conversions.

Schema in place

Schema not yet in place
tour.tour.*.yml

Remaining Tasks

Files: 
CommentFileSizeAuthor
#40 1935094-tour-schema-cmi-40.patch1.79 KBvijaycs85
PASSED: [[SimpleTest]]: [MySQL] 53,951 pass(es). View
#40 1935094-diff-38-40.txt450 bytesvijaycs85
#38 2013-04-02_184210.png12.33 KBvijaycs85
#38 1935094-tour-schema-cmi-38.patch1.78 KBvijaycs85
PASSED: [[SimpleTest]]: [MySQL] 53,993 pass(es). View
#38 1935094-diff-37-38.txt1.72 KBvijaycs85
#37 1935094-tour-schema-cmi-37.patch2.04 KBvijaycs85
FAILED: [[SimpleTest]]: [MySQL] Setup environment: Test cancelled by admin prior to completion. View
#37 1935094-diff-33-37.txt1.58 KBvijaycs85
#33 1935094-tour-schema-cmi-33.patch1.68 KBvijaycs85
FAILED: [[SimpleTest]]: [MySQL] Setup environment: Test cancelled by admin prior to completion. View
#33 1935094-diff-30-33.txt809 bytesvijaycs85
#30 1935094-tour-schema-cmi-29.patch1.23 KBvijaycs85
PASSED: [[SimpleTest]]: [MySQL] 53,969 pass(es). View
#30 1935094-diff-13-29.txt702 bytesvijaycs85
#13 1935094-tour-schema-cmi-13.interdiff.txt427 bytesnick_schuch
#13 1935094-tour-schema-cmi-13.patch1.22 KBnick_schuch
PASSED: [[SimpleTest]]: [MySQL] 53,839 pass(es). View
#11 1935094-tour-schema-cmi-11.patch1.22 KBnick_schuch
FAILED: [[SimpleTest]]: [MySQL] Unable to apply patch 1935094-tour-schema-cmi-11.patch. Unable to apply patch. See the log in the details link for more information. View
#1 1935094-tour-schema-cmi-1.patch1.26 KBvijaycs85
FAILED: [[SimpleTest]]: [MySQL] 53,275 pass(es), 2 fail(s), and 0 exception(s). View
#1 tour-config-inspector.png37.35 KBvijaycs85

Comments

vijaycs85’s picture

FileSize
37.35 KB
1.26 KB
FAILED: [[SimpleTest]]: [MySQL] 53,275 pass(es), 2 fail(s), and 0 exception(s). View

Updating patch with config inspector check.
tour-config-inspector.png

P.S: May need some label update, couldn't find any label in UI though.

Gábor Hojtsy’s picture

Status: Active » Needs review

Are tips not plugin based? That is what I've seen in a quick look. That would necessitate some dynamic type definitions to support contrib tour plugins to expose other textual items, no?

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

The last submitted patch, 1935094-tour-schema-cmi-1.patch, failed testing.

vijaycs85’s picture

Status: Needs work » Needs review

#1: 1935094-tour-schema-cmi-1.patch queued for re-testing.

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

The last submitted patch, 1935094-tour-schema-cmi-1.patch, failed testing.

larowlan’s picture

Labels aren't used at present but will be in contrib - see #1921188: Implement Tour UI module

sidharthap’s picture

Thanks @larowlan I have checked the latest patch attached to the issue and all labels matching except Data Class and Data ID. However, they are sequence so we can not update them. so label wise latest patch looks good to me.

vijaycs85’s picture

Status: Needs work » Needs review

Changing status as per @sidharthap comment in #7

Gábor Hojtsy’s picture

#1: 1935094-tour-schema-cmi-1.patch queued for re-testing.

Gábor Hojtsy’s picture

Status: Needs review » Needs work

@larowlan: can you look at whether the schema fits the system otherwise? Also how would this work with tip plugins? To me the schema look good, although I don't see why it would fail anything. Sent for restest for this. I only found this issue:

+++ b/core/modules/tour/config/schema/tour.schema.ymlundefined
@@ -0,0 +1,56 @@
+
+
+# Tour tip with associated fields.
+
+tour_tip:
+  type: mapping
+  label: 'Tour tip'

Superfluous comment? The name and the label seems to tell it all.

nick_schuch’s picture

Status: Needs work » Needs review
FileSize
1.22 KB
FAILED: [[SimpleTest]]: [MySQL] Unable to apply patch 1935094-tour-schema-cmi-11.patch. Unable to apply patch. See the log in the details link for more information. View

I have made the change outlined in #10.

Status: Needs review » Needs work

The last submitted patch, 1935094-tour-schema-cmi-11.patch, failed testing.

nick_schuch’s picture

Status: Needs work » Needs review
FileSize
1.22 KB
PASSED: [[SimpleTest]]: [MySQL] 53,839 pass(es). View
427 bytes

Woops. Here we go. Added a interdiff for good measure.

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

The last submitted patch, 1935094-tour-schema-cmi-13.patch, failed testing.

Gábor Hojtsy’s picture

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

#13: 1935094-tour-schema-cmi-13.patch queued for re-testing.

Gábor Hojtsy’s picture

Schema looks good to me, however this still stands and needs feedback:

@larowlan: can you look at whether the schema fits the system otherwise? Also how would this work with tip plugins?

I don't believe the fails.

vijaycs85’s picture

Looks good to me except 2 minor issue:

+++ b/core/modules/tour/config/schema/tour.schema.ymlundefined
@@ -0,0 +1,53 @@
+      type: string
+      label: 'Id'

minor upper case issue - can we keep it 'ID' to align with ID in tour_tip definition?

+++ b/core/modules/tour/config/schema/tour.schema.ymlundefined
@@ -0,0 +1,53 @@
+        - type: tour_tip
+          label: 'Tour tip '
+

Minor space issue in label

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

The last submitted patch, 1935094-tour-schema-cmi-13.patch, failed testing.

vijaycs85’s picture

Status: Needs work » Needs review

#13: 1935094-tour-schema-cmi-13.patch queued for re-testing.

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

The last submitted patch, 1935094-tour-schema-cmi-13.patch, failed testing.

vijaycs85’s picture

I guess, this is the same issue we are facing with block schema #1948884: Create configuration schemas for block and custom_block modules. if we add schema without config those tests fails.

vijaycs85’s picture

Status: Needs work » Postponed
vijaycs85’s picture

Currently blocked by #1948884: Create configuration schemas for block and custom_block modules as test fix is part of this issue.

Gábor Hojtsy’s picture

Fix currently included with #1948884: Create configuration schemas for block and custom_block modules, waiting for commit there.

Gábor Hojtsy’s picture

Status: Postponed » Needs review

That one got committed. Can someone please respond to my question on plugins? (If we want to see this committed :).

Gábor Hojtsy’s picture

#13: 1935094-tour-schema-cmi-13.patch queued for re-testing.

larowlan’s picture

Hi Gabor
Yeah tips are plugin based.
There is text plugin in core now, image plugin (takes a url) in the tests.
There is also a multi page plugin that has three fields (title, body, url) with url for 'next page'.
So yeah - these are plugin based and contrib could add anything that implements the tip interface.
Sorry about the delay
Lee

Gábor Hojtsy’s picture

Status: Needs review » Needs work

Ok, so that means the existing proposed schema does not work since it does not have any provisions for dynamic typing (AKA plugins to be explained). In the schema tour_tip is one fixed type, no possibilities for plugins. Sounds like we need to make the type dynamic based on the plugin value in the tip data. See http://drupal.org/node/1905070#dynamic-types

Gábor Hojtsy’s picture

Issue tags: +sprint

Add on D8MI sprint for closer tracking.

vijaycs85’s picture

Status: Needs work » Needs review
Issue tags: -sprint
FileSize
702 bytes
1.23 KB
PASSED: [[SimpleTest]]: [MySQL] 53,969 pass(es). View

Updating patch with fix for #17 and dynamic plugin option as mentioned in #28. For now just text plugin.

vijaycs85’s picture

Issue tags: +sprint

Cross post... adding tag back...

Gábor Hojtsy’s picture

Sounds like the multipage plugin is in core and would need coverage too?

vijaycs85’s picture

FileSize
809 bytes
1.68 KB
FAILED: [[SimpleTest]]: [MySQL] Setup environment: Test cancelled by admin prior to completion. View

Updating image plugin that @larowlan mentioned (on test file). Can't find multipage though... not sure how to find it...

nick_schuch’s picture

As discussed in IRC.

Thanks Gabor and vijaycs85

The multipage side of things is in the following issue: http://drupal.org/node/1942576

I don't believe this will result in a brand new tip type.

Gábor Hojtsy’s picture

Status: Needs review » Needs work

I believe we should be able to define a tour.tip type that defines the base properties and extend it with the two other types with more properties, right? :) That would let us centralize the base properties that both tip types extend from. Makes it easier to pin-point differences and maintain the schemas.

Gábor Hojtsy’s picture

Also the image plugin is with the tests, not in the main module, so it should be defined in a schema under the test module not in the main module.

vijaycs85’s picture

Status: Needs work » Needs review
FileSize
1.58 KB
2.04 KB
FAILED: [[SimpleTest]]: [MySQL] Setup environment: Test cancelled by admin prior to completion. View

Moving tour.tip.image to tour_test.schema.yml

vijaycs85’s picture

FileSize
1.72 KB
1.78 KB
PASSED: [[SimpleTest]]: [MySQL] 53,993 pass(es). View
12.33 KB

Adding tour.tip data type and fix for an issue in tour_test.schema.yml. Because of common data type (i.e. tour.tip), the tip type specific element added at the end. example text tour tip - body field appear at the end (ref: screenshot below):

2013-04-02_184210.png

Gábor Hojtsy’s picture

My only remaining remark is the tour URI in the image schema would be "Image URL" right? Instead of just URL which is less descriptive. Otherwise looks all good to me :)

vijaycs85’s picture

FileSize
450 bytes
1.79 KB
PASSED: [[SimpleTest]]: [MySQL] 53,951 pass(es). View

Updating label fix as mentioned in #39.

Gábor Hojtsy’s picture

Status: Needs review » Reviewed & tested by the community

Looks all good to me, it supports plugins now and optimises schema definition for them :)

webchick’s picture

Status: Reviewed & tested by the community » Fixed

Committed and pushed to 8.x. Thanks!

Gábor Hojtsy’s picture

Issue tags: -sprint

Superb, thanks!

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

Anonymous’s picture

Issue summary: View changes

Updated issue summary.