tanhakabir / rest-book

REST Book is a Visual Studio Code extension that allows you to perform REST calls in a Notebook interface.
https://marketplace.visualstudio.com/items?itemName=tanhakabir.rest-book
MIT License
248 stars 24 forks source link

add WebView response output renderer #90

Closed RandomFractals closed 3 years ago

RandomFractals commented 3 years ago

for rendering actual web pages, in addition to XMLView to display html response in xml tree (#86)

RandomFractals commented 3 years ago

we can probably just use iframe for this and set it to GET url for the page to get started.

tanhakabir commented 3 years ago

By webview, do you mean by a rendered view of the html received? if this is the case there is actually already an output for rendered html

RandomFractals commented 3 years ago

@tanhakabir oh, somehow I missed that part in docs and have not tried to just load a simple google.com page. will give it a go. Thanks!

RandomFractals commented 3 years ago

nope. I get raw html that is not even formatted:

image

oh, you mean I have to click on </> and pick a built-in html renderer? probably need to update docs for this part:

image

RandomFractals commented 3 years ago

also, looks like styles on nb cell and nb view page are not cleared and overiden by the loaded page:

image

Expected white google page render background in that cell output and retaining dark plus theme for the nb view ;)

i.e. should be rendered in iframe. I don't even know how that bg color got flipped there.

@jrieken are we using same dom for loading cell output styles, etc. as the main nb view?

RandomFractals commented 3 years ago

also, note that google branding logo image did not load in that built-in html mime type output renderer :(

tanhakabir commented 3 years ago

probably need to update docs for this part

👍

tanhakabir commented 3 years ago

also, looks like styles on nb cell and nb view page are not cleared and overidden by the loaded page

This looks like a bug and not intentional! Creating an issue for that now