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

fix: Launchpad plugin path: keep namespace #38

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Regloom
Copy link

@Regloom Regloom commented Feb 1, 2024

Launchpad plugins path should follow URL approach defined for regular apps as stated in this file below: "cds-plugin-ui5 uses the appid as default route (combination namespace + component)"

Launchpad plugins path should follow URL approach defined for regular apps as stated in this file below:
"cds-plugin-ui5 uses the appid as default route (combination namespace + component)"
@geert-janklaps
Copy link
Owner

@Regloom :
I would suggest to first perform a check to see if cds-plugin-ui5 is loaded before enforcing this convention. (like e.g. https://github.com/geert-janklaps/cds-launchpad-plugin/blob/054ec1bade6d0e91bf8fc8a0ea3c01afcd31205e/src/index.ts#L150C5-L150C80)

This plugin has no hard dependency on cds-plugin-ui5, so we need to make sure that we have backwards compatibility for projects not using cds-plugin-ui5.

@geert-janklaps geert-janklaps changed the title Launchpad plugin path: keep namespace fix: Launchpad plugin path: keep namespace Feb 12, 2024
@rasmk
Copy link

rasmk commented Jul 31, 2024

I faced the same issue today. TypeScript launchpad plugin fails to load.
JavaScript plugin loads just fine.

My observations are as follows:

  1. Original code of cds-launchpad-plugin
    1. JavaScript plugin URL http://localhost:4004/jsplugin/webapp/Component.js - works fine
    2. TypeScript plugin URL http://localhost:4004/tsplugin/webapp/Component.js - does not work
  2. Solution proposed in this PR (url: component + "/webapp",)
    1. JavaScript plugin URL http://localhost:4004/com.ns.jsplugin/webapp/Component.js - does not work
    2. TypeScript plugin URL http://localhost:4004/com.ns.tsplugin/webapp/Component.js - does not work
  3. My approach to fix it (url: component,)
    1. JavaScript plugin URL http://localhost:4004/com.ns.jsplugin/Component.js - works fine
    2. TypeScript plugin URL http://localhost:4004/com.ns.tsplugin/Component.js - works fine

As this pull request seems pretty much dead and there is no consensus, what the actual fix should be, I suppose I will be better off with my own fork that I will refer to in my project.

@geert-janklaps
Copy link
Owner

@rasmk: do you have a minimal reproducible example I can use to do some analysis?

@rasmk
Copy link

rasmk commented Aug 1, 2024

@geert-janklaps my project is anything but minimal 🙂

But I removed everything unrelated and only left two launchpad plugins: one implemented in JS and one in TS

You can use this repo to reproduce the problem. See README.md for further details.

I hope this helps.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants