- Issue created by @cosmicdreams
- First commit to issue fork.
- @brianperry opened merge request.
- πΊπΈUnited States brianperry
Added a few small tweaks here to get this slightly closer to reality.
This actually kinda sorta almost works in the current state.
* Create a new basic page.
* The iframe will display a 404.
* Fill out necessary form fields.
* Click the preview button (you don't have to save the node)
* You'll navigate to what I'm now going to lovingly call 'different page preview'
* Click the 'back to content editing' button.
* You'll be back on the edit form, but the iframe will now contain the current preview.
* You can even change the view mode within the iframe to preview different view modes without navigating away from the form.Depending on how this evolves, I think we'll have to remove the 'back to content editing' button from the iframe. But keeping it for now as it makes the process above possible.
- πΊπΈUnited States cosmicdreams Minneapolis/St. Paul
Going to test this manually
- πΊπΈUnited States cosmicdreams Minneapolis/St. Paul
Let's move the TODO about 10.1.0 above the whole Form API of html_tag to give a better indication of what would be replaced once we target 10.1
Also what is the dependency you are referring to on line 10?
Other than that, looks like a simple improvement. Approved.
- πΊπΈUnited States cosmicdreams Minneapolis/St. Paul
During manual testing, the toolbar still seems to be included. Was the adminstrative toolbar supposed to be excluded?
- πΊπΈUnited States brianperry
Re #7 - I've seen that happen when clicking the 'Return to content editing' button in the iframe. At that point it is iframe inception and all bets are off :) If it isn't that, I'll have to try it out in Umami. I was testing in Olivero.
> Also what is the dependency you are referring to on line 10?
That was a note to say 'we should do this with dependency injection' rather that a static call. But that might not be possible in this procedural code at the moment.
- πΊπΈUnited States cosmicdreams Minneapolis/St. Paul
What's missing from my screenshot was how it was displaying a "Page Not Found" page. That got cut off. So it's not actually showing the preview.
- Status changed to RTBC
almost 2 years ago 1:05am 21 February 2023 - πΊπΈUnited States cosmicdreams Minneapolis/St. Paul
Propose that we RTBC this since we have an iFrame in the node edit form.
-
brianperry β
committed 4ccdfec5 on 1.0.x
Issue #3343008 by brianperry, cosmicdreams: Add iFrame of the preview
-
brianperry β
committed 4ccdfec5 on 1.0.x
- Status changed to Fixed
almost 2 years ago 2:58pm 21 February 2023 - πΊπΈUnited States brianperry
Merged and marking as fixed.
Surprised to see that it is actually possible to compile the preview for a node that hasn't even been created yet :) That simplifies a few things.