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 breakpoint module. Note that this may be one of the trickier conversions.
Schema in place
Schema not yet in place
breakpoint.settings.yml
Breakpoint config entity type
BreakpointGroup config entity type
Remaining Tasks
- manual visual inspection of data .yml and schema .yml, see http://drupal.org/node/1910624#steps-to-test
- review with the inspector, see #1910624-9: [META] Introduce and complete configuration schemas in all of core
Comment | File | Size | Author |
---|---|---|---|
#30 | 1912308-breakpoint-schema-30.patch | 1.94 KB | vijaycs85 |
#28 | 1912308-breakpoint-schema-28.patch | 1.94 KB | vijaycs85 |
#28 | breakpoint-1912308.png | 29.78 KB | vijaycs85 |
#28 | breakpoint_group-1912308.png | 31.13 KB | vijaycs85 |
#26 | config_inspector_ui.png | 42.42 KB | vijaycs85 |
Comments
Comment #1
Gábor HojtsyTagging for config schema.
Comment #2
vijaycs85Adding patch
Comment #4
vijaycs85updating type from sequence to string.
Comment #6
vijaycs85#4: 1912308-breakpoint-schema-3.patch queued for re-testing.
Comment #8
vijaycs85Updating space issue with "mapping"...
Comment #9
YesCT CreditAttribution: YesCT commentedfor people coming in to test and review, see: http://drupal.org/node/1910624#steps-to-test in the issue summary for #1910624: [META] Introduce and complete configuration schemas in all of core
Those are draft instructions, please suggest improvements to them.
Comment #10
vijaycs85Updating code style fixes...
Comment #11
YesCT CreditAttribution: YesCT commentedThose coding style changes look good.
Per http://drupal.org/node/1910624#steps-to-test,
still needs manual visual inspection of data .yml and schema .yml
and the inspector, see #1910624-9: [META] Introduce and complete configuration schemas in all of core
updating issue summary.
Comment #12
sandipmkhairnar CreditAttribution: sandipmkhairnar commentedupdating label with changed mapping type of multipliers
Comment #13
rkjha CreditAttribution: rkjha commentedThe coding style is good and the changes also seem to be reasonable.
Comment #14
mr.york CreditAttribution: mr.york commentedI tested the patch with the configuration inspector.
Data is well covered. Looks good.
Comment #15
mr.york CreditAttribution: mr.york commentedAdd #SprintWeekend tag :).
Comment #16
mr.york CreditAttribution: mr.york commentedAdded Breakpoint and BreakpointGroup config entity definition to the breakpoint schema.
Comment #17
mr.york CreditAttribution: mr.york commentedNeeds review.
Comment #18
Gábor HojtsyThis did not actually seem to work with config inspector, so needs review/help.
Comment #19
rkjha CreditAttribution: rkjha commentedThe definition for breakpoint.settings could be tested using Configuration inspector. For the rest of the two definitions, I had a manual inspection. This covers all the data and seem perfect to me.
Comment #21
disasm CreditAttribution: disasm commentedThanks for the review rkjha. Could you give us a little more detail about why it needed manual inspection? What was it that causes Configuration inspector to fail?
The "patch" that failed testing was an interdiff that was badly named, so marking back to needs review. In the future, mr.york please upload interdiff with a .txt extension instead of .patch so test bot doesn't try to test them.
Comment #22
Gábor HojtsyThe breakpoint and breakpoint group config entities are defined with the breakpoint module. The module creates them based on breakpoints defined and places them in your active config store: sites/yorsite/files/config/active_....../. See the files there. Problem with config inspector is even though the schma existed, the config files did not show up in the inspector (although being in the active store, they should have).
Comment #23
Gábor HojtsyCan someone help cross-check and help figure out why it did not work? Maybe it would work right away for you :D
Comment #24
vijaycs85@Gábor Hojtsy, I tested it and I found that the wildcard option working for just one part. so if we have breakpoint.breakpoint.module.toolbar.* I can see all configuration under it, but not breakpoint.breakpoint.module.*.*. Still checking where/who takes care of this...
Comment #25
Gábor HojtsyThat would be the schema mapper then in getDefinition() in core/lib/Drupal/Core/Config/Schema/SchemaDiscovery.php with the * resolving in getFallbackName() in the same class I think.
Comment #26
vijaycs85Thanks @Gábor Hojtsy. Created #1940440: Fix schema discovery to identify schema with more than one wildcard and submitted patch to fix this problem. I can see the patch fixing the problem locally with an error on multiplier(Please refer attached screenshot). We can fix this array issue and wait for #1940440: Fix schema discovery to identify schema with more than one wildcard.
After applying patch in #1940440-1: Fix schema discovery to identify schema with more than one wildcard:
Array to string conversion error:
Comment #27
Gábor Hojtsy#1940440: Fix schema discovery to identify schema with more than one wildcard is now fixed and committed, so this should work :) Can someone verify?
Comment #28
vijaycs85Updating schema error mentioned in #26 and attaching screenshot of inspector form. Found an issue similar to #1928082: Make usage of book.settings:allowed_types consistent for multipliers:
This can be fixed as separate issue.
Comment #29
Gábor HojtsyLooks good to me, but we want to uppercase the module name too? :)
Comment #30
vijaycs85Sure, updating name...
Comment #31
Gábor HojtsyLooks good to me.
Comment #32
tstoecklerOpened #1945228: Repetitive config in breakpoint.module for #28. Would be awesome if someone could write-up an issue summary over there.
Comment #33
webchickCommitted to 8.x, thanks! I'll push once testbot has caught up a bit.
Comment #34.0
(not verified) CreditAttribution: commentedUpdated issue summary with remaining tasks