Metadata-Version: 2.4
Name: jl-hidecode
Version: 0.0.1
Dynamic: Keywords
Summary: Hide/show notebook inputs with a Colab-like play button parameter widgets in JupyterLab.
Project-URL: Homepage, https://github.com/CellMigrationLab/jl-hidecode
Project-URL: Bug Tracker, https://github.com/CellMigrationLab/jl-hidecode/issues
Project-URL: Repository, https://github.com/CellMigrationLab/jl-hidecode.git
Author-email: CellMigrationLab <jacquemetlab@gmail.com>
License: BSD 3-Clause License
        
        Copyright (c) 2025, guijacquemet
        All rights reserved.
        
        Redistribution and use in source and binary forms, with or without
        modification, are permitted provided that the following conditions are met:
        
        1. Redistributions of source code must retain the above copyright notice, this
           list of conditions and the following disclaimer.
        
        2. Redistributions in binary form must reproduce the above copyright notice,
           this list of conditions and the following disclaimer in the documentation
           and/or other materials provided with the distribution.
        
        3. Neither the name of the copyright holder nor the names of its
           contributors may be used to endorse or promote products derived from
           this software without specific prior written permission.
        
        THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
        AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
        IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
        DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
        FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
        DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
        SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
        CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
        OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
        OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
License-File: LICENSE
Classifier: Framework :: Jupyter
Classifier: Framework :: Jupyter :: JupyterLab
Classifier: Framework :: Jupyter :: JupyterLab :: 4
Classifier: Framework :: Jupyter :: JupyterLab :: Extensions
Classifier: Framework :: Jupyter :: JupyterLab :: Extensions :: Prebuilt
Classifier: License :: OSI Approved :: BSD License
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Requires-Python: >=3.8
Description-Content-Type: text/markdown

# JupyterLab Hide Code

[![jl-hidecode](https://labextensions.dev/api/badge/jl-hidecode?metric=downloads&leftColor=%23555&rightColor=%23F37620&style=flat)](https://labextensions.dev/extensions/jl-hidecode)

A JupyterLab extension to hide/show notebook inputs (permanently, without accidental uncollapse) with a Colab-like play button.

## Features

### 1.- Show/Hide Code

Allows you to hide the code so it cannot be accidentally uncollapsed by clicking into the cell. You can do this by clicking the notebook toolbar button 'Show/Hide Code' or using the keyboard shortcut `Ctrl+Shift+H` (Windows/Linux) or `Cmd+Shift+H` (Mac).

> Hidden cells stay locked even if you click into them—only the JupyterLab Hide Code shortcut/button changes their visibility, preventing accidental uncollapse while reading.

![Video showing how to use the Show/Hide Code button](docs/JupyterLab_HideCode-Show_Hide_Button.gif)

### 2.- Colab-like Run Button for Locked Cells

When a cell is hidden/locked, a small "play" button appears next to the cell's collapser. Clicking this button runs the cell in place without expanding it.

> This feature is inspired by Google Colab's behavior, allowing users to execute code without revealing it. The regular cell execution methods (Shift+Enter, Run button) will still work as usual without expanding the cell.

![Video showing how to use the Run Button for locked cells](docs/JupyterLab_HideCode-Run_Button.gif)

## Requirements

- JupyterLab >= 4.0.0

## Install

To install the extension, execute:

```bash
pip install jl-hidecode
```

## Uninstall

To remove the extension, execute:

```bash
pip uninstall jl-hidecode
```
