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 browse content on admin UI and preview is shown (e.g. Select view on contents view) #9

Closed MAX-786 closed 2 months ago

MAX-786 commented 3 months ago

Description

As an editor, I want to Select view on contents pane, preview is shown so that I can preview different pages which are added by me.

Technical Approach

Once the Management views issue is resolved, then we can add a view button which will be shown when right-clicked on the page. Then we will direct it to do the admin UI with the current page URL so this page will be opened.

fixed in #38

djay commented 2 months ago

@MAX-786 the view button is already there. The main thing is to hook into the routing in the admin UI somehow and if we shifted to a new content url then the preview url in the iframe needs to get changed also

djay commented 2 months ago

@MAX-786 actually this is probably very easy. Because I don't think there is anywhere in the admin UI where there is a popup with a link to other content. The only views that have links to other pages are when the iframe is not shown so you might need to only handle the case what when the iframe loads it gets the correct url for that page from the admin ui.

MAX-786 commented 2 months ago

if we shifted to a new content url then the preview url in the iframe needs to get changed also

Can be done by hooking the 'src' of iframe with adminUI so it should be updated only by adminUI. Even when we have to update it manually it should go through adminUI so it can check for errors and help editor debug properly.

MAX-786 commented 2 months ago

@MAX-786 actually this is probably very easy. Because I don't think there is anywhere in the admin UI where there is a popup with a link to other content. The only views that have links to other pages are when the iframe is not shown so you might need to only handle the case what when the iframe loads it gets the correct url for that page from the admin ui.

Yepp i had the same thought.