Skip to content
This repository has been archived by the owner on Dec 13, 2023. It is now read-only.

[FEATURE]: Conductor UI's Static App must be easily hostable from any base route #3656

Closed
haricane8133 opened this issue Jun 16, 2023 · 5 comments
Labels

Comments

@haricane8133
Copy link
Contributor

haricane8133 commented Jun 16, 2023

Describe the Feature Request

Conductor UI's built static files, are designed to be hosted at the root of any domain

There are many scenarios where this isn't possible, and the app must be hosted in a sub route of a domain
react-scripts, the tool used to build Conductor UI, accepts a field called "homepage" in the package.json.

Using this, react-scripts derives the correct relative paths to be used in index.html.

But this alone doesn't work as there are three more places where the change must come in

  1. The Client-side router BrowserRouter from the package react-router-dom routes the links assuming that the app has been hosted at the root of a domain. Clients need to pass a property called basename with the correct sub route.
  2. The API calls from plugins/fetch.js are made to /api, again assuming that the app has been hosted at the root of a domain.
  3. The call to fetch logo.svg from plugins/AppLogo.jsx, also assumes that the resource is served at the root of the domain.
  4. Links going to new tab, from components/NavLink.jsx, also assumes that the resource is served at the root of the domain.

Describe Preferred Solution

Before build, clients must be able to easily customize Conductor UI with the sub route at which they are going to host Conductor UI

The 'homepage' field is used by react-scripts anyway. It would be great if Conductor UI can read this one property too, and make required changes in the above mentioned 3 places, so that Conductor UI can truly be hosted and served from any base route, with a simple config change from the client.

The default, when 'homepage' field is not given in package.json, must be the usual Conductor UI default /.

Describe Alternatives

The alternate for a client consuming Conductor UI is to make all the changes themselves, every time there is an update in Conductor UI repo, that they must take in.

Having this feature merged to Conductor UI would make it extremely easy for clients to configure!

@haricane8133 haricane8133 added the type: feature New feature label Jun 16, 2023
@haricane8133
Copy link
Contributor Author

Added one more place where the change needs to come in. See point (4)

@haricane8133
Copy link
Contributor Author

Raised the PR here - #3722

@github-actions
Copy link
Contributor

This issue is stale, because it has been open for 45 days with no activity. Remove the stale label or comment, or this will be closed in 7 days.

@github-actions github-actions bot added the Stale label Sep 23, 2023
@github-actions
Copy link
Contributor

This issue was closed, because it has been stalled for 7 days with no activity.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Sep 30, 2023
@haricane8133
Copy link
Contributor Author

This issue is fixed now.
The PR - #3722

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

No branches or pull requests

1 participant