-
Notifications
You must be signed in to change notification settings - Fork 5k
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
cannot comment on html view of notebooks #2727
Comments
There should be a way to do this using something hypothes.is at least in the context of public notebooks. I'll try this and get back to you.
|
I have comments on some of mine, being rendered: https://athena.brynmawr.edu/jupyter/hub/dblank/public/Jupyter%20Help.ipynb In a markdown cell: <div id="disqus_thread"></div>
<script type="text/javascript">
var disqus_shortname = 'calicoproject'; // required: replace example with your forum shortname
(function() {
var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
dsq.src = '//' + disqus_shortname + '.disqus.com/embed.js';
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
})();
</script>
<noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
<a href="http://disqus.com" class="dsq-brlink">comments powered by <span class="logo-disqus">Disqus</span></a> |
That doesn't quite solve the line-comments version of the problem does it? Furthermore, you can't easily wrap GitHub in a Discus comment thread or embed arbitrary js in the html that GitHub renders. So, while cool, that doesn't really solve this problem. What we need is a way to overlay something for annotating text inside html. That's why I figured something like hypothes.is might work. Unfortunately, the hypothes.is tool doesn't actually work on text in If you want to see the closest I could come to solution based on the capabilities of hypothes.is today: go to jupyter/nbconvert/…/markdown_display_priority with your hypothes.is account active. |
Oh, I see... this was about PRs. Sorry for the noise. |
No, it's cool! Thank you for sharing — it's a neat idea, just doesn't work in this case. |
I suspect that inline comments integrated with Github's pull request system may be impossible because of the security considerations. They're displaying notebooks in an iframe so that it can't do anything with your Github login, but posting comments requires access to your login. Maybe there's some way for the JS outside an iframe to capture events inside the iframe and modify its DOM? I haven't heard of any such thing, and I'm not sure it would be possible without breaking the isolation requirements, but browsers do a lot of amazing things. |
It is possible to do this: In other words, open the iframe in a new tab and annotate there. Not what you're looking for, I know. It's awkward to open the iframe separately, and annotations made there aren't visible to a reader of the notebook as rendered in GitHub. Just mentioning it for completeness. Interested parties could arrange to be notified of annotations on the inner frame, and follow links to it. |
bump |
After creating a pull request, it would be great if people could leave comments on the html view of the jupyter notebook. I believe it is the case that you can only leave comments on the raw jupyter notebook, which makes for a confusing user experience.
The text was updated successfully, but these errors were encountered: