Skip to content

Conversation

markocikos
Copy link
Collaborator

References

What is the goal of this PR?

Enabling addition of any official CKE5 plugin through CX.

Technical notes inline

What does it look like?

image

@markocikos markocikos requested review from dsanz and izaera October 9, 2025 13:52
@markocikos markocikos self-assigned this Oct 9, 2025
@liferay-continuous-integration
Copy link
Collaborator

CI is automatically triggering the following test suites:

  •     ci:test:sf

@liferay-continuous-integration
Copy link
Collaborator

Test suite sf has been triggered on http://test-1-28

@liferay-continuous-integration
Copy link
Collaborator

❌ ci:test:sf - 0 out of 1 jobs passed in 6 minutes

Ran com.liferay.source.formatter at released version 1.0.1543.
*The latest version has not been released.

Click here for more details.

Base Branch:

Branch Name: master
Branch GIT ID: ed3cb618e52041fd2363824775d55676fc9a2aa4

Sender Branch:

Branch Name: LPD-67267
Branch GIT ID: ec01d7bc3d957fb211e55f6e69b662aae463d894

0 out of 1 jobs PASSED
For more details click here.
     [exec] > Task :packageRunCheckFormat
     [exec] yarn run v1.22.22
     [exec] \$ node-scripts check:ci
     [exec] 
     [exec] ⚙️ Running preflight checks...
     [exec] 
     [exec]    · apps/frontend-editor/frontend-editor-ckeditor-sample-web/package.json: BAD - dependency not provided by a specific module: ckeditor5 - See https://issues.liferay.com/browse/LPS-168443
     [exec] 
     [exec] ⚙️ Checking outdated tsconfig.json files ...
     [exec]    · apps/frontend-editor/frontend-editor-ckeditor-web/package.json: BAD - dependency not provided by a specific module: @ckeditor/ckeditor5-react - See https://issues.liferay.com/browse/LPS-168443
     [exec] 
     [exec]    · apps/frontend-editor/frontend-editor-ckeditor-web/package.json: BAD - dependency not provided by a specific module: ckeditor5 - See https://issues.liferay.com/browse/LPS-168443
     [exec] 
     [exec] 
     [exec] ⚙️ Running TypeScript checks on modified files...
     [exec] ℹ️ A total of 12 CPUs were detected: launching tsc using 12 workers
     [exec] ✅ Checked apps/frontend-editor/frontend-editor-ckeditor-web
     [exec] ✅ Checked apps/frontend-editor/frontend-editor-ckeditor-sample-web
     [exec] ✅ Checked apps/object/object-js-components-web
     [exec] 
     [exec] ⚙️ Running format checks on modified files...
     [exec] ❌ CI checks failed.
     [exec] error Command failed with exit code 1.
     [exec] info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
     [exec] 
     [exec] > Task :packageRunCheckFormat FAILED
     [exec] Gradle build finished at 2025-10-09 13:57:56.813.
     [exec] 
     [exec] 
     [exec] FAILURE: Build failed with an exception.
     [exec] 
     [exec] * What went wrong:
     [exec] Execution failed for task ':packageRunCheckFormat'.
     [exec] > Process 'command '/opt/dev/projects/github/liferay-portal/build/node/bin/node'' finished with non-zero exit value 1
     [exec] 
     [exec] * Try:
     [exec] > Run with --info or --debug option to get more log output.
     [exec] > Run with --scan to get full insights.
     [exec] > Get more help at https://help.gradle.org.
     [exec] 
     [exec] * Exception is:
     [exec] org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':packageRunCheckFormat'.
     [exec]   at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.lambda\$executeIfValid\$1(ExecuteActionsTaskExecuter.java:148)

@liferay-continuous-integration
Copy link
Collaborator

})),
{in: path.resolve(mainEntryPoint), out: 'index'},
],
external: ['ckeditor5'],
Copy link
Collaborator Author

@markocikos markocikos Oct 9, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is technically not needed. Imports from DXP modules could work with something like

import {ButtonView, Plugin} from 'frontend-editor-ckeditor-web';

