Sub-task of #2231059: [meta] Find out what config schemas are still missing and add them
Problem/Motivation
[#1910624]introduced configuration schema + test coverage for schema for default configuration in core. However there are still few areas that doesn't have schema coverage.
Proposed resolution
Provide config schema for below configurations:
color.bartik
color_test_theme.setting This is a test theme config object and therefore does not matter.
Comment | File | Size | Author |
---|---|---|---|
#12 | 2245729.12.patch | 16.35 KB | alexpott |
#12 | 8-12-interdiff.txt | 2.97 KB | alexpott |
#10 | config-inspector.png | 68.57 KB | vijaycs85 |
#8 | 2245729.8.patch | 15.97 KB | alexpott |
Comments
Comment #1
Gábor HojtsyHow did we miss color.bartik?! The color_test_theme would not be need to be covered due to being a test config. As per #2231059-27: [meta] Find out what config schemas are still missing and add them that is a won't fix. But color.bartik sounds like clearly missed?
Comment #2
jessebeach CreditAttribution: jessebeach commentedThis issue runs into #2248709: The root type of a configuration object can not be a sequence, in the sense that because we create config item names with the pattern
color.*
, where*
may have a value such asbartik
. Because of this, we can never introduce a global settings file for color with the patterncolor.settings
because the pattern of the configuration names suggests thatsettings
is a theme name.Comment #3
vijaycs85Reg #2, if the configuration name is color.* then we are good to write schema. the problem in #2248709: The root type of a configuration object can not be a sequence is the config name is color and it has different sub-elements. IMHO, for this issue, we are not blocked by #2248709: The root type of a configuration object can not be a sequence
Comment #4
Gábor Hojtsy@vijaycs85: I think the principle of the issues raised in #2248709: The root type of a configuration object can not be a sequence apply here though. If only a sequence is allowed as top level in the file, you cannot add further keys. If all color.* files are theme based, you cannot add one more file that is not theme based but has a concrete name. Its the same principle but on the CMI key level instead of the file content level.
Comment #5
vijaycs85Ok, I tried to see what we got in color.bartik manually and filed #2257225: Regression: color scheme form is broken in theme configuration page.
Comment #6
xjmThis issue is a beta blocker on its own, per discussion with @alexpott and @Gábor Hojtsy.
Comment #7
xjmComment #8
alexpottIn HEAD the color config objects are called color.THEMENAME - this means that schema would have to be color.*. In turn this means that the color module could never add generalised config file like color.settings.
The patch attached:
Comment #9
vijaycs85Looks great (specially assertConfigSchema() part :)).
Few minor
Missing label & comment on the first line.
big_user? you mean $admin_user?
docblock (for both class and method) need to be updated as per DefaultConfigTest -> configSchemaTestBase change.
Comment #10
vijaycs85Applied patch in #2221041: Color palette setting controls are duplicated and tested with Configuration inspector (needs #2257455: Code clean up: Fix the check for configuration schema. as well). All looks good.
Comment #12
alexpottFixed the broken test too :)
Comment #13
vijaycs85still not sure about how the label inherit. Though it is not a blocker.
Comment #14
webchick¡Holy Frijoles! Where did all that test code go? Do we lose all of that just from extending from WebTestBase?
Comment #15
alexpottnah we didn't lose it. We split the test to get an abstract to make it easy to test schema.
Comment #16
webchickRight, I see that but it doesn't seem to account for the math:
7 files changed, 123 insertions, 179 deletions.
And that's *with* adding several missing lines of YML. Hm.
Comment #17
alexpottBut the copy is not accounted for by that - the copy makes it look like we're removing far more than we actually are.
Without renames = copies
With renames = copies
Comment #18
webchickOh, weird. Ok, I'll take your word for it. Sorry for the false alarm.
Committed and pushed to 8.x. Thanks!
Comment #20
Gábor HojtsyYay, thanks!