Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
61 commits
Select commit Hold shift + click to select a range
5550bff
feat: Vuetify3 support
mariobuikhuizen Oct 31, 2023
bc27561
build: sort components and properties in the generated code
mariobuikhuizen Nov 1, 2023
7853dfa
build: use latest node LTS version
mariobuikhuizen Nov 1, 2023
9cb02ae
feat: keep same module structure for generated python code
mariobuikhuizen Nov 1, 2023
f9645ad
chore: bump version 1.8.10 -> 3.0.0.dev0
mariobuikhuizen Nov 1, 2023
04c984c
chore: require ipyvue>=3.0.0.dev0
maartenbreddels Nov 1, 2023
6766f4f
chore: update reacton component
maartenbreddels Nov 1, 2023
314c860
chore: format code with new line width
maartenbreddels Nov 1, 2023
a853e05
fix: typo pm->npm
maartenbreddels Nov 1, 2023
0027704
temp: install solara from branch
maartenbreddels Nov 1, 2023
867c436
docs: make example notebooks work
mariobuikhuizen Nov 1, 2023
c22036d
temp: install ipyvue from branch
maartenbreddels Nov 1, 2023
418ce22
fix: no need for special nodeps view
maartenbreddels Nov 2, 2023
2a7c4ef
feat: reintroduce vueRender so we can keep the templates the same
mariobuikhuizen Nov 8, 2023
035628d
chore: use new prepend-icon prop of vuetify3 in ui-tests
mariobuikhuizen Nov 9, 2023
7c5439e
build: use correct cli param in ui-tests
mariobuikhuizen Nov 9, 2023
7de8ecf
build: accept the small change in rendering for ui-tests
mariobuikhuizen Nov 9, 2023
a620e5a
build: accept visual change in ui-test
mariobuikhuizen Nov 13, 2023
6e181e5
feat: add theme support
mariobuikhuizen Nov 15, 2023
2b46ede
chore: remove commented-out code, update js model versions
mariobuikhuizen Nov 17, 2023
662a9d3
chore: release v3.0.0.alpha1
mariobuikhuizen Nov 17, 2023
f5bac3a
build: use correct version in pypackage.toml and add dry-run
mariobuikhuizen Nov 20, 2023
e35eddd
fix: relax ipyvue version constraint a bit
mariobuikhuizen Nov 28, 2023
cf651f0
chore: bump ipyvue version
mariobuikhuizen Nov 28, 2023
dccdd10
chore: release v3.0.0.alpha2
mariobuikhuizen Nov 28, 2023
27fc095
chore: add build all script
iisakkirotko Feb 24, 2025
3377ce2
feat: scope vuetify styles with :where
iisakkirotko Feb 24, 2025
4ae4ab7
feat: export Vue and Vuetify
iisakkirotko Feb 24, 2025
3822d48
chore: bump external actions
iisakkirotko Feb 24, 2025
6167abf
chore: use jupyter-vue version 3
iisakkirotko Feb 24, 2025
042e4b0
chore: move test runners to ubuntu-22.04
iisakkirotko Feb 25, 2025
49f8a4a
chore: update officially supported Python versions to 3.6-3.13
iisakkirotko Feb 27, 2025
08a5dbc
fix: revert css extraction (#332)
iisakkirotko Feb 27, 2025
898b604
fix: ensure correct styles are excluded from scoping
iisakkirotko Feb 27, 2025
10fe7eb
chore: release v3.0.0.alpha3
mariobuikhuizen Feb 28, 2025
ad5f8bc
fix: get the right vue export for nodeps for solara
mariobuikhuizen Mar 5, 2026
a390f47
publish dev release to github releases
mariobuikhuizen Mar 5, 2026
25682d0
fix github release download
mariobuikhuizen Mar 5, 2026
6aea0f7
use object store instead of github releases
mariobuikhuizen Mar 9, 2026
c66f8d2
expose vutify namespace to templates
mariobuikhuizen Apr 21, 2026
5ac3ec4
fix dependecy issue with solara-test
mariobuikhuizen Apr 21, 2026
1f916a5
Don't create a new theme for each view
mariobuikhuizen Apr 23, 2026
ed3f353
chore: update package-lock after rebase
mariobuikhuizen May 8, 2026
6b2b517
chore: update docs
mariobuikhuizen May 13, 2026
64e613b
fix: make datatable available for solara
mariobuikhuizen May 14, 2026
a0751e2
ci: actually publish dev build on PR push
mariobuikhuizen May 14, 2026
41bd235
refactor: Override Vue component factory for Vuetify views
mariobuikhuizen May 18, 2026
d966521
feat: add support for custom theme colors
mariobuikhuizen May 29, 2026
697f0de
fix: export all lab components
mariobuikhuizen Jun 2, 2026
e3d8639
ci: use npm Trusted Publishing
mariobuikhuizen Jun 19, 2026
8f2c320
chore: release v3.0.0.alpha4
mariobuikhuizen Jun 19, 2026
0c87688
chore: update Vuetify to 3.12.9
mariobuikhuizen Jul 6, 2026
0d810b5
chore: temporarily disable solara ui-tests
mariobuikhuizen Jul 14, 2026
dbcaf2b
chore: release v3.0.0.alpha5
mariobuikhuizen Jul 14, 2026
aab7448
fix: theme from solara app is not applied
mariobuikhuizen Jul 16, 2026
3b9c71c
chore: release v3.0.0.alpha6
mariobuikhuizen Jul 16, 2026
4e5ac27
chore: update released dependencies
mariobuikhuizen Aug 12, 2026
560fa9b
CI: fix jupyter lab 4.6 plugin build
mariobuikhuizen Aug 12, 2026
b3ce596
CI: update github actions dependencies
mariobuikhuizen Aug 12, 2026
5e0c520
build: update JS dependencies to address security advisories
mariobuikhuizen Aug 12, 2026
07b9cd8
chore: update readme to Vuetify 3
mariobuikhuizen Aug 12, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .bumpversion.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ values =

[bumpversion:file:docs/conf.py]

[bumpversion:file:pyproject.toml]
[bumpversion:file:js/src/VuetifyWidget.js]
115 changes: 54 additions & 61 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,34 +9,42 @@ on:
pull_request:
workflow_dispatch:

permissions:
contents: read
id-token: write

jobs:
lint:
runs-on: ubuntu-24.04
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
- uses: actions/checkout@v5
- uses: actions/setup-python@v6
with:
python-version: "3.10"
- uses: pre-commit/action@v3.0.1
- name: Install pre-commit
run: python -m pip install pre-commit
- uses: actions/cache@v5
with:
path: ~/.cache/pre-commit
key: pre-commit-3|${{ env.pythonLocation }}|${{ hashFiles('.pre-commit-config.yaml') }}
- name: Run pre-commit
run: pre-commit run --show-diff-on-failure --color=always --all-files

build:
runs-on: ubuntu-24.04
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
- uses: actions/checkout@v5
- uses: actions/setup-python@v6
with:
python-version: "3.10"
# https://github.com/webpack/webpack/issues/14532
- uses: actions/setup-node@v4
- uses: actions/setup-node@v5
with:
node-version: 16
- name: install build
run: python -m pip install build

node-version: "24"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install "reacton[generate]" ipyvue
pip install "reacton[generate]" "ipyvue>=3.0.0" build

- name: build wheel
run: python -m build

Expand All @@ -45,125 +53,111 @@ jobs:
cp ipyvuetify/components.py ipyvuetify/components-previous.py
python -m ipyvuetify.components
diff ipyvuetify/components.py ipyvuetify/components-previous.py

- name: Package js
run: (cd js && npm pack)
run: (cd js && npm pack --ignore-scripts)
- name: Upload build artifacts
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v6
with:
name: ipyvuetify-dist-${{ github.run_number }}
path: |
./dist
./js/*.tgz

- name: Upload components
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v6
with:
name: ipyvuetify-components-${{ github.run_number }}
path: |
./ipyvuetify/components.py

test:
needs: [lint, build]
runs-on: ubuntu-24.04
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11"]
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12", "3.13"]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
- uses: actions/checkout@v5
- uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
- uses: actions/download-artifact@v4
- uses: actions/download-artifact@v7
with:
name: ipyvuetify-dist-${{ github.run_number }}
- name: Install ipyvuetify
run: python -m pip install "$(find dist -name *.whl)"
run: |
python -m pip install "$(find dist -name '*.whl')"
- name: test import
run: (mkdir test-install; cd test-install; python -c "from ipyvuetify import Btn")

ui-test:
needs: [lint, build]
runs-on: ubuntu-24.04
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
- uses: actions/checkout@v5
- uses: actions/setup-python@v6
with:
python-version: "3.10"
- uses: actions/download-artifact@v4
- uses: actions/download-artifact@v7
with:
name: ipyvuetify-dist-${{ github.run_number }}
- name: Install ipyvuetify
run: python -m pip install "$(find dist -name *.whl)[test]"
run: python -m pip install "$(find dist -name '*.whl')[test]"
- name: Install chromium
run: playwright install chromium
- name: Run ui-tests
run: pytest tests/ui/ --video=retain-on-failure --solara-update-snapshots-ci -s
run: pytest tests/ui/ --video=retain-on-failure -s
- name: Upload Test artifacts
if: always()
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v6
with:
name: ipyvuetify-test-results
path: test-results

release-dry-run:
needs: [test, ui-test]
if: github.event.pull_request.head.repo.full_name == 'widgetti/ipyvuetify'
runs-on: ubuntu-24.04
runs-on: ubuntu-22.04
steps:
- uses: actions/download-artifact@v4
- uses: actions/download-artifact@v7
with:
name: ipyvuetify-dist-${{ github.run_number }}

- name: Install node
uses: actions/setup-node@v4
uses: actions/setup-node@v5
with:
node-version: 14
node-version: "24"
registry-url: "https://registry.npmjs.org"

- name: Install Python
uses: actions/setup-python@v5
with:
python-version: 3.8
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install twine

- name: Publish the Python package
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.TEST_PYPI_API_TOKEN }}
run: twine upload --skip-existing --repository testpypi dist/*

package-manager-cache: false
# No --dry-run available for twine
# - name: Publish the Python package
- name: Publish the NPM package
run: |
cd js
echo $PRE_RELEASE
if [[ $PRE_RELEASE == "true" ]]; then export TAG="next"; else export TAG="latest"; fi
npm publish --dry-run --tag ${TAG} --access public *.tgz
npm publish --dry-run --tag ${TAG} --access public *.tgz
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
PRE_RELEASE: ${{ github.event.release.prerelease }}

release:
if: startsWith(github.event.ref, 'refs/tags/v')
needs: [test, ui-test]
runs-on: ubuntu-24.04
needs: [release-dry-run]
runs-on: ubuntu-22.04
steps:
- uses: actions/download-artifact@v4
- uses: actions/download-artifact@v7
with:
name: ipyvuetify-dist-${{ github.run_number }}

- name: Install node
uses: actions/setup-node@v4
uses: actions/setup-node@v5
with:
node-version: 14
node-version: "24"
registry-url: "https://registry.npmjs.org"
package-manager-cache: false

- name: Install Python
uses: actions/setup-python@v5
uses: actions/setup-python@v6
with:
python-version: 3.8

Expand All @@ -185,5 +179,4 @@ jobs:
if [[ $PRE_RELEASE == "true" ]]; then export TAG="next"; else export TAG="latest"; fi
npm publish --tag ${TAG} --access public *.tgz
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
PRE_RELEASE: ${{ github.event.release.prerelease }}
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ dist/
build/

# generated code
generate_source/build
generate_source/vuetify
ipyvuetify/generated
js/src/generated
Expand Down
1 change: 1 addition & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ repos:
hooks:
- id: black
stages: [commit]
exclude: ^ipyvuetify/components\.py$
- repo: "https://github.com/commitizen-tools/commitizen"
rev: "v2.18.0"
hooks:
Expand Down
10 changes: 8 additions & 2 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,16 @@ version: 2

# build with latest available ubuntu version
build:
os: ubuntu-20.04
os: ubuntu-22.04
tools:
python: "3.10"
nodejs: "16"
nodejs: "20"
jobs:
pre_install:
- cd js && npm ci --ignore-scripts
- cd js && npm run build:docs
- mkdir -p prefix/share/jupyter/nbextensions/jupyter-vuetify
- touch prefix/share/jupyter/nbextensions/jupyter-vuetify/index.js

# Build documentation in the docs/ directory with Sphinx
sphinx:
Expand Down
34 changes: 17 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
[![Black badge](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
[![conventional commit](https://img.shields.io/badge/Conventional%20Commits-1.0.0-yellow.svg)](https://conventionalcommits.org)

Jupyter widgets based on [vuetify UI components](https://v2.vuetifyjs.com/) which implement Google's
Jupyter widgets based on [vuetify UI components](https://v3.vuetifyjs.com/) which implement Google's
[Material Design Spec](https://material.io/) with the [Vue.js framework](https://vuejs.org/).

A small selection of widgets:
Expand Down Expand Up @@ -43,16 +43,16 @@ https://ipyvuetify.readthedocs.io/

For examples see the [example notebook](examples/Examples.ipynb).

The [Vuetify documentation](https://v2.vuetifyjs.com/components/buttons#buttons) can be used to find all available
The [Vuetify 3 documentation](https://v3.vuetifyjs.com/en/components/buttons/) can be used to find all available
components and attributes (in the left side bar or use the search field). Ipyvuetify tries to stay close to the Vue.js
and Vuetify template syntax, but there are some differences:

| Description | Vuetify | ipyvuetify |
| ----------------------------------------------------------------------- | --------------------------------------- | --------------------------------------- |
| Component names are in CamelCase and the v- prefix is stripped | `<v-list-tile .../>` | `ListTile(...)` |
| Component names are in CamelCase and the v- prefix is stripped | `<v-list-item .../>` | `ListItem(...)` |
| Child components and text are defined in the children traitlet | `<v-btn>text <v-icon .../></v-btn>` | `Btn(children=['text', Icon(...)])` |
| Flag attributes require a boolean value | `<v-btn round ...` | `Btn(round=True ...` |
| Attributes are snake_case | `<v-menu offset-y ..` | `Menu(offset_y=True ...` |
| Flag attributes require a boolean value | `<v-btn rounded ...>` | `Btn(rounded=True, ...)` |
| Attributes are snake_case | `<v-select append-icon="mdi-menu" ...>` | `Select(append_icon='mdi-menu', ...)` |
| The v_model attribute (value in ipywidgets) contains the value directly | `<v-slider v-model="some_property" ...` | `Slider(v_model=25...` |
| Event listeners are defined with on_event | `<v-btn @click='someMethod()' ...` | `button.on_event('click', some_method)` |
| | | `def some_method(widget, event, data):` |
Expand All @@ -61,26 +61,26 @@ and Vuetify template syntax, but there are some differences:

### Advanced usage

#### .sync
#### v-model arguments

The .sync property modifier functionality can be achieved by using an event named:
`update:[propertyNameInCamelCase]`.
Vue 3 uses `v-model` arguments for two-way bindings on component properties. The same behavior can be achieved in
ipyvuetify by listening for an event named `update:[propertyNameInCamelCase]`.

##### Vuetify:

```HTML
<v-navigation-drawer :mini-variant.sync=...
<v-navigation-drawer v-model:rail="someProperty" ...>
```

##### ipyvuetify:

```python
drawer = v.NavigationDrawer(mini_variant=True, ...)
drawer = v.NavigationDrawer(rail=True, ...)

def update_mini(widget, event, data):
drawer.mini_variant = data`
def update_rail(widget, event, data):
drawer.rail = data

drawer.on_event('update:miniVariant', update_mini)
drawer.on_event('update:rail', update_rail)
```

### (scoped) slots
Expand All @@ -89,8 +89,8 @@ drawer.on_event('update:miniVariant', update_mini)

```HTML
<v-menu>
<template slot:activator="{ on }">
<v-btn v-on="on">...</v-btn>
<template v-slot:activator="{ props }">
<v-btn v-bind="props">...</v-btn>
</template>
<v-list>
...
Expand All @@ -104,13 +104,13 @@ drawer.on_event('update:miniVariant', update_mini)
Menu(v_slots=[{
'name': 'activator',
'variable': 'x',
'children': Btn(v_on='x.on', children=[...])
'children': Btn(v_on='x.props', children=[...])
}], children=[
List(...)
])
```

For non scoped slots `'scope': 'x'` and `v_on` can be omitted.
For non-scoped slots, `variable` and `v_on` can be omitted.

### Icons

Expand Down
15 changes: 15 additions & 0 deletions docs/_static/jupyter-vuetify-embed-amd.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
const localVuetify = new URL("_static/jupyter-vuetify/index", document.baseURI)
.href;

require.config({
paths: {
"jupyter-vue":
"https://cdn.jsdelivr.net/npm/jupyter-vue@3.0.0-alpha.5/dist/index",
"jupyter-vuetify": localVuetify,
},
});

const script = document.createElement("script");
script.src =
"https://cdn.jsdelivr.net/npm/@jupyter-widgets/html-manager@^1.0.1/dist/embed-amd.js";
document.head.appendChild(script);
Loading