but this provides better developer experience. VS code, and I assume other IDEs, can resolve from 'ckeditor5';, as they "think" it's direct dependency, without a layer in between. Resolving though 'frontend-editor-ckeditor-web' confuses VSC.

In addition, a developer can find in the package anything it expects in the official package. They don't need to be aware of the layer in between, and consider exports of frontend-editor-ckeditor-web.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's OK to use an external, but this external should go in the global node-scripts.config.js file. Otherwise we will start spreading stuff in several places, like we did in liferay-npm-scripts before, and the maintenance will become a nightmare.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't global node-scripts.config.js autogenerated? How would you do this? Setting needs to be added to esbuild config in the end.

We could do the same as with aliases, add a new property to node-scripts.config.js , and something like getProjectExternal() in node_scripts. There are not many modules that import from ckeditor5, it's just frontend-editor-ckeditor-web and frontend-editor-ckeditor-sample-web. In DXP it would not be an issue, as we rarely need to override default presets. But customers would need to know that they need to add this setting for a custom OSGi module.

Comment on lines +10 to +14
export * from '@ckeditor/ckeditor5-adapter-ckfinder/dist/index.js';
export * from '@ckeditor/ckeditor5-alignment/dist/index.js';
export * from '@ckeditor/ckeditor5-autoformat/dist/index.js';
export * from '@ckeditor/ckeditor5-autosave/dist/index.js';
export * from '@ckeditor/ckeditor5-basic-styles/dist/index.js';
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried

export * from 'ckeditor5';

but I couldn't make it work.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That could probably be because node-scripts wasn't able to infer the exported symbols.

// @ts-ignore

import {ClassicEditor} from 'frontend-editor-ckeditor-web';
import {CKEditor4ClassicEditor as ClassicEditor} from 'frontend-editor-ckeditor-web';
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Without this change, there are two ClassicEditors: one we previously had, and new one re-exported from ckeditor5.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wouldn't this be a breaking change from the customer perspective? Or is it that import {ClassicEditor} from 'frontend-editor-ckeditor-web'; wasn't really an API for external consumption?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point. Lines are very blurry when it comes to external vs internal. I'll try to find an alternative solution.

Copy link
Collaborator Author

@markocikos markocikos Oct 10, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I pushed

export {
	ClassicEditor as BaseCKEditor5ClassicEditor,
	ClassicEditorUI,
	ClassicEditorUIView,
} from '@ckeditor/ckeditor5-editor-classic/dist/index.js';

It makes for slightly more difficult base CKE5 version upgrade, as content of that package could change, but it preserves backwards compatibility.

@markocikos
Copy link
Collaborator Author

ci:test:relevant

@liferay-continuous-integration
Copy link
Collaborator

Test suite relevant has been triggered on http://test-1-39

@liferay-continuous-integration
Copy link
Collaborator

❌ ci:test:stable - 10 out of 12 jobs passed

❌ ci:test:relevant - 16 out of 20 jobs passed in 1 hour

Click here for more details.

Base Branch:

Branch Name: master
Branch GIT ID: 4a7943d4bb3c08c4d0ea8f2359b17a0c50f7a371

Upstream Comparison:

Branch GIT ID: 35b358dd6eee8890caceac1f40aa848c4158eb75
Jenkins Build URL: EE Development Acceptance (master) - 164 - 2025-10-03[16:42:27]

