Giter Site home page Giter Site logo

mflevine / jupyterlab_html Goto Github PK

View Code? Open in Web Editor NEW
78.0 78.0 12.0 1.33 MB

(Merged into JupyterLab Core!) JupyterLab extension for displaying HTML files

License: BSD 3-Clause "New" or "Revised" License

TypeScript 68.69% CSS 31.31%
jupyterlab-extension

jupyterlab_html's People

Contributors

ian-r-rose avatar mflevine avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

jupyterlab_html's Issues

Using CSS files

Is it possible to use HTML Files together with CSS files?

I am trying to include a sphinx-built documentation file to my Jupyter Lab Project.

License file?

Would be nice to have a license file for clarity. Looks like BSD 3-Clause, correct?

styles missing

first of all I'd like to thank you for your work on this. what an incredibly useful extension! congrats on having it merged into core!

the docker images I've been using don't seem to be using that core release yet, so I just installed using jupyter labextension install @mflevine/jupyterlab_html and am able to see the HTML files now but there are no styles whatsoever, which doesn't seem to be the intended effect from what I can tell of the screencasts I've watched.

what may I be doing wrong? Tried this on a few /public folders for websites, none appear to load in the assets correctly.

Feedback about "trusted" feature

Hi, I just wanted to give some quick feedback about the "trust" feature. I initially didn't see that button, so my suggestion is to add some sort of alert message if scripts are being blocked to draw the user's attention to that button. Or maybe a different styling for the button to indicate that the file contains javascript that is being blocked.

To be clear, this is the button I'm referring to:
image

I wanted to alert you to this because I spent time trying to debug the error I was seeing in my console when my file wouldn't load, and it would be nice to improve the UI of this feature so that others don't miss it too!

Blocked script execution in 'blob:<URL>' because the document's frame is sandboxed and the 'allow-scripts' permission is not set.

image

Migrate to core JupyterLab?

Hi @mflevine, thanks for putting this together!

At the JupyterLab developers meeting this week we were discussing the usefulness of this functionality. Do you have any interest in graduating this extension to the core of JupyterLab? We could rebase it so that we preserve your commits for credit purposes.

Are you aware of any missing/broken functionality here that should be addressed in the near-term? We would certainly be willing to help on that front. It looks to me like relative links to resources don't work at the moment. I have some ideas about how we might fix that, which would require some changes to the rendermime extension API.

Double-clicking permanently replaces Jupyter Lab tab with local html

I successfully installed jupyter_html and restarted Jupyter Lab.

I saw a new icon on the filename of the local html, which was an indicator that the extension was active.

I double-clicked on the filename in the Jupyter Lab file manager.

The tab then navigated to the local html, replacing the Jupyter Lab page (an undesirable outcome).

When I used the back button, it momentarily showed the Jupyter Lab page, but then immediately navigated back to the local html (a second undesirable outcome).

I shutdown my browser and all the Jupyter Lab back end, and restarted.

Upon restarting, Jupyter Lab momentarily showed the Jupyter Lab page, but then immediately navigated to the local html (a third undesirable outcome).

I'm going to uninstall the extension now, but I'm willing to do some troubleshooting, if you can't replicate the problem.

Trouble installing

Hi,
I'm trying to install your extension on my aws ubuntu machine.
It seems to get stuck when resolving packages:

$ jupyter labextension install @mflevine/jupyterlab_html
> /usr/bin/npm pack @mflevine/jupyterlab_html
npm notice
npm notice 📦  @mflevine/[email protected]
npm notice === Tarball Contents ===
npm notice 1.1kB package.json
npm notice 1.5kB LICENSE
npm notice 770B  README.md
npm notice 963B  lib/index.d.ts
npm notice 3.5kB lib/index.js
npm notice 681B  style/html5-icon.svg
npm notice 1.1kB style/index.css
npm notice === Tarball Details ===
npm notice name:          @mflevine/jupyterlab_html
npm notice version:       0.1.4
npm notice filename:      mflevine-jupyterlab_html-0.1.4.tgz
npm notice package size:  4.2 kB
npm notice unpacked size: 9.7 kB
npm notice shasum:        a71d2f85131efacf94c545d19629bead3dbd7951
npm notice integrity:     sha512-rcH1v4grQ+4Sh[...]zmQM0mXr3FKiw==
npm notice total files:   7
npm notice
mflevine-jupyterlab_html-0.1.4.tgz
> node /mnt/workspace_roman/miniconda3/lib/python3.6/site-packages/jupyterlab/staging/yarn.js install
yarn install v1.5.1
(node:4014) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
info No lockfile found.
[1/4] Resolving packages...
⠠ @mflevine/jupyterlab_html@file:../extensions/mflevine-jupyterlab_html-0.1.4.tgz
⠁ @mflevine/jupyterlab_html@file:../extensions/mflevine-jupyterlab_html-0.1.4.tgz
⢀ @mflevine/jupyterlab_html@file:../extensions/mflevine-jupyterlab_html-0.1.4.tgz
⠂ @mflevine/jupyterlab_html@file:../extensions/mflevine-jupyterlab_html-0.1.4.tgz^CTraceback (most recent call last):
  File "/mnt/workspace_roman/miniconda3/bin/jupyter-labextension", line 11, in <module>
    sys.exit(main())
  File "/mnt/workspace_roman/miniconda3/lib/python3.6/site-packages/jupyter_core/application.py", line 266, in launch_instance
    return super(JupyterApp, cls).launch_instance(argv=argv, **kwargs)
  File "/mnt/workspace_roman/miniconda3/lib/python3.6/site-packages/traitlets/config/application.py", line 658, in launch_instance
    app.start()
  File "/mnt/workspace_roman/miniconda3/lib/python3.6/site-packages/jupyterlab/labextensions.py", line 213, in start
    super(LabExtensionApp, self).start()
  File "/mnt/workspace_roman/miniconda3/lib/python3.6/site-packages/jupyter_core/application.py", line 255, in start
    self.subapp.start()
  File "/mnt/workspace_roman/miniconda3/lib/python3.6/site-packages/jupyterlab/labextensions.py", line 75, in start
    logger=self.log, command=command)
  File "/mnt/workspace_roman/miniconda3/lib/python3.6/site-packages/jupyterlab/commands.py", line 259, in build
    command=command, clean_staging=clean_staging)
  File "/mnt/workspace_roman/miniconda3/lib/python3.6/site-packages/jupyterlab/commands.py", line 400, in build
    self._run(['node', YARN_PATH, 'install'], cwd=staging)
  File "/mnt/workspace_roman/miniconda3/lib/python3.6/site-packages/jupyterlab/commands.py", line 1278, in _run
    return proc.wait()
  File "/mnt/workspace_roman/miniconda3/lib/python3.6/site-packages/jupyterlab/process.py", line 108, in wait
    time.sleep(1.)
KeyboardInterrupt

I also tried cloning the repo and building locally as in your installation instructions but got stuck on the same problem...
any idea what could be wrong ?

Thanks,
Roman

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.