iPython notebook viewer
What does this MR do?
Adds iPython notebook rendering with a Vue component (see the project https://gitlab.com/gitlab-org/notebooklab). All this code does it renders a different template for notebook files, fetches the raw JSON, parses the JSON and passes it into the Vue component.
It includes markdown rendering (without any GFM references) and syntax highlighting. The syntax highlighting uses our CSS to save anymore CSS being added in.
It is super simple at the moment and probably doesn't work with some more complex notebook files but this can be worked on in the NotebookLab component & then the version updated here when required.
The actual notebook code is tested in the notebooklab repo so the tests here just tests the notebook actually renders on the page rather than also checking how the notebook renders.
There is some simple error handling for when the file is either incorrect JSON or the request fails. I guess the plugin should handle render errors & then display an error there.
Screenshots (if relevant)
What are the relevant issue numbers?
Merge request reports
Activity
added 143 commits
-
e0fa9973...b075d38c - 140 commits from branch
master
- db5721b4 - Started iPython notebook viewer
- e6637ce1 - Loads raw JSON & displays in the component
- 59df76ed - Stops errors in the rendering breaking the page
Toggle commit list-
e0fa9973...b075d38c - 140 commits from branch
- Edited by Jacob Schatz
added 183 commits
Toggle commit listadded 1 commit
- 32c6ea2d - Updated notebooklab with latest code highlighting changes
added frontend label
changed milestone to %9.1
@jschatz1 can you have a look please? Keeping as WIP so it isn't accidentally merged until it is 100% ready.
I guess the notebooklab module should be published to npm as well.
assigned to @jschatz1
Awesome!!!
@iamphill I think it's easier to keep things internal rather than having to maintain them externally.
DAMN. It's awesome @iamphill I love it. It renders so fast and it works now.
This file doesn't render and doesn't give an explanation why @iamphill.
Edited by Jacob SchatzThis might be related to https://gitlab.com/gitlab-org/gitlab-ce/issues/24287, which is slated for 9.2 /cc @rspeicher
- Resolved by Grzegorz Bizon
- Resolved by Grzegorz Bizon
@iamphill I am going to merge to get this in and so we can find out what works and what doesn't and fix it one at a time.
mentioned in issue #30190 (closed)
mentioned in issue #24287 (closed)
mentioned in commit 47aeacd7
mentioned in issue #2508 (closed)
@iamphill Should we close https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/8486 since this one is merged?
@grzesiek Yeah I think thats a good idea.
/cc @jschatz1 ^
mentioned in issue #30236 (closed)
@vmodi Hi, this will be in GitLab 9.1, so once that is released on the 22nd you will be able to see them (maybe before the 22nd depending when the RC is deployed)
@iamphill I guess it has partially landed and I am stoked to see it happening! :)
There is a problem with inline LaTeX rendering though. When escaped with
$$
it is rendered properly, but not inline$<some equation>$
(see screenshot below)Is this the correct place to leave this info or should I open a new issue? Or am I just doing something wrong?
Edited by username-removed-90489@zabugr Thanks for feedback! If you could open a new issue so its easier for us to track that'd be great
👍 mentioned in issue #30900 (closed)
@iamphill done. I have also set up a project to test it out with a minimal setup that illustrates the issue. Details are in #30900 (closed)
mentioned in merge request !8486 (closed)
mentioned in issue #32361 (closed)
mentioned in merge request !11419 (merged)