Problem/Motivation

After #3231327: Plugin definition DX: validate ckeditor5.drupal.elements items and #3228505: Plugin definition DX: automatically check for plugin definitions whether their ::getDefaultSettings() matches the config schema, this still remains.

This would also help address #3246246: CKEditor 5 plugins needing more complex conditions.

Add validation ensuring that the values in CKEditor 5 plugin definition's drupal.conditions key are supported.

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Issue fork drupal-3248188

Command icon 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:

Issue fork ckeditor5-3248188

Command icon 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:

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Wim Leers created an issue. See original summary.

Wim Leers’s picture

Issue summary: View changes
Wim Leers’s picture

Issue summary: View changes
Wim Leers’s picture

Assigned: Wim Leers » Unassigned
Status: Active » Needs review
Issue tags: -Needs issue summary update +DX (Developer Experience)
bnjmnm’s picture

This is a good addition. The CKEditor 5 learning curve is going to be rough for most contributors, so anywhere we can catch clearly-incorrect config and provide useful guidance is great. It appears the test coverage accounts for all scenarios too.

I had some phrasing suggestions but other than that it's something I'd RTBC.

Wim Leers’s picture

Project: CKEditor 5 » Drupal core
Version: 1.0.x-dev » 9.3.x-dev
Component: Code » ckeditor5.module

Wim Leers’s picture

Addressed all of @bnjmnm's feedback in https://git.drupalcode.org/issue/ckeditor5-3248188/-/tree/3248188-plugin..., then ported it verbatim to https://git.drupalcode.org/issue/drupal-3248188/-/tree/3248188-plugin-de..., followed by me closing the first one.

Version: 9.3.x-dev » 9.4.x-dev

Drupal 9.3.0-rc1 was released on November 26, 2021, which means new developments and disruptive changes should now be targeted for the 9.4.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

bnjmnm’s picture

Patch to simplify this being added to multiple versions.

Wim Leers’s picture

🙏

bnjmnm’s picture

Status: Needs review » Reviewed & tested by the community

All my feedback was addressed a while back apparently! This is a useful additional layer of validation that does a good job explaining exactly what is needed to address a given error.

Wim Leers’s picture

🥳

  • lauriii committed e264ec6 on 10.0.x
    Issue #3248188 by Wim Leers, bnjmnm: Plugin definition DX: validate...

  • lauriii committed 9827f1e on 9.4.x
    Issue #3248188 by Wim Leers, bnjmnm: Plugin definition DX: validate...

  • lauriii committed 2f6cbfb on 9.3.x
    Issue #3248188 by Wim Leers, bnjmnm: Plugin definition DX: validate...
lauriii’s picture

Version: 9.4.x-dev » 9.3.x-dev
Status: Reviewed & tested by the community » Fixed

Committed e264ec6 and pushed to 10.0.x. Also cherry-picked to 9.4.x and 9.3.x because CKEditor 5 is experimental. Thanks!

Status: Fixed » Closed (fixed)

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