Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-35990

Cleanup JS Extensions API

XMLWordPrintable

    • Icon: Improvement Improvement
    • Resolution: Done
    • Icon: Critical Critical
    • blueocean-plugin
    • None
    • 1.0-japan-m9, 1.0-m10

      The ExtensionPoint JSX component API is confusing and bloated, as is the store API.

      E.g.:

      • store API has methods like addExtensionPoint and then addExtension. Can't see any reason why both are needed.
      • store API has getExtensions and loadExtensions. Really seems like only one of these is needed and it should be the async version (i.e. loadExtensions - it takes a callback) - the sync version is weird.
      • store.loadExtensions loads extension point "implementations". Maybe we rename it to match that e.g. store.loadExtensionPointImpls.
      • From a "user" perspective, the ExtensionPoint JSX component renders extension point implementations, so why not give it a name that reflects that fact e.g. <RenderExtensionPoint>?
      • The ExtensionPoint.registerExtensionPoint static is dumb and will probably be even more dumb once ExtensionPoint gets a more meaningful name. Remove it and replace usages of it with calls to store.loadExtensions.

            kzantow Keith Zantow
            tfennelly Tom FENNELLY
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: