Replace fake SVG icon to proper vector graphics

Created on 11 July 2024, 7 months ago
Updated 26 August 2024, 5 months ago

Problem/Motivation

“[…] SVG images can also contain raster graphics, such as PNG and JPEG images”

(Wikipedia)

The “E” icon (in code) used by the CKEditor5 plugin is a faux-vector file: the SVG file contains raster image data, which makes no sense at all. Here is an example from Drupal core how a proper SVG file supposed to look like.

📌 Task
Status

Needs review

Version

1.0

Component

User interface

Created by

🇭🇺Hungary Balu Ertl Budapest 🇪🇺

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

  • Issue created by @Balu Ertl
  • 🇭🇺Hungary Balu Ertl Budapest 🇪🇺
  • Pipeline finished with Canceled
    7 months ago
    Total: 100s
    #224852
  • Issue was unassigned.
  • Status changed to Needs review 7 months ago
  • 🇭🇺Hungary Balu Ertl Budapest 🇪🇺

    SVG icon reworked to use no raster data only vector graphics. Sizing fitted to other similar letter-like symbols on the WYSIWYG toolbar:




  • Pipeline finished with Failed
    7 months ago
    #224853
  • 🇫🇷France kumkum29

    Hi balu rrtl,

    It is true that the default icon does not have the correct formatting.
    I see your patch. But after analyse the 'ckeditor5_plugins' directory, I don't see any 'drupalentity' directory in my environment.

    My site is built on D9.5.11.

    Thanks for your reply.

  • 🇮🇳India Sandeep_k New Delhi

    Hi @balu rrtl, I have tried the shared patch - "MR !41 mergeable" on the Drupal 10.3 version. The patch was applied successfully but the before and after results are the same for me, Attaching images below- Please let me know in case I have missed any steps here.

  • 🇭🇺Hungary Balu Ertl Budapest 🇪🇺

    @Sandeep_k Thanks for taking the time for testing. I'd test with the following steps:

    1. Drush uninstall any previous versions of the module
    2. Check manually in the file system the old icon does not remain somewhere
    3. Drush cache clear
    4. Composer require the MR's branch as package
    5. Drush install the module
    6. Check in my web browser's DevTool inspector whether the SVG markup of the "E" icon is the same as in the MR.

    “The patch was applied successfully”

    This sentence makes less and less sense as our community continuously moves over to MR-based workflow. Therefore I'd suggest you not to mention this sentence anymore for any contrib issue which already has a MR. GitLab ensures whether the code changes are applicable or not – no human check is needed for that.

  • 🇭🇺Hungary Balu Ertl Budapest 🇪🇺

    Test failure on the latest pipeline for me seems unrelated to the code changes here:

    PHP Fatal error:  Cannot make static method Drupal\Tests\ckeditor5\Kernel\SmartDefaultSettingsTest::provider() non static in class Drupal\Tests\entity_embed\Kernel\UpgradePathTest in /builds/issue/entity_embed-3460832/tests/src/Kernel/UpgradePathTest.php on line 136
    
Production build 0.71.5 2024