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 toolbar module.
Schema in place
Schema not yet in place
toolbar.breakpoints.yml
toolbar.config.yml
Comment | File | Size | Author |
---|---|---|---|
#12 | toolbar_schema.png | 653.09 KB | YesCT |
#12 | toolbar_configure.png | 166.28 KB | YesCT |
#8 | Selection_045.png | 20.32 KB | dsnopek |
#8 | Selection_046.png | 16.46 KB | dsnopek |
#8 | 1919212-toolbar-schema-8.patch | 768 bytes | dsnopek |
Comments
Comment #1
vijaycs85Adding schema file...
Comment #2
vyasamit2007 CreditAttribution: vyasamit2007 commentedSchema file with new changes and as per the updated schema documentation http://drupal.org/node/1905070#codestyle
Comment #3
rahuldolas123 CreditAttribution: rahuldolas123 commentedHi,
I tested the patch with config inspector module and I can only see the forms for 'toolbar.breakpoints.yml' file.
The form for 'toolbar.config.yml' file is not shown. The file toolbar.config.yml should be renamed to 'toolbar.settings.yml' so that both the settings can be visible.
screenshots:
toolbar.settings not shown:
Comment #4
rahuldolas123 CreditAttribution: rahuldolas123 commentedComment #5
vijaycs85Thanks @rahuldolas123. I have raised an issue #1925380: Rename toolbar.config.yml to toolbar.settings.yml to see if it has some reason to name it that way. For now, we leave schema file as it is. We will change, if it config file has to be toobar.config.yml.
postpone-ding until #1925380: Rename toolbar.config.yml to toolbar.settings.yml get fixed...
Comment #6
aspilicious CreditAttribution: aspilicious commentedComment #7
vijaycs85Patch in #2 is ready for review now
Comment #8
dsnopekLooking at the form for toolbar.settings in the config_inspector throws an error:
This should really be 'sequence' not 'string'. Attached is a new patch that fixes this!
However, no matter what I set for label it's always 'String' for the individual items of the sequence. Is it not possible to set labels on individual items of a sequence? Or is this a bug in the config_inspector?
Comment #9
sandipmkhairnar CreditAttribution: sandipmkhairnar commentedI have reviewed and apply the patch . Its working fine for me.
Comment #10
tim-e CreditAttribution: tim-e commentedLooking good to me
Comment #11
webchickCommitted and pushed to 8.x. Thanks!
Comment #12
YesCT CreditAttribution: YesCT commentedconfig_inspector was updated, had to get the latest.
the items in the sequence dont have a Label, so that is why they are all string.
I agree, no errors and everything looks good.
so still rtbc.
question: is there any form in the ui for the toolbar breakpoint settings? (toolbar.breakpoints.yml)
The toolbar configure link does not actually go anywhere.
Comment #13
webchickHm. I think that might've been a cross-post?
Comment #14
dsnopek@YesCT: I tried adding a label but it had no effect so, I didn't include it in the patch. Also, I'm not sure what the label should be! Should every item in the sequence have the label "Breakpoint"? Really, they should probably be labeled: 1, 2, 3, ... etc.