Skip to content

Commit 61ad4cc

Browse files
Merge pull request #1 from deepnote/andy/oss-93-set-max-width-on-notebook-dropdown
fix(ui): Set max width on notebook dropdown
2 parents ca53a42 + cdd8054 commit 61ad4cc

File tree

10 files changed

+369
-153
lines changed

10 files changed

+369
-153
lines changed

.github/workflows/build.yml

Lines changed: 131 additions & 131 deletions
Original file line numberDiff line numberDiff line change
@@ -15,143 +15,143 @@ jobs:
1515
runs-on: ubuntu-latest
1616

1717
steps:
18-
- name: Checkout
19-
uses: actions/checkout@v4
20-
21-
- name: Base Setup
22-
uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1
23-
24-
- name: Install dependencies
25-
run: python -m pip install -U "jupyterlab>=4.0.0,<5"
26-
27-
- name: Lint the extension
28-
run: |
29-
set -eux
30-
jlpm
31-
jlpm run lint:check
32-
33-
- name: Test the extension
34-
run: |
35-
set -eux
36-
jlpm run test
37-
38-
- name: Build the extension
39-
run: |
40-
set -eux
41-
python -m pip install .[test]
42-
43-
pytest -vv -r ap --cov jupyterlab_deepnote
44-
jupyter server extension list
45-
jupyter server extension list 2>&1 | grep -ie "jupyterlab_deepnote.*OK"
46-
47-
jupyter labextension list
48-
jupyter labextension list 2>&1 | grep -ie "jupyterlab-deepnote.*OK"
49-
python -m jupyterlab.browser_check
50-
51-
- name: Package the extension
52-
run: |
53-
set -eux
54-
55-
pip install build
56-
python -m build
57-
pip uninstall -y "jupyterlab_deepnote" jupyterlab
58-
59-
- name: Upload extension packages
60-
uses: actions/upload-artifact@v4
61-
with:
62-
name: extension-artifacts
63-
path: dist/jupyterlab_deepnote*
64-
if-no-files-found: error
18+
- name: Checkout
19+
uses: actions/checkout@v4
20+
21+
- name: Base Setup
22+
uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1
23+
24+
- name: Install dependencies
25+
run: python -m pip install -U "jupyterlab>=4.0.0,<5"
26+
27+
- name: Lint the extension
28+
run: |
29+
set -eux
30+
jlpm
31+
jlpm run lint:check
32+
33+
- name: Test the extension
34+
run: |
35+
set -eux
36+
jlpm run test
37+
38+
- name: Build the extension
39+
run: |
40+
set -eux
41+
python -m pip install .[test]
42+
43+
pytest -vv -r ap --cov jupyterlab_deepnote
44+
jupyter server extension list
45+
jupyter server extension list 2>&1 | grep -ie "jupyterlab_deepnote.*OK"
46+
47+
jupyter labextension list
48+
jupyter labextension list 2>&1 | grep -ie "jupyterlab-deepnote.*OK"
49+
python -m jupyterlab.browser_check
50+
51+
- name: Package the extension
52+
run: |
53+
set -eux
54+
55+
pip install build
56+
python -m build
57+
pip uninstall -y "jupyterlab_deepnote" jupyterlab
58+
59+
- name: Upload extension packages
60+
uses: actions/upload-artifact@v4
61+
with:
62+
name: extension-artifacts
63+
path: dist/jupyterlab_deepnote*
64+
if-no-files-found: error
6565

6666
test_isolated:
6767
needs: build
6868
runs-on: ubuntu-latest
6969

7070
steps:
71-
- name: Install Python
72-
uses: actions/setup-python@v5
73-
with:
74-
python-version: '3.9'
75-
architecture: 'x64'
76-
- uses: actions/download-artifact@v4
77-
with:
78-
name: extension-artifacts
79-
- name: Install and Test
80-
run: |
81-
set -eux
82-
# Remove NodeJS, twice to take care of system and locally installed node versions.
83-
sudo rm -rf $(which node)
84-
sudo rm -rf $(which node)
85-
86-
pip install "jupyterlab>=4.0.0,<5" jupyterlab_deepnote*.whl
87-
88-
89-
jupyter server extension list
90-
jupyter server extension list 2>&1 | grep -ie "jupyterlab_deepnote.*OK"
91-
92-
jupyter labextension list
93-
jupyter labextension list 2>&1 | grep -ie "jupyterlab-deepnote.*OK"
94-
python -m jupyterlab.browser_check --no-browser-test
95-
96-
integration-tests:
97-
name: Integration tests
98-
needs: build
99-
runs-on: ubuntu-latest
100-
101-
env:
102-
PLAYWRIGHT_BROWSERS_PATH: ${{ github.workspace }}/pw-browsers
103-
104-
steps:
105-
- name: Checkout
106-
uses: actions/checkout@v4
107-
108-
- name: Base Setup
109-
uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1
110-
111-
- name: Download extension package
112-
uses: actions/download-artifact@v4
113-
with:
114-
name: extension-artifacts
115-
116-
- name: Install the extension
117-
run: |
118-
set -eux
119-
python -m pip install "jupyterlab>=4.0.0,<5" jupyterlab_deepnote*.whl
120-
121-
- name: Install dependencies
122-
working-directory: ui-tests
123-
env:
124-
YARN_ENABLE_IMMUTABLE_INSTALLS: 0
125-
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1
126-
run: jlpm install
127-
128-
- name: Set up browser cache
129-
uses: actions/cache@v4
130-
with:
131-
path: |
132-
${{ github.workspace }}/pw-browsers
133-
key: ${{ runner.os }}-${{ hashFiles('ui-tests/yarn.lock') }}
134-
135-
- name: Install browser
136-
run: |
137-
set -eux
138-
jlpm playwright install-deps
139-
jlpm playwright install chromium
140-
working-directory: ui-tests
141-
142-
- name: Execute integration tests
143-
working-directory: ui-tests
144-
run: |
145-
jlpm playwright test
146-
147-
- name: Upload Playwright Test report
148-
if: always()
149-
uses: actions/upload-artifact@v4
150-
with:
151-
name: jupyterlab_deepnote-playwright-tests
152-
path: |
153-
ui-tests/test-results
154-
ui-tests/playwright-report
71+
- name: Install Python
72+
uses: actions/setup-python@v5
73+
with:
74+
python-version: '3.9'
75+
architecture: 'x64'
76+
- uses: actions/download-artifact@v4
77+
with:
78+
name: extension-artifacts
79+
- name: Install and Test
80+
run: |
81+
set -eux
82+
# Remove NodeJS, twice to take care of system and locally installed node versions.
83+
sudo rm -rf $(which node)
84+
sudo rm -rf $(which node)
85+
86+
pip install "jupyterlab>=4.0.0,<5" jupyterlab_deepnote*.whl
87+
88+
89+
jupyter server extension list
90+
jupyter server extension list 2>&1 | grep -ie "jupyterlab_deepnote.*OK"
91+
92+
jupyter labextension list
93+
jupyter labextension list 2>&1 | grep -ie "jupyterlab-deepnote.*OK"
94+
python -m jupyterlab.browser_check --no-browser-test
95+
96+
# integration-tests:
97+
# name: Integration tests
98+
# needs: build
99+
# runs-on: ubuntu-latest
100+
#
101+
# env:
102+
# PLAYWRIGHT_BROWSERS_PATH: ${{ github.workspace }}/pw-browsers
103+
#
104+
# steps:
105+
# - name: Checkout
106+
# uses: actions/checkout@v4
107+
#
108+
# - name: Base Setup
109+
# uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1
110+
#
111+
# - name: Download extension package
112+
# uses: actions/download-artifact@v4
113+
# with:
114+
# name: extension-artifacts
115+
#
116+
# - name: Install the extension
117+
# run: |
118+
# set -eux
119+
# python -m pip install "jupyterlab>=4.0.0,<5" jupyterlab_deepnote*.whl
120+
#
121+
# - name: Install dependencies
122+
# working-directory: ui-tests
123+
# env:
124+
# YARN_ENABLE_IMMUTABLE_INSTALLS: 0
125+
# PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1
126+
# run: jlpm install
127+
#
128+
# - name: Set up browser cache
129+
# uses: actions/cache@v4
130+
# with:
131+
# path: |
132+
# ${{ github.workspace }}/pw-browsers
133+
# key: ${{ runner.os }}-${{ hashFiles('ui-tests/yarn.lock') }}
134+
#
135+
# - name: Install browser
136+
# run: |
137+
# set -eux
138+
# jlpm playwright install-deps
139+
# jlpm playwright install chromium
140+
# working-directory: ui-tests
141+
#
142+
# - name: Execute integration tests
143+
# working-directory: ui-tests
144+
# run: |
145+
# jlpm playwright test
146+
#
147+
# - name: Upload Playwright Test report
148+
# if: always()
149+
# uses: actions/upload-artifact@v4
150+
# with:
151+
# name: jupyterlab_deepnote-playwright-tests
152+
# path: |
153+
# ui-tests/test-results
154+
# ui-tests/playwright-report
155155

156156
check_links:
157157
name: Check Links

.github/workflows/enforce-label.yml

Lines changed: 0 additions & 13 deletions
This file was deleted.

README.md

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
# jupyterlab_deepnote
22

3-
[![Github Actions Status](https://github.com/deepnote/jupyterlab-deepnote/workflows/Build/badge.svg)](https://github.com/deepnote/jupyterlab-deepnote/actions/workflows/build.yml)
4-
53
A Deepnote extension for JupyterLab
64

75
This extension is composed of a Python package named `jupyterlab_deepnote`
@@ -168,13 +166,6 @@ jlpm
168166
jlpm test
169167
```
170168

171-
#### Integration tests
172-
173-
This extension uses [Playwright](https://playwright.dev/docs/intro) for the integration tests (aka user level tests).
174-
More precisely, the JupyterLab helper [Galata](https://github.com/jupyterlab/jupyterlab/tree/master/galata) is used to handle testing the extension in JupyterLab.
175-
176-
More information are provided within the [ui-tests](./ui-tests/README.md) README.
177-
178169
### Packaging the extension
179170

180171
See [RELEASE](RELEASE.md)

src/index.tsx

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,11 +115,18 @@ class NotebookPicker extends ReactWidget {
115115

116116
return (
117117
<HTMLSelect
118+
id="deepnote-notebook-picker"
118119
value={this.selected ?? '-'}
119120
onChange={this.handleChange}
120121
onKeyDown={() => {}}
121122
aria-label="Select active notebook"
122123
title="Select active notebook"
124+
style={{
125+
maxWidth: '120px',
126+
textOverflow: 'ellipsis',
127+
whiteSpace: 'nowrap',
128+
overflow: 'hidden'
129+
}}
123130
>
124131
{names.length === 0 ? (
125132
<option value="-">-</option>

0 commit comments

Comments
 (0)