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

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Gábor Hojtsy’s picture

Tagging for config schema.

vijaycs85’s picture

Status: Active » Needs review
FileSize
404 bytes

Adding patch

Status: Needs review » Needs work

The last submitted patch, 1912308-breakpoint-schema-2.patch, failed testing.

vijaycs85’s picture

Status: Needs work » Needs review
FileSize
420 bytes
402 bytes

updating type from sequence to string.

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

The last submitted patch, 1912308-breakpoint-schema-3.patch, failed testing.

vijaycs85’s picture

Status: Needs work » Needs review

#4: 1912308-breakpoint-schema-3.patch queued for re-testing.

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

The last submitted patch, 1912308-breakpoint-schema-3.patch, failed testing.

vijaycs85’s picture

Status: Needs work » Needs review
FileSize
466 bytes
396 bytes

Updating space issue with "mapping"...

YesCT’s picture

for 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.

vijaycs85’s picture

Updating code style fixes...

YesCT’s picture

Those 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.

sandipmkhairnar’s picture

updating label with changed mapping type of multipliers
schema form

rkjha’s picture

The coding style is good and the changes also seem to be reasonable.

mr.york’s picture

Status: Needs review » Reviewed & tested by the community

I tested the patch with the configuration inspector.
Data is well covered. Looks good.

mr.york’s picture

Issue tags: +SprintWeekend2013

Add #SprintWeekend tag :).

mr.york’s picture

Added Breakpoint and BreakpointGroup config entity definition to the breakpoint schema.

mr.york’s picture

Status: Reviewed & tested by the community » Needs review

Needs review.

Gábor Hojtsy’s picture

This did not actually seem to work with config inspector, so needs review/help.

rkjha’s picture

Status: Needs work » Needs review

The 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.

Status: Needs review » Needs work

The last submitted patch, 1912308-diff-12-16.patch, failed testing.

disasm’s picture

Thanks 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.

Gábor Hojtsy’s picture

The 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).

Gábor Hojtsy’s picture

Status: Needs review » Needs work

Can someone help cross-check and help figure out why it did not work? Maybe it would work right away for you :D

vijaycs85’s picture

@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...

Gábor Hojtsy’s picture

That 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.

vijaycs85’s picture

Status: Needs work » Postponed
FileSize
38.91 KB
42.42 KB

Thanks @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:
config_inspector_ui.png

Array to string conversion error:
config_inspector_error.png

Gábor Hojtsy’s picture

Status: Postponed » Needs review

#1940440: Fix schema discovery to identify schema with more than one wildcard is now fixed and committed, so this should work :) Can someone verify?

vijaycs85’s picture

Updating 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:

multipliers:
  1x: 1x

This can be fixed as separate issue.

breakpoint-1912308.png

breakpoint_group-1912308.png

Gábor Hojtsy’s picture

Status: Needs review » Needs work

Looks good to me, but we want to uppercase the module name too? :)

vijaycs85’s picture

Status: Needs work » Needs review
FileSize
1.94 KB

Sure, updating name...

Gábor Hojtsy’s picture

Status: Needs review » Reviewed & tested by the community

Looks good to me.

tstoeckler’s picture

Opened #1945228: Repetitive config in breakpoint.module for #28. Would be awesome if someone could write-up an issue summary over there.

webchick’s picture

Status: Reviewed & tested by the community » Fixed

Committed to 8.x, thanks! I'll push once testbot has caught up a bit.

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

Anonymous’s picture

Issue summary: View changes

Updated issue summary with remaining tasks