nebari-dev / jhub-apps

Application creator and general launcher for JupyterHub
https://jhub-apps.nebari.dev/
BSD 3-Clause "New" or "Revised" License
27 stars 12 forks source link

[ENH] - Handle Redirection or Navigation Post App Deployment in JupyterLab iframe #508

Closed nenb closed 2 weeks ago

nenb commented 3 weeks ago

Feature description

The "Deploy App" button in the deploy app form raises a CSP error when trying to redirect in an iframe when using headless mode. I would like to request support for handling this error inside of jhub-apps.

The original issue is in https://github.com/nebari-dev/jupyterlab-jhub-apps/issues/24. Possible solutions that were discussed included:

I am very open to other options, and also willing to support downstream whatever is proposed here.

I'm opening this issue to determine what is the best approach. cc @krassowski

Value and/or benefit

It will allow deploying an app when using headless mode.

Anything else?

No response

jbouder commented 3 weeks ago

In order to reduce potential iframe issues down the road, I would suggest that, when in headless mode, we redirect to a new success page. From there the user could potentially open the app in a new tab or close.

This would require adding a new page to the ui as well as updating the logic to navigate to the new page (using the react router) when in headless.

nenb commented 3 weeks ago

This would require adding a new page to the ui as well as updating the logic to navigate to the new page (using the react router) when in headless.

This gets a 👍 from me. The only suggestion I would have is that we try and keep the new page as basic as possible - I think anything requiring UX design would be too much.

How would you like to plan this piece of work? I'm happy to take on as much of the work as possible (but also happy for this to be assigned to someone else).

jbouder commented 2 weeks ago

This would require adding a new page to the ui as well as updating the logic to navigate to the new page (using the react router) when in headless.

This gets a 👍 from me. The only suggestion I would have is that we try and keep the new page as basic as possible - I think anything requiring UX design would be too much.

How would you like to plan this piece of work? I'm happy to take on as much of the work as possible (but also happy for this to be assigned to someone else).

I can take a stab at it. Should have something shortly