ci:test:stable - 10 out of 12 jobs PASSED
10 Successful Jobs:
    ci:test:relevant - 16 out of 20 jobs PASSED

    4 Failed Jobs:

    16 Successful Jobs:
      For more details click here.

      Failures unique to this pull:

      1. js-unit/0/0
        1. :apps:dynamic-data-mapping:dynamic-data-mapping-form-web:packageRunTest
        2. :apps:data-engine:data-engine-taglib:packageRunTest
        3. :apps:dynamic-data-mapping:dynamic-data-mapping-form-field-type:packageRunTest
          1. apps.dynamic-data-mapping.dynamic-data-mapping-form-field-type.test.js.DatePicker./opt/dev/projects/github/liferay-portal/modules/apps/dynamic-data-mapping/dynamic-data-mapping-form-field-type/test/js/DatePicker/DatePicker.es.js
          2. apps.dynamic-data-mapping.dynamic-data-mapping-form-field-type.test.js.NumericInputMask./opt/dev/projects/github/liferay-portal/modules/apps/dynamic-data-mapping/dynamic-data-mapping-form-field-type/test/js/NumericInputMask/NumericInputMask.js
          3. apps.dynamic-data-mapping.dynamic-data-mapping-form-field-type.test.js.RichText./opt/dev/projects/github/liferay-portal/modules/apps/dynamic-data-mapping/dynamic-data-mapping-form-field-type/test/js/RichText/RichText.spec.js
          4. apps.dynamic-data-mapping.dynamic-data-mapping-form-field-type.test.js.Select./opt/dev/projects/github/liferay-portal/modules/apps/dynamic-data-mapping/dynamic-data-mapping-form-field-type/test/js/Select/Select.tsx
          5. apps.dynamic-data-mapping.dynamic-data-mapping-form-field-type.test.js.Separator./opt/dev/projects/github/liferay-portal/modules/apps/dynamic-data-mapping/dynamic-data-mapping-form-field-type/test/js/Separator/Separator.tsx
          6. ...
        4. ...
      2. js-unit/1/0
        1. :dxp:apps:portal-workflow:portal-workflow-kaleo-designer-web:packageRunTest
          1. dxp.apps.portal-workflow.portal-workflow-kaleo-designer-web.test.js.designer.definition-builder./opt/dev/projects/github/liferay-portal/modules/dxp/apps/portal-workflow/portal-workflow-kaleo-designer-web/test/js/designer/definition-builder/DefinitionBuilder.js
          2. dxp.apps.portal-workflow.portal-workflow-kaleo-designer-web.test.js.designer.definition-builder.diagram-builder./opt/dev/projects/github/liferay-portal/modules/dxp/apps/portal-workflow/portal-workflow-kaleo-designer-web/test/js/designer/definition-builder/diagram-builder/DiagramBuilder.js
          3. dxp.apps.portal-workflow.portal-workflow-kaleo-designer-web.test.js.designer.definition-builder.diagram-builder.components.sidebar./opt/dev/projects/github/liferay-portal/modules/dxp/apps/portal-workflow/portal-workflow-kaleo-designer-web/test/js/designer/definition-builder/diagram-builder/components/sidebar/Sidebar.spec.js
        2. :apps:object:object-web:packageRunTest
          1. apps.object.object-web.src.main.resources.META-INF.resources.js.tests.ModelBuilder.Diagram./opt/dev/projects/github/liferay-portal/modules/apps/object/object-web/src/main/resources/META-INF/resources/js/tests/ModelBuilder/Diagram/Diagram.spec.tsx
          2. apps.object.object-web.src.main.resources.META-INF.resources.js.tests.ModelBuilder.ObjectDefinitionNode./opt/dev/projects/github/liferay-portal/modules/apps/object/object-web/src/main/resources/META-INF/resources/js/tests/ModelBuilder/ObjectDefinitionNode/ObjectDefinitionNodeFields.spec.tsx
          3. apps.object.object-web.src.main.resources.META-INF.resources.js.tests.ModelBuilder.RightSidebar./opt/dev/projects/github/liferay-portal/modules/apps/object/object-web/src/main/resources/META-INF/resources/js/tests/ModelBuilder/RightSidebar/RightSidebarObjectDefinitionDetails.spec.tsx
          4. apps.object.object-web.src.main.resources.META-INF.resources.js.tests.ObjectActions./opt/dev/projects/github/liferay-portal/modules/apps/object/object-web/src/main/resources/META-INF/resources/js/tests/ObjectActions/ActionBuilder.spec.tsx
          5. apps.object.object-web.src.main.resources.META-INF.resources.js.tests.ObjectDefinition./opt/dev/projects/github/liferay-portal/modules/apps/object/object-web/src/main/resources/META-INF/resources/js/tests/ObjectDefinition/ModalAddObjectDefinition.spec.tsx
          6. ...
        3. :apps:object:object-dynamic-data-mapping-form-field-type:packageRunTest
        4. ...

      For upstream results, click here.

      Test bundle downloads:

      @liferay-continuous-integration
      Copy link
      Collaborator

      @markocikos
      Copy link
      Collaborator Author

      ci:test:sf

      @liferay-continuous-integration
      Copy link
      Collaborator

      Test suite sf has been triggered on http://test-1-31

      @liferay-continuous-integration
      Copy link
      Collaborator

      Test suite relevant has been triggered on http://test-1-28

      @liferay-continuous-integration
      Copy link
      Collaborator

      CI is automatically triggering the following test suites:

      •     ci:test:relevant
      •     ci:test:sf
      •     ci:test:stable

      The pull request will automatically be forwarded to the user brianchandotcom If the following test suites pass:

      •     ci:test:relevant
      •     ci:test:sf
      •     ci:test:stable

      @liferay-continuous-integration
      Copy link
      Collaborator

      Skipping previously passed test suites:

      • ci:test:sf

      @liferay-continuous-integration
      Copy link
      Collaborator

      ✔️ ci:test:stable - 12 out of 12 jobs passed

      ❌ ci:test:relevant - 56 out of 69 jobs passed in 60 minutes

      Click here for more details.

      Base Branch:

      Branch Name: master
      Branch GIT ID: 88175d6f657b94f7ec9c84c23db094335bee7a6c

      Upstream Comparison:

      Branch GIT ID: 8c2607ab8449e553fcf2b95edf23c18be93ad869
      Jenkins Build URL: EE Development Acceptance (master) - 175 - 2025-10-08[12:42:46]

      ci:test:stable - 12 out of 12 jobs PASSED
      12 Successful Jobs:
        ci:test:relevant - 56 out of 69 jobs PASSED

        13 Failed Jobs:

        56 Successful Jobs:
          For more details click here.

          Failures unique to this pull:

          1. ...

          For upstream results, click here.

          Test bundle downloads:

          @liferay-continuous-integration
          Copy link
          Collaborator

          @markocikos
          Copy link
          Collaborator Author

          ci:report:340018391

          @liferay-continuous-integration
          Copy link
          Collaborator

          Test suite default has been triggered on http://test-1-31

          @liferay-continuous-integration
          Copy link
          Collaborator

          Build completed.

          Testray CSV has been generated successfully for testrayBuildID: 340018391.

          Job Link: generate-testray-csv

          Testray CSV Link: testray-results-340018391.csv

          @markocikos
          Copy link
          Collaborator Author

          No unique failures, based on #5118 (comment)

          @markocikos
          Copy link
          Collaborator Author

          ci:forward:force

          @liferay-continuous-integration
          Copy link
          Collaborator

          CI is automatically triggering the following test suites:

          •     ci:test:relevant
          •     ci:test:sf
          •     ci:test:stable

          The pull request will automatically be forwarded to the user brianchandotcom if the following test suites complete:

          •     ci:test:relevant
          •     ci:test:sf
            AND If the following test suites pass:
          •     ci:test:stable

          @liferay-continuous-integration
          Copy link
          Collaborator

          Skipping previously completed test suites:

          • ci:test:relevant
          • ci:test:sf
            AND Skipping previously passed test suites:
          • ci:test:stable

          @liferay-continuous-integration
          Copy link
          Collaborator

          Test suite default has been triggered on http://test-1-35

          @liferay-continuous-integration
          Copy link
          Collaborator

          All required test suite(s) completed.
          Forwarding pull request to brianchandotcom.
          Console

          @liferay-continuous-integration
          Copy link
          Collaborator

          Pull request has been successfully forwarded to brianchandotcom#166675
          Console

          Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

          Projects

          None yet

          Development

          Successfully merging this pull request may close these issues.

          3 participants