Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add plugins metadata to packages #6642

Closed
5 of 6 tasks
ma2ciek opened this issue Apr 21, 2020 · 3 comments · Fixed by #9685
Closed
5 of 6 tasks

Add plugins metadata to packages #6642

ma2ciek opened this issue Apr 21, 2020 · 3 comments · Fixed by #9685
Assignees
Labels
Epic squad:platform Issue to be handled by the Platform team. type:task This issue reports a chore (non-production change) and other types of "todos".

Comments

@ma2ciek
Copy link
Contributor

ma2ciek commented Apr 21, 2020

Provide a description of the task

Action items

  • Move the current data from the OB and adjust to the new format - Move plugins metadata from OB to packages  #9400.
    • Make a final proposal for the metadata format and verify whether putting that into package.json is a good idea (taking into account that we'll have quite a lot of data there).
    • Check which plugins are not covered yet and if it makes sense, document them too.
      • One idea: PendingActions.
  • Align the OB to these changes. -> Moved to OB issues.
    • The format itself changes and the data is split into two places (pkgs and OB's config).
    • It has to read SVGs source from npm pkgs.
    • We need to compile all this data and expose for the OB's frontend.
    • Consider writing a parser for build's default configs (builtinPlugins and defaultConfig).
  • Document HTML output format For each major plugin specify the HTML output and add it to the package matadata #9401.
    • Try documenting a couple of features with the proposed HTML output format (or similar) and review whether the format makes sense
    • Make the final decision regarding the HTML output format and document all features.
  • Document the format in the Framework docs (e.g. the "Contributing" section) and cross-link it at least at the end of "Creating a simple plugin" and maybe the tutorials - Document the metadata format #9413.
  • Implement a generator for "Features output" documentation page. It will scan the metadata and try to print them out in a human-readable form in the docs - Implement a generator for "Features output" documentation page #9414.
  • Notify WProofReader and MathType about the introduced metadata file -> Extracted as a follow-up.
@ma2ciek ma2ciek added the type:task This issue reports a chore (non-production change) and other types of "todos". label Apr 21, 2020
@ma2ciek ma2ciek added this to the iteration 32 milestone Apr 21, 2020
@ma2ciek ma2ciek self-assigned this Apr 21, 2020
@ma2ciek ma2ciek changed the title Add online-builder metadata to packages Add plugin metadata to packages Apr 21, 2020
@ma2ciek ma2ciek changed the title Add plugin metadata to packages Add plugins metadata to packages Apr 21, 2020
@Reinmar Reinmar modified the milestones: iteration 32, nice-to-have May 25, 2020
@Reinmar Reinmar added the squad:collaboration Issue to be handled by the Collaboration team. label May 25, 2020
@Reinmar Reinmar added the squad:platform Issue to be handled by the Platform team. label Oct 8, 2020
@Reinmar Reinmar added squad:dx and removed squad:collaboration Issue to be handled by the Collaboration team. labels Apr 1, 2021
@Reinmar Reinmar modified the milestones: nice-to-have, iteration 42 Apr 1, 2021
@Reinmar
Copy link
Member

Reinmar commented Apr 1, 2021

Meeting notes:

  • Data that we need
    • Plugins (in package.json, only the main plugins):
      • plugin name
      • human-readable plugin name
      • description
      • link to a feature guide
      • path to the plugin
      • additional toolbars
      • requires (soft and other weird requirements)
      • UI components:
        • name
        • path to SVG
        • type (button, dropdown, split button)
        • additional info (e.g. dropdown config - with or without text/icon?)
        • target toolbar
          • if defined, OB adds it automatically to this toolbar
          • if not, the user can
    • Online builder (separate, private config)
      • Plugins:
        • package.jsons of all pkgs and source SVG files
        • exclusions
          • what about exclusion groups? e.g. upload adapters
          • gets more complicated e.g. in case of RTE plugins
        • which sample
        • whether to show a certain plugin (e.g. Paragraph, Essentials)
        • "requiresServer"
        • private → premium
      • Default configuration of builds
        • duplicates the src/ckeditor.js file of each build
        • might be reasonable to write a parser to exclude builtinPlugins and defaultConfig
  • Which plugins do we cover?
    • Only the glue code. No reason to cover *Editing, *UI
    • We need to cover soft-deps of other plugins (e.g. CloudServices)
  • HTML output
    • To not repeat ourselves - plugins are configurable and so is their output. Also, plugins influence one another (e.g. alignment + block features).
    • Conclusions:
      • It'd be enough if CKE5 documented in its docs (in one place) all the possible outputs of all the features
      • CKE5 could try to standardize where this information can be written down by 3rd party plugin authors

@Reinmar
Copy link
Member

Reinmar commented Apr 1, 2021

The definition of HTML output could look a bit like this:

"ckeditor": {
    plugins: [
      { 
        name: "Alignment",
        output: [
          {
            "element": "$block",
            "attributes": [
              {
                "name": "style",
                "description": "For default config.",
                
                // Possible future extension - list values/particular styles
              },
              {
                "name": "class",
                "description": "For config.alignment.classes",
                
                // Possible future extension - list particular classes
              }
            ]
          }
        ]
      },
      { 
        name: "Image",
        output: [
          {
            "element": "figure",
            "attributes": [
              {
                "name": "class",
                "value": "image"
              }
            ]
          },
          {
            "element": "img",
            "attributes": [ "src", "srcset", "sizes" ]
          }
        ]
      },

@Reinmar

This comment has been minimized.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Epic squad:platform Issue to be handled by the Platform team. type:task This issue reports a chore (non-production change) and other types of "todos".
Projects
None yet
3 participants