collective / volto-hydra

A volto addon to let you edit content in realtime when you have many frontends written in any framework
0 stars 2 forks source link

I can Select which frontend to view the current page #7

Closed MAX-786 closed 2 months ago

MAX-786 commented 3 months ago

Description

As an editor, I want to Select which frontend to view the current page by providing a URL so that I can preview/manage multiple frontends at one place (adminUI).

Technical Approach

Once the user (editor) is authenticated we can ask for an URL which will then try connecting with frontend using Bridge ( simply by using iframe for now). We will enter the view URL into the edit URL on the login page and save it somewhere in the browser (e.g. session storage)

In the final version config can be used to specify the frontend urls to use

followup tasks

djay commented 2 months ago

@MAX-786 maybe it can be split out but I think this should also remember using a cookie what the last url you used was and also have a default that comes from an env variable

djay commented 2 months ago

@MAX-786 can we also move up the url box into the top bar witht he breadcrumbs so we get almost all of hte screen filled with the iframe?

Image

MAX-786 commented 2 months ago

@MAX-786 maybe it can be split out but I think this should also remember using a cookie what the last url you used was and also have a default that comes from an env variable

Okay, so when you login, the default url will be loaded as per env and once editor change the url , it will be saved in cookie ( but just the origin of url )

MAX-786 commented 2 months ago

@MAX-786 can we also move up the url box into the top bar witht he breadcrumbs so we get almost all of hte screen filled with the iframe?

It can be, but the thing is, input field is in the same component as iframe, so currently the value is controlled by useState but if we move it in Breadcrumb component then IG we have to use prop drilling or redux store perhaps, I'll look into it and try it out first.