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

Stop vendoring noVNC #77

Merged
merged 9 commits into from
Feb 5, 2024
Merged

Stop vendoring noVNC #77

merged 9 commits into from
Feb 5, 2024

Commits on Feb 3, 2024

  1. Stop vendoring noVNC

    We have been vendoring noVNC to get vnc_lite.html,
    maintaining a patch file so we could upgrade the version of
    noVNC used if needed.
    
    noVNC publishes a JS library [on
    npm](https://www.npmjs.com/package/@novnc/novnc)
    that we can easily use instead, and stop vendoring the whole
    package! This brings us the following massive advantages:
    
    1. No more vendoring an entire package in!
    2. Upgrades of noVNC client become practically trivial
    3. We can change the frontend as we wish much more easily,
       compared to having to maintain a patch file as we do now.
       PRs like
       #7
       become easier.
    
    This PR:
    
    - Adds a `package.json` to include the noVNC js package
    - Adds a `webpack.config.js` to provide JS bundling, so we can just ship
      a single `viewer.js` file that has everything.
    - Adds appropriate bits (stolen and adapted from jupyterhub's config)
      to package the built JS in the final wheel as necessary.
    - Upgrade from noVNC 1.2 to 1.4, but otherwise keep everything the
      same. I just copied our patched `vnc_lite.html` into `index.html`,
      and just split out the JS / CSS.
    - prettier with pre-commit has done its thing on the JS, CSS and
      HTML. This is fine, as I am hoping we can make more changes to the
      UI after this.
    - Modify the `Dockerfile` to setup the conda env first, and then
      separately install the python package with pip. This makes local
      development *much* faster.
    - Add a `.gitignore` (which this repo was missing), with
      node_modules included as well as the dist/ directory with the built
      JS.
    yuvipanda committed Feb 3, 2024
    Configuration menu
    Copy the full SHA
    a59abc4 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    823b155 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    68e25d0 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    3a6e81e View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    296f781 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    704151c View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    7ac5182 View commit details
    Browse the repository at this point in the history

Commits on Feb 4, 2024

  1. Make an editable pip install

    This allows for much faster iteration, by simply mounting
    $(pwd) into /opt/install
    yuvipanda committed Feb 4, 2024
    Configuration menu
    Copy the full SHA
    0ba0689 View commit details
    Browse the repository at this point in the history
  2. Move .gitignore around

    yuvipanda committed Feb 4, 2024
    Configuration menu
    Copy the full SHA
    cfb1a14 View commit details
    Browse the repository at this point in the history