- Issue created by @phenaproxima
- Merge request !6026Commit fe80f76d7d34942756ed8a61108163d410b1eb68 from !4094 (#3364108) → (Closed) created by phenaproxima
- Status changed to Needs work
11 months ago 6:43pm 4 January 2024 - 🇺🇸United States effulgentsia
I committed the blocker issue, so this isn't postponed anymore.
- 🇺🇸United States effulgentsia
Something to think about here is upgrade path:
- Sites might have active config with keys that this MR makes invalid when
status=FALSE
. Do we want a postupdate function to remove those? - There might be contrib/custom modules/profiles with default config that includes these now-invalid keys. Do we want something that runs on module-enable and/or config-import that removes them?
- Sites might have active config with keys that this MR makes invalid when
- 🇧🇪Belgium wim leers Ghent 🇧🇪🇪🇺
RE #5:
- Yes, but … see point 2 👍 (and I don't know why I didn't do that in the original issue — shame on me — that's another great reason to have this split off 👍)
- The correct pattern that @catch has repeatedly pointed me to is to NOT do the actual update logic in a
hook_post_update_SOMETHING()
, but to do it inckeditor5_editor_presave()
(for CKE5-specific things) oreditor_editor_presave()
(for genericEditor
things) and have the post-update hook merely iterate over allEditor
config entities and detect whether it needs an update, and if so, resave it. That way, install profiles are also handled! 👍
Review
- I actually think it'd be better to split up this issue too: the
Editor
changes are much wider/broader than the CKEditor 5 changes (which are just marking already validatable things asFullyValidatable
) editor.editor.*
is being marked asFullyValidatable
but … it isn't really.
mapping: format: type: string label: 'Name'
is not yet validatable! We need to validate that if the value is
FOO
, that afilter.format.FOO
config entity exists.
- Assigned to wim leers
- 🇧🇪Belgium wim leers Ghent 🇧🇪🇪🇺
- 🇧🇪Belgium wim leers Ghent 🇧🇪🇪🇺
#6.2 is now addressed.
Next up (the last thing): #6.1. Created 📌 Mark config schema for CKEditor 5 text editor settings + each configurable CKEditor 5 plugin as FullyValidatable Active for that. That should allow this MR to be much smaller, and only touch
editor
-related changes, notckeditor5
-related changes 👍 - Issue was unassigned.
- Status changed to Needs review
10 months ago 2:01pm 22 January 2024 - 🇧🇪Belgium wim leers Ghent 🇧🇪🇪🇺
Change record created for the new functionality of
ConfigExists
: https://www.drupal.org/node/3416240 → - Status changed to Needs work
10 months ago 3:44pm 22 January 2024 - Assigned to phenaproxima
- Status changed to Needs review
10 months ago 5:37pm 23 January 2024 - 🇧🇪Belgium wim leers Ghent 🇧🇪🇪🇺
Addressed @phenaproxima's feedback on the MR 👍
Still to be done tomorrow by yours truly: validation for
editor.editor.*:image_upload.max_size
. - Assigned to wim leers
- Status changed to Needs work
10 months ago 7:19pm 23 January 2024 - 🇺🇸United States phenaproxima Massachusetts
A few requests for comments, but I think this is looking quite good!
- Issue was unassigned.
- Status changed to Needs review
10 months ago 2:49pm 24 January 2024 - 🇧🇪Belgium wim leers Ghent 🇧🇪🇪🇺
Ready for review again, with everything addressed 🤓
Change record created for
type: bytes
: https://www.drupal.org/node/3416738 → . - 🇧🇪Belgium borisson_ Mechelen, 🇧🇪
I think it makes sense to introduce
bytes
here, because that gives it a use already. Making max_size nullable looks like it some more fallout than expected, looking at the tests that are currently failing still? - 🇧🇪Belgium wim leers Ghent 🇧🇪🇪🇺
Making max_size nullable looks like it some more fallout than expected, looking at the tests that are currently failing still?
But that's necessary, because
''
is not a sensible value for "no limit". All green now — it wasn't too complicated, it was just a small oversight on my behalf 🙈 - 🇧🇪Belgium wim leers Ghent 🇧🇪🇪🇺
MR is green, and tighter in scope after a thorough self-review.
Issue summary updated, it is now complete. 👍
- 🇺🇸United States phenaproxima Massachusetts
Only a couple of questions but otherwise I'm quite happy with this!
- 🇧🇪Belgium wim leers Ghent 🇧🇪🇪🇺
Explain why
type: bytes
makes sense in the issue summary. - Status changed to RTBC
10 months ago 12:11pm 26 January 2024 - 🇺🇸United States phenaproxima Massachusetts
All my complaints and points are resolved. +1 RTBC! #shipit
- Status changed to Needs work
9 months ago 4:03pm 14 February 2024 - 🇬🇧United Kingdom catch
Moving this to needs work for the outstanding feedback on the MR.
I'm also wondering if the changes that are outside Editor module could be done in their own issue before this one?
- Assigned to wim leers
- Issue was unassigned.
- Status changed to Needs review
9 months ago 2:16pm 19 February 2024 - 🇧🇪Belgium wim leers Ghent 🇧🇪🇪🇺
Moving this to needs work for the outstanding feedback on the MR.
Addressed! 🏓
I'm also wondering if the changes that are outside Editor module could be done in their own issue before this one?
There's a few bits we can extract:
- Extracted ✨ Follow-up for #3324150: allow specifying a prefix for ConfigExistsConstraint, to enable using it for references to config entities Needs review
- Extracted ✨ New config schema data type: bytes Needs review
- 🇧🇪Belgium wim leers Ghent 🇧🇪🇪🇺
✨ Follow-up for #3324150: allow specifying a prefix for ConfigExistsConstraint, to enable using it for references to config entities Needs review landed, rebased MR 👍
- 🇧🇪Belgium wim leers Ghent 🇧🇪🇪🇺
✨ New config schema data type: bytes Needs review also landed! Rebased MR again. Another 3 fewer files changed.
- Status changed to RTBC
9 months ago 8:26pm 26 February 2024 - 🇺🇸United States phenaproxima Massachusetts
Everything in here makes sense to me. The weird parts are well-explained and commented. I feel pretty good slapping the RTBC on this!
- Assigned to wim leers
- Status changed to Needs work
9 months ago 11:52am 27 February 2024 - 🇧🇪Belgium wim leers Ghent 🇧🇪🇪🇺
Fixed a few details in the issue summary.
I'd like to tighten test coverage slightly more, for maximum confidence that this will not cause regressions.
- Status changed to Needs review
9 months ago 12:46pm 27 February 2024 - 🇧🇪Belgium wim leers Ghent 🇧🇪🇪🇺
Did what I promised in #30:
- https://git.drupalcode.org/project/drupal/-/merge_requests/6026/diffs?co...
makes the kernel test coverage more complete - https://git.drupalcode.org/project/drupal/-/merge_requests/6026/diffs?co... adds a missing functional JS test, to test end-to-end that
editor.editor.*:image_upload
, whose settings are presented by the\Drupal\ckeditor5\Plugin\CKEditor5Plugin\Image
plugin and still is a good citizen by reusingeditor_image_upload_settings_form()
, actually is A) correctly validated, B) still can be saved (🙈 in manual testing I discovered that it actually could not be saved in its prior RTBC state, because we only had kernel tests! 🙈)
- https://git.drupalcode.org/project/drupal/-/merge_requests/6026/diffs?co...
- Issue was unassigned.
- 🇧🇪Belgium wim leers Ghent 🇧🇪🇪🇺
Passing again 😊🚀
Now I'm confident this will not cause any problems for sites updating to this version 👍
- Status changed to Needs work
9 months ago 2:55pm 27 February 2024 - 🇺🇸United States phenaproxima Massachusetts
Liking the new test coverage! I have nits, and only one is blocking (an assert that doesn't actually assert anything). But otherwise, happy to restore RTBC once the one thing is fixed.
- Status changed to Needs review
9 months ago 4:53pm 27 February 2024 - Status changed to RTBC
9 months ago 5:03pm 27 February 2024 - Status changed to Needs work
9 months ago 9:38pm 29 February 2024 - 🇬🇧United Kingdom catch
Needs work for one point on the MR.
The other one probably isn't blocking but feels like a good idea.
- Status changed to RTBC
9 months ago 1:29pm 1 March 2024 - 🇧🇪Belgium wim leers Ghent 🇧🇪🇪🇺
One trivial change, so re-self RTBC'ing.
The other one probably isn't blocking but feels like a good idea.
I proposed on the MR to do this for all the recent occurrences of this in a single issue, so that it all is consistent, and they all become simple to remove.
Tagged for that, I hope you agree :)
- 🇬🇧United Kingdom catch
I haven't seen this anywhere in Drupal core?
The main example is ViewsConfigUpdater, but also a whole class seems like overkill for modules that might only have one config entity update in an entire major release. Follow-up is fine.
$max_filesize = $settings['max_size']
? Bytes::toNumber($settings['max_size'])
: Environment::getUploadMaxSize();Yes much better :)
- Status changed to Fixed
9 months ago 2:03pm 1 March 2024 - 🇬🇧United Kingdom catch
Committed/pushed to 11.x and cherry-picked to 10.3.x, thanks!
- Assigned to wim leers
- 🇧🇪Belgium wim leers Ghent 🇧🇪🇪🇺
This unblocked ✨ [PP-2] POST/PATCH config entities via REST for config entity types that support validation Needs work 🚀
Will definitely create that follow-up 👍
- 🇧🇪Belgium wim leers Ghent 🇧🇪🇪🇺
This also enables us removing some serious technical debt: 📌 Deprecate \Drupal\ckeditor5\Plugin\Editor\CKEditor5::validatePair() and `type: ckeditor5_valid_pair__format_and_editor` Active . 👍
Automatically closed - issue fixed for 2 weeks with no activity.
- 🇬🇧United Kingdom catch
Follow-up here 📌 ckeditor5 and editor module tests rely on hook_editor_presave() bc layers Active .
- 🇳🇿New Zealand quietone
@catch, thanks for pointing out the followup. I am removing the tag.
- 🇬🇧United Kingdom catch
The upgrade path added here introduces a fatal error if a filter format has gone missing, I think just because the editor config gets resaved when it might not have been previously, this is in 🐛 editor_post_update_sanitize_image_upload_settings fails Needs review .