Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Render more content, inlined #88

Merged
merged 14 commits into from
Mar 24, 2017
Merged

Render more content, inlined #88

merged 14 commits into from
Mar 24, 2017

Conversation

rgbkrk
Copy link
Member

@rgbkrk rgbkrk commented Mar 8, 2017

I've combined our overall Contents rendering into one component.

  • Cleanup the styling
    • Full width and height for inlined iframe, not bound by container
  • Figure out how we'll serve relative assets (images should load after all)
    • Create the /view/ and /files endpoints
    • Redirect /view/ on non-html, non-notebook to /files/.
  • iframe HTML content

@cabhishek
Copy link
Contributor

related to #43

@rgbkrk
Copy link
Member Author

rgbkrk commented Mar 10, 2017

I'm definitely not having the best developer experience when trying to hack on the express server (not the UI components). It seems like new routes aren't being mapped properly.

@cabhishek
Copy link
Contributor

@rgbkrk is it express stuff or the way commuter server structure is laid out?

@rgbkrk
Copy link
Member Author

rgbkrk commented Mar 10, 2017

Mostly the way the commuter server structure is laid out I think. #80 is related here, since running them together is easy to get started yet hard to iterate on either the server or the react app.

@rgbkrk
Copy link
Member Author

rgbkrk commented Mar 10, 2017

Aside from the DX, here's what I'm trying to do (some of which is done):

  • /view/ - provides a view to a file; I'm explicitly handling it this way so that random HTML gets rendered into an iframe
  • /files/ - serve file contents directly, not for use by users explicitly; this is where for example /view/image.png would get redirected to /files/image.png.

@rgbkrk
Copy link
Member Author

rgbkrk commented Mar 20, 2017

Alright, back on this with some renewed perspectives after trying out next. Likely going to eject from react scripts to control the proxy more programmatically.

@rgbkrk
Copy link
Member Author

rgbkrk commented Mar 24, 2017

This is working quite well now, all the way to rendering relative assets. However, in dev mode relative assets won't work -- they need to be able to hit the /view/ to /files/ redirect, which won't work with create-react-app for now.

@rgbkrk
Copy link
Member Author

rgbkrk commented Mar 24, 2017

I'll get tests fixed up next.

@rgbkrk rgbkrk changed the title [WIP] Render more content, inlined Render more content, inlined Mar 24, 2017
@rgbkrk
Copy link
Member Author

rgbkrk commented Mar 24, 2017

Preview:

screen shot 2017-03-24 at 10 14 01 am

screen shot 2017-03-24 at 10 14 58 am

^^ relative image shown

@cabhishek cabhishek merged commit 51af789 into nteract:master Mar 24, 2017
@rgbkrk rgbkrk deleted the render-more branch March 24, 2017 17:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants