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
- Create schema file
- Manual visual inspection of data .yml and schema .yml, see http://drupal.org/node/1910624#steps-to-test
Comment | File | Size | Author |
---|---|---|---|
#40 | 1935094-tour-schema-cmi-40.patch | 1.79 KB | vijaycs85 |
#40 | 1935094-diff-38-40.txt | 450 bytes | vijaycs85 |
#38 | 2013-04-02_184210.png | 12.33 KB | vijaycs85 |
#38 | 1935094-tour-schema-cmi-38.patch | 1.78 KB | vijaycs85 |
#38 | 1935094-diff-37-38.txt | 1.72 KB | vijaycs85 |
Comments
Comment #1
vijaycs85Updating patch with config inspector check.
P.S: May need some label update, couldn't find any label in UI though.
Comment #2
Gábor HojtsyAre 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?
Comment #4
vijaycs85#1: 1935094-tour-schema-cmi-1.patch queued for re-testing.
Comment #6
larowlanLabels aren't used at present but will be in contrib - see #1921188: Implement Tour UI module
Comment #7
sidharthapThanks @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.
Comment #8
vijaycs85Changing status as per @sidharthap comment in #7
Comment #9
Gábor Hojtsy#1: 1935094-tour-schema-cmi-1.patch queued for re-testing.
Comment #10
Gábor Hojtsy@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:
Superfluous comment? The name and the label seems to tell it all.
Comment #11
nick_schuch CreditAttribution: nick_schuch commentedI have made the change outlined in #10.
Comment #13
nick_schuch CreditAttribution: nick_schuch commentedWoops. Here we go. Added a interdiff for good measure.
Comment #15
Gábor Hojtsy#13: 1935094-tour-schema-cmi-13.patch queued for re-testing.
Comment #16
Gábor HojtsySchema looks good to me, however this still stands and needs feedback:
I don't believe the fails.
Comment #17
vijaycs85Looks good to me except 2 minor issue:
minor upper case issue - can we keep it 'ID' to align with ID in tour_tip definition?
Minor space issue in label
Comment #19
vijaycs85#13: 1935094-tour-schema-cmi-13.patch queued for re-testing.
Comment #21
vijaycs85I 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.
Comment #22
vijaycs85test is failing because of #1954376: Configuration schema without any shipped configuration fails tests
Comment #23
vijaycs85Currently blocked by #1948884: Create configuration schemas for block and custom_block modules as test fix is part of this issue.
Comment #24
Gábor HojtsyFix currently included with #1948884: Create configuration schemas for block and custom_block modules, waiting for commit there.
Comment #25
Gábor HojtsyThat one got committed. Can someone please respond to my question on plugins? (If we want to see this committed :).
Comment #26
Gábor Hojtsy#13: 1935094-tour-schema-cmi-13.patch queued for re-testing.
Comment #27
larowlanHi 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
Comment #28
Gábor HojtsyOk, 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
Comment #29
Gábor HojtsyAdd on D8MI sprint for closer tracking.
Comment #30
vijaycs85Updating patch with fix for #17 and dynamic plugin option as mentioned in #28. For now just text plugin.
Comment #31
vijaycs85Cross post... adding tag back...
Comment #32
Gábor HojtsySounds like the multipage plugin is in core and would need coverage too?
Comment #33
vijaycs85Updating image plugin that @larowlan mentioned (on test file). Can't find multipage though... not sure how to find it...
Comment #34
nick_schuch CreditAttribution: nick_schuch commentedAs 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.
Comment #35
Gábor HojtsyI 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.
Comment #36
Gábor HojtsyAlso 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.
Comment #37
vijaycs85Moving tour.tip.image to tour_test.schema.yml
Comment #38
vijaycs85Adding 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):
Comment #39
Gábor HojtsyMy 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 :)
Comment #40
vijaycs85Updating label fix as mentioned in #39.
Comment #41
Gábor HojtsyLooks all good to me, it supports plugins now and optimises schema definition for them :)
Comment #42
webchickCommitted and pushed to 8.x. Thanks!
Comment #43
Gábor HojtsySuperb, thanks!
Comment #44.0
(not verified) CreditAttribution: commentedUpdated issue summary.