Problem/Motivation
Virtually every configuration entity has a label. There is no validation on this at all. There is a lot of freedom in what this string contains, but one thing is certain: it should not be empty. — the label of a configuration entity should not be empty, but some type: label occurrences are allowed to be empty — for example the site slogan or a field formatter's prefix/suffix.
Proposed resolution
Add validation constraints to (see @alexpott review in #25) Create a subtype of
# Human readable string that must be plain text and editable with a text field.
label:
type: string
label: 'Label'
translatable: true
that is named required_label and update at least all configuration entities' labels to use this update most configuration entities' labels to use this (exempt: Block, View because they have fallback label logic in their ::label() method), as well as other non-ambiguous cases.
In other words:
- keep
type: labelunchanged: do not add validation constraints to them - instead, add a new
type: required_label, which all code is then free to adopt
So then we end up with:
type: string= string, NOT translatabletype: label= string, translatabletype: required_label= string, translatable, REQUIRED
(Because optional labels still have a use case, for example field prefix/suffix.)
Impact as measured by #3324984: Create test that reports % of config entity types (and config schema types) that is validatable's ConfigSchemaValidatabilityTest (and diff before26.txt after26.txt):
- Config entity types
-
- ⏸️ 0.00% → 0.00% validatable (0 of 30 config types — excludes base types)
- 🆙 31.54% → 40.81% average config type validatability
- 🆙 39.50% → 43.63% validatable property paths (220 → 243 of 557 property paths — this excludes property paths for base types)
- Config types
-
- 🆙 6.01% → 6.64% validatable (38 → 42 of 632 → 633 config types — excludes base types)
- 🆙 28.90% → 30.05% average config type validatability
- 🆙 38.82% → 40.31% validatable property paths (1470 → 1527 of 3787 → 3788 property paths — this excludes property paths for base types)
Remaining tasks
- ✅
Failing tests→ #4 - ✅
Validation ⇒ passing tests→ #7 - ✅
Address @alexpott's review in #25 to stop adding constraints to→ #25 + #26type: labeland introducetype: required_labelinstead. - ✅
Create follow-up for→ #48 + #3380480: Views should require a label, rather than falling back to an unhelpful IDViewconfig entities triggering validation errors - ✅
Create follow-up for→ see #49 + #3380475: SearchPage entities implicitly require labels: make explicit, and fix migration from D7SearchPageconfig entities triggering validation errors
User interface changes
None.
API changes
None.
Data model changes
None. The data model evolves though, to eventually, in the distant future of #2164373: [META] Untie config validation from form validation — enables validatable Recipes, decoupled admin UIs … allow for config schema-powered validation:
- all configuration entities that have labels now use
type: required_labelinstead oftype: label, and have test coverage to prove this indeed triggers a validation error if config validation is executed (which happens ONLY in these tests for now) - 5 non-config entity examples were updated:
mail:subject(rationale: https://git.drupalcode.org/project/drupal/-/merge_requests/3690/diffs#no...), which also required a matching form definition changetype: field.formatter.settings.timestamp_ago'sfuture_formatandpast_format(rationale: https://git.drupalcode.org/project/drupal/-/merge_requests/3690/diffs#no...), which also required a matching form definition change — without this change invalid configuration was allowed that results in broken behavior!type: field.formatter.settings.datetime_time_ago: same as the above, because its logic is inherited from the abovetype: field.field_settings.boolean'son_labelandoff_label(rationale: see above), which did NOT require a matching form definition change:BooleanItem::fieldSettingsForm()was already correctly marking these as required 👍user.settings:anonymous, which did NOT require a matching form definition change:AccountSettingsForm::buildFormwas already correctly marking these as required 👍
The first 3 show how widespread the problem is of implicitly required config, and how it can result in broken sites.
- all other config is free to start adopting this new config schema type too, but it will have no effect for now
Note: this is only a theoretical data model change. Implicitly, many things in Drupal core assume all config entities have labels. See @kristiaanvandeneynde's comment at #58 for an example.
Release notes snippet
New config schema type: required_label. This is the required variant of the label type, to be able to distinguish between the pre-existing config schema type label (translatable string, MAY be an empty string) and when a string must be translatable and is required (MUST NOT be an empty string).
| Comment | File | Size | Author |
|---|---|---|---|
| #32 | 3324984-29-interdiff.txt | 2.48 KB | wim leers |
| #26 | after26.txt | 310.37 KB | wim leers |
| #26 | before26.txt | 313.49 KB | wim leers |
| #11 | Screen Shot 2023-03-22 at 2.44.45 PM.png | 2.16 MB | wim leers |
| #11 | Screen Shot 2023-03-22 at 1.50.55 PM.png | 501.88 KB | wim leers |
Issue fork drupal-3341682
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
wim leersTaking this on because nobody seems interested 😅
Comment #4
wim leersTests are pesent since 8fc9f0b7.
Comment #5
wim leersI just pushed
537e40d78cb8457979a12169f4bcfe823ede4d06.Well well now we find ourselves in a pretty much impossible position:
\Drupal\menu_ui\MenuForm::form(),descriptionis optional.\Drupal\system\MenuInterface::getDescription(), the return type is alwaysstring, notstring|null, so that implies it's not optional.This means that the reality is that the empty string is in fact treated as an acceptable value 🙈
The same pattern applies to:
ContactForm's\Drupal\contact\ContactFormInterface::getMessage()Vocabulary's\Drupal\taxonomy\VocabularyInterface::getDescription()This leaves only 3 simple solutions (more complex solutions are always possible!):
MenuInterface::getDescription()(and a number of other classes) → not acceptableLengthconstraint.The second choice is IMHO the best one. But it technically constitutes a data model change, even though virtually nobody is using config schema. The third choice is arguably the least disruptive, but also makes config schema validation less meaningful. The second choice is theoretically disruptive but clearly moves the entire config/config schema system to a place where all data & metadata becomes more meaningful.
Because the disruption is so highly theoretical, I'm for now going with option 2. And actually … the needed config schema type already exists:
Did that in
5630efacd75a70cb115bd3feae4b198a7e374bf2.Comment #6
wim leersThe failures in
\ValidKeysConstraintValidatorTest, are failing because thedefault
system.siteconfiguration hasslogan: ''andname: '', but both are oftype: label, so those trigger validation errors too.In the case of
name, it's only triggering a validation error because kernel tests bypass the installer (which would require the user to enter a site name).In the case of
slogan, the use oftype: labelis simply inappropriate.Fixed in
eb066c37002c7010e5157271056ad99b4b1c2461.Comment #7
wim leersThis should now be green! 🥳
Will update the issue summary tomorrow, calling it a day.
Comment #8
phenaproximaSome questions arise...
Comment #9
wim leersComment #11
wim leersRoot cause for remaining failures:
config_translationconfig schema integrationDetermined the root cause: #2144413: Config translation does not support text elements with a format's logic combined with
config_translation_config_schema_info_alter()not documenting reality 😬This MR indeed makes the site slogan not show up in the translation UI:
(Left = MR, right = HEAD.)
makes the test pass but actually makes things worse:
(Left = MR, middle = HEAD, right = MR + aforementioned one line change.)
But
config_translation_config_schema_info_alter()said:… apparently that is really to mean that only config schema types can be marked
translatable: true; a concrete config schema apparently is not allowed to specify it! Or rather, it's allowed (no validation error occurs), but it's not supported by Config Translation. Whether that's intentional or accidental is unclear. I suspect it's intentional.Turns out that there's at least two crucial follow-ups that never happened:
Proposed solution
Given that it appears intentional, the solution is actually fairly simple:
type: translatable_string, in addition totype: labelandtype: string. Change record created: https://www.drupal.org/node/3349638sloganto use this type instead.translatablein concrete config schema, since it is only allowed in type definitions.Just did that in
d394d6f09f1705b925da689970e3783f44d85680👍Comment #12
wim leersFollow-up created, including patch: #3349656: Config Translation only supports `translatable: true` at the top level, but has no validation to indicate this.
Comment #13
borisson_I went trough this MR a couple of times and the code looks ready to me. I agree with the approach taken in #5 and I think that will not be an issue in practice regarding BC.
We will need a change record to announce that new type, so adding the tag for that.
This comment can be considered a +1 on rtbc already, but not setting it to that because of the change record and issue summary update that are needed. I also think that that someone with more insight on the BC implications would need to comment on the change as well.
Comment #14
wim leersDid that yesterday already: https://www.drupal.org/node/3349638.
Will update the issue summary later today.
Comment #15
rajeshreeputraOverall changes looks good. Only this as I mentioned over MR, can have description to new methods added, so it describe what it do, Otherwise +1 for RTBC.
Comment #16
smustgrave commentedOnly moving to NW for the issue summary update
Looking at MR 3690 it appears all threads have been answered.
Applied the patch locally to checkout the tests.
Reverted core/modules/taxonomy/config/schema/taxonomy.schema.yml and core/modules/contact/config/schema/contact.schema.yml
Ran testLabelValidation against those two sets and got Failed asserting that two arrays are identical.
Comment #17
wim leersWhile working on the issue summary update, I noticed/realized that #11 should be applied to all places where
{ type: label }was being changed to{ type: string, translatable: true }, not only for the site slogan (which happens to be the one thing with test coverage).So: applying it to those too.
Comment #18
wim leers10.1.xchangesComment #19
borisson_With all tests now being green this looks like it is good to go. I had already reviewed in depth in #13 and the new change in #17 sounds like it makes sense, but also signals missing test coverage for those things. We should probably add that as a followup?
Comment #20
wim leersComment #21
wim leersFixed markup.
#19: thank you! 😊 🙏
Agreed. Created #3357126: Test to assert every config property path that has `translatable: true` can be translated using the UI for this.
Comment #22
joachim commented> Virtually every configuration entity has a label. There is no validation on this at all. There is a lot of freedom in what this string contains, but one thing is certain: it should not be empty.
This is a great feature, but I'm confused -- ConfigEntityBase has no validate(), so where will config entities get validated?
The validate() method is on FieldableEntityInterface, so only content entity types have it.
Comment #23
wim leersCorrect. Nothing is using it yet. Because not a single piece of configuration is 100% validatable by config.
See #2164373: [META] Untie config validation from form validation — enables validatable Recipes, decoupled admin UIs ….
Comment #25
wim leersHad a long discussion with @alexpott in Drupal Slack about this.
His initial reaction:
My initial reaction: — sad laughter followed.
His follow-up question was … another great question. I started responding. And that's when I realized that telling people to move from
type: labeltotype: translatable_stringis difficult to convey. Plus, there are cases where things are labels, but they are optional: theprefixandsuffixsettings on e.g.integerfields. They both default to the empty string (see\Drupal\Core\Field\Plugin\Field\FieldType\IntegerItem::defaultFieldSettings()).That's why the MR changes their config type:
But … that's where I realized @alexpott was right from the very beginning: it’s easier to flip things around:
labelunchanged: do not add validation constraints to themrequired_label, which all code is then free to adoptSo then we end up with:
string= string, NOT translatablelabel= string, translatablerequired_label= string, translatable, REQUIRED(Because optional labels still have a use case, for example this prefix/suffix thing.)
@alexpott on that conclusion:
Let's do this! 💪
Comment #26
wim leersWow, that was a lot more change. But likely reduces future disruption. 👍
(None of the disruption would have happened immediately because as @joachim asked: "what would the impact be?" → none for now, since config validation is not used anywhere, because not a single piece of configuration has 100% validation constraint coverage.)
Having done this …I now do wonder if @alexpott was on to something when he pondered whether we should deprecate
type: label: Would it be clearer/simpler if we deprecatedtype: labeland forced everyone to choose between a newtype: optional_labelvstype: required_label? 🤔Comment #27
borisson_Tests seem to indicate something is still broken.
Comment #28
wim leersI also need to update the CR.
Comment #30
wim leersTurns out the test failures were due to a stupid mistake I made in the commit in which I changed from the
type: translatable_stringapproach to thetype: required_labelapproach that @alexpott recommended: I forgot to restoretranslatable: true🙈😬Also, #3349293: Make assertions using ConfigEntityValidationTestBase::assertValidationErrors() clearer landed since this merge request was last updated, and that changed
::assertValidationErrors()slightly, adjusting for that too.Comment #31
wim leersComment #32
wim leersTo update the impact measurement, I applied #3324984-29: Create test that reports % of config entity types (and config schema types) that is validatable, but then I had to apply a relative patch to update expectations. That's attached. Issue summary updated.
Comment #33
wim leersChange record updated.
Comment #34
wim leersAddressed @phenaproxima's concern from ~4 months ago on the MR thanks to the pivot in #25 + #26. Opened #3377030: Add validation constraint to `type: label`: disallow multiple lines to address that instead, to keep the scope of this issue clear.
Comment #35
borisson_This new type is quite simple, and we are using it in a couple of places already. I would love to get #3361534: KernelTestBase::$strictConfigSchema = TRUE and BrowserTestBase::$strictConfigSchema = TRUE do not actually strictly validate in first. I don't think that might expose new errors here, since we are only using this in a few new places but still think it makes sense to get that one in to ensure we don't introduce new schema errors here.
I don't see anything in this patch I don't understand anymore, and the new places this is used are all sensible.
Comment #36
wim leersMerged in
origin/11.xnow that #3361534: KernelTestBase::$strictConfigSchema = TRUE and BrowserTestBase::$strictConfigSchema = TRUE do not actually strictly validate landed: very curious to see if this triggers new test failures, just like @borisson_ said in #35… 🤓Comment #37
borisson_There are a couple of failures in nightwatch tests.
Comment #38
wim leersActually, this triggered many hundreds of kernel test failures. Yay for #3361534: KernelTestBase::$strictConfigSchema = TRUE and BrowserTestBase::$strictConfigSchema = TRUE do not actually strictly validate doing what it was intended to do!
Comment #39
wim leersPatterns:
NodeType::create(['type' => 'someting'])->save()— i.e. without the label key ('name')CommentType('label')ImageStyle('label')View('label')EntityViewMode('label')DateFormat('label')This is not surprising, given that we've specifically made config entity labels required. Which is the correct thing to do because config entities' annotations specifically indicate that the label is required.
I've done a first (very big) batch of fixing these. This is an example of how config validation helps makes test A) more reliable, B) more representative of real sites.
This also makes it clear that this would be fairly disruptive for contrib/custom modules' test coverage:
NodeType::create()is likely to be fairly common there too. The fix is obviously trivial though … but still, it has a wide (but simple) impact. So tagging . This sort of touches upon #3361423: [meta] Make config schema checking something that can be ignored when testing contrib modules — see theif (self::convertViolationsToDeprecation($this->schema->getRoot())) {snippet in that PoC MR to see how that could work based on any combination of conditions: core vs contrib/custom, test vs non-test, Drupal core version-dependent, …Unassigning, because switching to other work before starting the weekend 🤓 This is definitely available for others to continue though! 😊 Otherwise, will continue this next week!
EDIT: those commits made test results go from 639 failures to 531 👍
Comment #40
wim leersFixing tags.
Comment #41
wim leers😬
Comment #42
wim leersGreat progress here by @phenaproxima! 🤩
In Slack, he raised:
I can add one more to that list: Views. Because it has this logic in
View::label():That already ensures Views' admin UI remains usable. 👍
Comment #43
phenaproximaRe #42:
I would ask that we don't make view labels optional. To me, these are entities that absolutely should be labeled - the ID may or may not be descriptive or useful. To me, Views is doing a strange (but very Views-like) thing here by repurposing the ID as the label. We should, in my opinion, rip out that logic in a follow-up, ensure labels are required in the UI, and add an update path.
Besides, selfish reasons: it took a long time of updating the well over 100 test views scattered throughout core to ensure they all had labels. This was responsible for a BIG chunk of the test failures. I guess we don't need to revert all that work, regardless of what we chose...but to me, it's worth the pain if we make views act a little more sanely.
Comment #44
wim leers👍 That works for me! 😊
Then let's add some logic to
\Drupal\views\Entity\View::label()that detects the absence of a label and triggers a deprecation error, and says that falling back to the ID as the label will be removed in Drupal 11?Comment #45
wim leershttps://git.drupalcode.org/project/drupal/-/merge_requests/3690/diffs?co... changes the update path fixture. Let's not do that. Let's revert the config schema change for
field.value.string:valueinstead.It kinda doesn't make sense that
''(the empty string) is a valid default value because that's meaningless … but it's also just harmless 😊That also means less disruption and more focus in this issue. In the future, every single field type can choose to make things more strict! 🤓
Comment #46
phenaproximaWelp, it's passing tests! I think this is ready. Sorry for the massive change set -- a lot of tests were previously doing the "wrong" thing (creating certain entities without labels), which is now fixed. But it meant fixing a lot of tests, and especially a lot of test views. Whew!
Comment #47
borisson_This looks great, I found 2 nitpicks in the code, this looks very big but most of the changes are because of the change in views. I wonder if we need an update hook to change all existing views to give them the id as a label if no label has been set?
Comment #48
wim leers268 files changed. 😳😳😳 🤯 I think that this means it's nearly impossible to land this issue… 😅
Now, don't get me wrong: every single one of the
view.*.ymlupdates you made is valuable and not in vain. But I think that it's unreasonable to expect a core committer will sit through and read all of this in detail.IMHO the more reasonable approach is to ignore certain patterns, just like we did in #3361534: KernelTestBase::$strictConfigSchema = TRUE and BrowserTestBase::$strictConfigSchema = TRUE do not actually strictly validate with validation constraint messages, and to then defer the concrete fixes to follow-up issues (i.e. #3362457: Fix all PluginExistsConstraint constraint violations in tests, #3362456: Fix all ExtensionExistsConstraint constraint violations in tests etc.)
That way, this issue would be able to land much sooner. However, that infrastructure does not yet exist. I'm introducing it over at #3364109: Configuration schema & required values: add test coverage for `nullable: true` validation support, see https://git.drupalcode.org/project/drupal/-/merge_requests/4092/diffs?co... and some subsequent commits.
Using
git diff 5052fcddde7744bd1f78f21bbcfe0a502bd44cd0 HEAD -- **/views.view.*.ymlit's easy to revert (and extract!) virtually all the Views changes programmatically. The remainder I checked manually. That brings it from 268 changed files to only 166. 👍So let's bring that infrastructure here, so that I can defer the gazillion
Viewconfig entity updates to a separate issue.Also because the upgrade path is an important question, as @borisson_ points out in #47. That'd be another can of wriggly, scary worms 🪱🥫😅Nope, this is not really a concern, since 100% of the modified config entities are test config entities only: if they had been created through the UI, they would have had labels. Verify that ONLY test config is being modified by grepping the patch forconfig/installandconfig/optionaland … 0 matches are found! 👍😊One more non-trivial change is being made: to the Search module's migration path. So, extracting that next.
Comment #49
wim leersWe definitely needed to revert the Search-related changes because
MigrateSearchPageTestwas not receiving updated test coverage as part of this — which means the existing test coverage is inadequate 😅(Well,
SchemaCheckTraitwas triggering a validation error, but that's not explicit test coverage for the now more complicated migration logic. Which is exactly what made this hard to review, and what will be simple to review in a follow-up issue!)Done.
As far as I'm concerned, this is now RTBC. But I worked too much on this issue to RTBC it 😇 Will create the follow-ups for Views & Search as soon as @phenaproxima +1s what I'm proposing in #48 and here.
Comment #50
borisson_Good to know that the upgrade path is not needed, this makes this one indeed a lot smaller. I had already looked at the other issue and I think the infrastructure for partial ignores from there does indeed make this a lot easier to review.
RTBC, but we still need the follow-ups Wim mentioned in #49. Hopefully the tests agree with me here, because they haven't returned from the bot yet.
Comment #51
phenaproximaI'm okay with whatever gets this issue landed. Kicking back for the follow-ups.
Comment #52
wim leersIf you have the bandwidth, could you create those follow-ups? 🙏 I'm dealing with a lot of other config schema validation issues 😇
Comment #53
phenaproximaOpened #3380475: SearchPage entities implicitly require labels: make explicit, and fix migration from D7 for the search stuff.
Comment #54
phenaproximaAnd #3380480: Views should require a label, rather than falling back to an unhelpful ID to handle Views.
Comment #55
phenaproximaRestoring RTBC per #50, now that the follow-ups are created. Hopefully we can get a release manager to commit this.
Comment #56
catchI think this is fine if we do #3379899: Follow-up for #3361534: config validation errors in contrib modules should cause deprecation notices, not test failures, so that it only becomes a deprecation error. I am not sure we should be adding more of these to 10.2.x before that lands though since 10.2.x branching/alpha is not all that far away at this point.
So I guess that means we could remove the RM review tag if this is PP-1, or keep it on if there's a reason to do this first?
Comment #57
wim leers100% agreed that we should do #3379899: Follow-up for #3361534: config validation errors in contrib modules should cause deprecation notices, not test failures.
I don't think this needs to be blocked on #3379899 though, because that one is trivial to add, and does not conflict with this at all. But, from a release manager POV that sequencing makes things simpler, so let's postpone this on that one. 👍
Thanks, @catch! 😊
Comment #58
kristiaanvandeneyndeOne thing I don't see mentioned here is that core allows config entities to have no label but in other places expects there to be one. This problem hit Group particularly hard with the entire Views creation wizard breaking because I stopped providing a label for one of my bundle entities. ConfigEntityBase has no label method and uses EntityBase's, which allows to return NULL as label.
See #3324506: Group relationship type no longer has a label, leading to PHP warnings all over the place, especially comments 10 through 13
From what I can tell, this issue is merely adding a new schema type and making sure large parts of core are updated to use that. But what's the expectation here? Can we still have config entities without labels (like Block) or is everything expected to follow suit at some point, like the spinoff Views issue shows?
I do apologize for the small sidetrack this creates, but I feel this might need to be discussed (or at least considered) before we move in a particular direction and then end up having our hand forced regarding how we treat config without labels because we landed this piece already.
Comment #59
lauriiiCommitted the blocker.
Comment #60
lauriiiComment #61
wim leers#59: yay! 😊 Merged in upstream, only a trivial conflict in
SchemaCheckTrait. 👍#58:
SchemaCheckTrait::$ignoredPropertyPaths, i.e.ViewandSearchPageconfig entities and they have follow-up issues: #3380475: SearchPage entities implicitly require labels: make explicit, and fix migration from D7 and #3380480: Views should require a label, rather than falling back to an unhelpful ID. There, we will determine what the appropriate course of action is. Rationale: every config entity type in Drupal core that has a UI supports labels, to be able to provide a good admin UX. Which in turn implies the label should be required for that good admin UX to actually be possible. (Note that some config entity types have never supported labels, for exampleRestResourceConfig.)ViewandSearchPage, due to the above).\Drupal\Core\Config\Entity\ConfigEntityBase, which means the inherited\Drupal\Core\Entity\EntityBase::label()still applies, which means that according to the type hint, a return value ofnullis still allowed. We cannot change this, that would be a BC break. We can consider changing that in the future, but it'd be a significant change. And would break many config entity types.ConfigEntityBundleBase(introduced in #2261369: Introduce a common config entity base class for all bundle config entity types) and make labels required there. Because those are not just any config entity types, they're used as bundles for some entity types, and then it indeed makes sense to force implementors to provide a label, otherwise anything entity-reference-related is unable to provide a good admin UX. Also see\Drupal\Core\Entity\EntityType::getBundleLabel(), which makes it even more explicit that it's a built-in assumption that entity bundles need to be able to have human-readable labels. Furthermore, there already is ano_uikey-value pair for the@FieldTypeplugin annotation, which is dealing with exactly this use case, and it's also in the Entity/Field API space. So I suggest creating a new issue, propose allowing entity bundle config entity types to have ano_uiannotation, and reference these related issues 😊 But all of that is for sure out of scope, because:type: config_entityconfig schema data type incore.data_types.schema.yml, it's only modifying concrete config entity types' schema definitions.Comment #62
lauriiiAsked few questions on the MR
Comment #63
wim leersThanks for adding the links, @phenaproxima, but you seem to have accidentally merged in an older version of this branch/MR, causing all the
views.view.*.ymlchanges to be reinstated 😅 And also a merge oforigin/11.xthat is identical to what I had pushed a day prior. I went back to0cd5b9a7and cherry-picked the todo-linking commit to get back to a simpler history.This is one of the many symptoms why I am not so sure that this GitLab issue fork + MR workflow truly is simpler than patches. 🙈 I've made similar mistakes in the past, because
gitsometimes just gets in the way. If we'd be able to rebase on upstream instead of merge in upstream and GitLab's UI would suggest to go to the newly pushed version of the same commit, then it'd be a lot simpler.Next: addressing @lauriii's other comments.
Comment #64
kristiaanvandeneyndeThanks for addressing my concerns Wim.
Comment #65
kristiaanvandeneyndeComment #66
wim leers@lauriii asked some excellent questions, but my git archeology shows that the changes are correct 😇
I would be totally fine moving these changes out of this issue, but at the same time I think these are just a few good examples for others to follow. It also demonstrates how (frighteningly) widespread the problem is 😱
Comment #67
wim leersCross-posted with @kristiaanvandeneynde, resulted in the node getting unpublished — republishing this issue.
Comment #68
wim leersSo basically, I think the 2 examples @lauriii questioned and for which I did the necessary research … show how incredibly pervasive the problem is … and that probably most admin UIs in Drupal core contain bugs like this 😅🙈
EDIT: to help improve this ecosystem-wide, we could do something like #3364506-68: Add optional validation constraint support to ConfigFormBase 🤓
But there's a grand total of 5 more config schema changes beyond making labels required for all config entities that actually store labels, so updated the issue summary to list all 5.
Restoring RTBC state, because I believe all of @lauriii's feedback has been addressed, and per #64, so have @kristiaanvandeneynde's.
Comment #71
lauriiiCommitted 67360f2 and pushed to 11.x. Thanks!