Giter Site home page Giter Site logo

xiaohk / stickyland Goto Github PK

View Code? Open in Web Editor NEW
500.0 9.0 34.0 14.77 MB

Break the linear presentation of Jupyter Notebooks with sticky cells!

Home Page: https://xiaohk.github.io/stickyland/

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

Python 3.87% JavaScript 1.17% CSS 13.78% TypeScript 81.18%
jupyterlab jupyterlab-extension jupyter notebook dashboard

stickyland's Introduction

StickyLand

Github Actions Status Binder Lite pypi license arxiv badge DOI:10.1145/3491101.3519653

Break the linear presentation of Jupyter Notebooks with sticky cells!

πŸ‘¨πŸ»β€πŸ« Talk πŸ“Ί Video πŸ“– "StickyLand: breaking the linear presentation of computational Notebooks"

Live Demo

You can try StickyLand directly in your browser without installing anything:

Fast loading Full functionality
Lite Binder

Install

First, you need to install JupyterLab. Then you can install StickyLand with pip:

pip install stickyland

Note StickyLand only supports JupyterLab < 4. In June 2023, JupyterLab 4.0 was released with a lot of breaking changes. I will update StickyLand to support JupyterLab 4.0 when the official extension documentation is more polished. Any contribution to the lab4 branch is greatly appreciated!

Features

feature-gif

Show details
Drag and drop to create sticky cellsCreate sticky code and markdown from scratch
drag-cell.mp4
create-cell.mp4
Automatically execute sticky cellsUse floating cells to create interactive dashboards
auto-run.mp4
dashboard.mp4

With multiple floating cells, users can create a full-fledged interactive dashboard. For example, a machine learning engineer can build an ML Error Analysis Dashboard (shown below) through simple drag-and-drop.

The ML Error Analysis Dashboard consists of: (A) markdown text describing the dashboard, (B) input field to specify a feature to diagnose, (C) auto-run chart showing the distribution of the specified feature, (D) second input field to further specify the range within the feature to diagnose, (E) auto-run table displaying all samples that meet the criteria, (F) auto-run visualization explaining how the ML model makes decision on these samples, (G) interactive tool allowing the ML engineer to fix the ML model by editing its parameters based on their error analysis.

Development

You will need NodeJS to build the extension package. The jlpm command is JupyterLab's pinned version of yarn that is installed with JupyterLab. You may use yarn or npm in lieu of jlpm below.

# Clone the repo to your local environment
# Change directory to the jupyterlab_stickyland directory
# Install package in development mode
pip install -e .
# Link your development version of the extension with JupyterLab
jupyter labextension develop . --overwrite
# Rebuild extension Typescript source after making changes
jlpm run build

You can watch the source directory and run JupyterLab at the same time in different terminals to watch for changes in the extension's source and automatically rebuild the extension.

# Watch the source directory in one terminal, automatically rebuilding when needed
jlpm run watch
# Run JupyterLab in another terminal
jupyter lab

With the watch command running, every saved change will immediately be built locally and available in your running JupyterLab. Refresh JupyterLab to load the change in your browser (you may need to wait several seconds for the extension to be rebuilt).

By default, the jlpm run build command generates the source maps for this extension to make it easier to debug using the browser dev tools. To also generate source maps for the JupyterLab core extensions, you can run the following command:

jupyter lab build --minimize=False

Citation

@inproceedings{wangStickyLandBreakingLinear2022,
  title = {{{StickyLand}}: {{Breaking}} the {{Linear Presentation}} of {{Computational Notebooks}}},
  shorttitle = {{{StickyLand}}},
  booktitle = {Extended {{Abstracts}} of the 2022 {{CHI Conference}} on {{Human Factors}} in {{Computing Systems}}},
  author = {Wang, Zijie J. and Dai, Katie and Edwards, W. Keith},
  year = {2022},
  publisher = {{ACM}}
}

License

The software is available under the BSD-3-Clause License.

Contact

If you have any questions, feel free to open an issue or contact Jay Wang.

stickyland's People

Contributors

kdai7 avatar xiaohk 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  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  avatar  avatar  avatar

stickyland's Issues

Closing the last notebook in JupyterLite breaks the sticky area

I played around with stickyland today as I'm intrigued by the great concept. However, I noticed that every time I switch between notebooks in JupyterLite, I get the following error in the JS console:

TypeError: e.value is undefined
    _setValue /dist/build/6747.47be7f5.js:1
    set source /dist/build/6747.47be7f5.js:1
    _update /dist/build/2030.1562cc6.js:1
    onActiveNotebookPanelChanged /dist/build/2030.1562cc6.js:1
    processMessage /dist/build/2030.1562cc6.js:1
    c /dist/build/3850.903abc2.js:2
    e /dist/build/3850.903abc2.js:2
    _onActiveNotebookPanelChanged /dist/build/2030.1562cc6.js:1
    f /dist/build/9943.f3f35c7.js:1
    _onActiveNotebookPanelChanged /dist/build/2030.1562cc6.js:1
    u /dist/build/8389.ffe031f.js:1
    emit /dist/build/8389.ffe031f.js:1
    emit /dist/build/8389.ffe031f.js:1
    A /dist/build/6623.ae3b3cc.js:2
    u /dist/build/8389.ffe031f.js:1
    emit /dist/build/8389.ffe031f.js:1
    emit /dist/build/8389.ffe031f.js:1
    _onInstanceDisposed /dist/build/1325.f76267c.js:1
    u /dist/build/8389.ffe031f.js:1
    emit /dist/build/8389.ffe031f.js:1
    emit /dist/build/8389.ffe031f.js:1
    dispose /dist/build/5666.c5e5324.js:1
    dispose /dist/build/2030.1562cc6.js:1
    _revealed /dist/build/6623.ae3b3cc.js:2
    u /dist/build/8389.ffe031f.js:1
    emit /dist/build/8389.ffe031f.js:1
    emit /dist/build/8389.ffe031f.js:1
    dispose /dist/build/5666.c5e5324.js:1
    dispose /dist/build/2030.1562cc6.js:1
    dispose /dist/build/2030.1562cc6.js:1
    dispose /dist/build/2030.1562cc6.js:1
    onClose /dist/build/6898.9bbc12a.js:1
    messageHook /dist/build/6898.9bbc12a.js:1
    o /dist/build/3850.903abc2.js:2
    o /dist/build/3850.903abc2.js:2
    c /dist/build/9943.f3f35c7.js:1
    e /dist/build/3850.903abc2.js:2
    close /dist/build/5666.c5e5324.js:1
    _onTabCloseRequested /dist/build/5666.c5e5324.js:1
    u /dist/build/8389.ffe031f.js:1
    emit /dist/build/8389.ffe031f.js:1
    emit /dist/build/8389.ffe031f.js:1
    _evtMouseUp /dist/build/5666.c5e5324.js:1
    handleEvent /dist/build/5666.c5e5324.js:1
    _evtMouseDown /dist/build/5666.c5e5324.js:1
    handleEvent /dist/build/5666.c5e5324.js:1
    onBeforeAttach /dist/build/5666.c5e5324.js:1
    processMessage /dist/build/5666.c5e5324.js:1
    c /dist/build/3850.903abc2.js:2
    e /dist/build/3850.903abc2.js:2
    attachWidget /dist/build/5666.c5e5324.js:1
    _createTabBar /dist/build/5666.c5e5324.js:1
    _insertTab /dist/build/5666.c5e5324.js:1
    addWidget /dist/build/5666.c5e5324.js:1
    addWidget /dist/build/5666.c5e5324.js:1
    _addToMainArea /dist/build/9198.9971d70.js:1
    add /dist/build/9198.9971d70.js:1
    execute /dist/build/3042.7cfad84.js:1
    execute /dist/build/8061.cc62561.js:1
    createLauncher /dist/build/9806.652c162.js:1
    e /dist/build/9806.652c162.js:1
    activate /dist/build/9806.652c162.js:1
    promise callback*activate /dist/build/9806.652c162.js:1
    promise /dist/build/1278.0524a4a.js:2
    promise callback*61278/t.prototype.activatePlugin/d</< /dist/build/1278.0524a4a.js:2
    u /dist/build/1278.0524a4a.js:2
    u /dist/build/1278.0524a4a.js:2
    u /dist/build/1278.0524a4a.js:2
    u /dist/build/1278.0524a4a.js:2
    activatePlugin /dist/build/1278.0524a4a.js:2
    r /dist/build/1278.0524a4a.js:2
    start /dist/build/1278.0524a4a.js:2
    f /dist/build/1408.7461890.js:1
    304 /dist/build/lab/bundle.js?_=4a04b99:1
    304 /dist/build/lab/bundle.js?_=4a04b99:1
    v /dist/build/lab/bundle.js?_=4a04b99:1
    <anonymous> /dist/build/lab/bundle.js?_=4a04b99:1
    <anonymous> /dist/build/lab/bundle.js?_=4a04b99:1
3850.903abc2.js:2:15548

When another notebook is still open, things seem to still work. However, if I close the notebook and it is the last open one, and then reopen the notebook, the sticky area open button in the top menu bar no longer works - clicking it has no effect.

Thank you very much for your help!

Font Awesome Icon not showing

In the JupyterLab interface (when testing with JupyterLite), it looks like the icon is not properly displayed in the notebook toolbar:

image

feature request: floating cells outside of browser window

It would be great if I could click and drag a sticky cell outside the browser window on to my second monitor so I can scroll through the notebook while viewing my dataframe or graph. Is this something that is possible or you might consider?

Not working properly with dark theme

Hi!
This is a great extension, really useful!
I want you to know that it's not displaying the proper text output with the jupyter lab dark theme.
It's showing the text in the same color of the background. I think the problem is that the background of the widget should be dark as well, so we could read the white text of the output.
Here goes a screenshot:

image
image

As you can see, I had to select the text in order to read the output

Thank you!

Style:When overlap with top panel in Jupyterlab,it is hard to choose and drag it down

It is nice and easy to use.

Description:
1 When overlap with top panel in Jupyterlab3(where the blue box is) ,it is hard to choose and drag it down, I have to reload the current notebook.
2 The tools in right upper corner of the cell do not hide behind it when scrolling across. The tools in red box should be owned by the cell
C6C72FCD4EBF38037ED2255901118FDE
Envs:
win 10/2019,Chrome 102, Jupyterlab3.4.2 and the current stickyland 0.2.1

Floating cells not displayed in RetroLab (JupyterLite)

Hi,

Really slick extension!

It's really great that it also works with JupyterLite.

However in the RetroLab interface it looks like the floating cells are not displayed?

floatin-cell-stickyland.mp4

The dev tools console seems to be showing some errors though:

image

Notebook version 7

Does stickyland support Notebook 7.
Love stickyland so useful.

Thank you
Jan du Plessis

Remember dahsboard setup

Does the setup persist? I tried saving and closing after arranging every cell but with reopening of the jupyterlab, it does not persist. In other words, I have to re-arrange everything. It would be great if it remembered my dashboard setup.

Unable to resize long vertical floating cells

Typically cell resizing can be done by dragging the bottom right corner, however for long vertical cell, the bottom right is "hidden" and "unreachable". Scrolling to the end of the Jupyter Notebook does not help.
image
Is there any quick solution for this?

A possible longer term solution might be to allow users to resize cells based on input height and width.
The ability to define the exact height and width can help with aesthetics of dashboard design as well.

extemely fast video

the illustration video is extremely fast, at level that no one can see what happens and what clicked

Is jupyterlab upper version pin correct?

This package pins the upper version of jupyterlab as <=3.6.4. However, additional versions of jupyterlab <4 have been released. Does this package work with them? If so, perhaps the upper pin should be <4, instead.

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.