Skip to content

Commit 10d58cb

Browse files
authored
Add tiny margin to input so that the focus highlight is visible by default (#96)
* Add tiny margin to input so that the focus highlight is visible by default * Fix CI * Fix missing playwright deps * Update snapshots --------- Co-authored-by: Frédéric Collonval <[email protected]>
1 parent c6e558b commit 10d58cb

19 files changed

+37
-37
lines changed

.github/workflows/build.yml

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -17,17 +17,17 @@ jobs:
1717
- name: Checkout
1818
uses: actions/checkout@v4
1919
- name: Install node
20-
uses: actions/setup-node@v3
20+
uses: actions/setup-node@v4
2121
with:
22-
node-version: '18'
22+
node-version: '20'
2323
- name: Install Python
24-
uses: actions/setup-python@v4
24+
uses: actions/setup-python@v5
2525
with:
2626
python-version: '3.10'
2727
architecture: 'x64'
2828

2929
- name: Setup pip cache
30-
uses: actions/cache@v3
30+
uses: actions/cache@v4
3131
with:
3232
path: ~/.cache/pip
3333
key: pip-3.10-${{ hashFiles('package.json') }}
@@ -39,7 +39,7 @@ jobs:
3939
id: yarn-cache-dir-path
4040
run: echo "::set-output name=dir::$(yarn cache dir)"
4141
- name: Setup yarn cache
42-
uses: actions/cache@v3
42+
uses: actions/cache@v4
4343
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
4444
with:
4545
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
@@ -56,7 +56,9 @@ jobs:
5656
jlpm run lint:check
5757
python -m pip install .
5858
59-
jupyter labextension list 2>&1 | grep -ie "jupyter-ui-demo.*OK"
59+
jupyter labextension list 2>&1 | grep -ie "jupyter-ui-demo.*enabled"
60+
61+
npx playwright install-deps
6062
python -m jupyterlab.browser_check
6163
6264
pip install build
@@ -65,7 +67,7 @@ jobs:
6567
pip uninstall -y jupyter_ui_demo jupyterlab
6668
rm -rf myextension
6769
68-
- uses: actions/upload-artifact@v3
70+
- uses: actions/upload-artifact@v4
6971
with:
7072
name: myextension-sdist
7173
path: myextension.tar.gz
@@ -78,11 +80,11 @@ jobs:
7880
- name: Checkout
7981
uses: actions/checkout@v4
8082
- name: Install Python
81-
uses: actions/setup-python@v4
83+
uses: actions/setup-python@v5
8284
with:
8385
python-version: '3.10'
8486
architecture: 'x64'
85-
- uses: actions/download-artifact@v3
87+
- uses: actions/download-artifact@v4
8688
with:
8789
name: myextension-sdist
8890
- name: Install and Test
@@ -93,5 +95,5 @@ jobs:
9395
sudo rm -rf $(which node)
9496
pip install myextension.tar.gz
9597
pip install jupyterlab
96-
jupyter labextension list 2>&1 | grep -ie "jupyter-ui-demo.*OK"
98+
jupyter labextension list 2>&1 | grep -ie "jupyter-ui-demo.*enabled"
9799
python -m jupyterlab.browser_check --no-browser-test

.github/workflows/check-release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
token: ${{ secrets.GITHUB_TOKEN }}
2828

2929
- name: Upload Distributions
30-
uses: actions/upload-artifact@v3
30+
uses: actions/upload-artifact@v4
3131
with:
3232
name: jupyter_ui_demo-releaser-dist-${{ github.run_number }}
3333
path: .jupyter_releaser_checkout/dist

.github/workflows/ci.yml

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,15 @@ jobs:
1919
uses: actions/checkout@v4
2020

2121
- name: Setup Node 💾
22-
uses: actions/setup-node@v3
22+
uses: actions/setup-node@v4
2323
with:
24-
node-version: '18'
24+
node-version: '20'
2525

2626
- name: Get yarn cache directory path
2727
id: yarn-cache-dir-path
2828
run: echo "::set-output name=dir::$(yarn cache dir)"
2929
- name: Setup yarn cache
30-
uses: actions/cache@v2
30+
uses: actions/cache@v4
3131
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
3232
with:
3333
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
@@ -50,15 +50,15 @@ jobs:
5050
uses: actions/checkout@v4
5151

5252
- name: Setup Node 💾
53-
uses: actions/setup-node@v3
53+
uses: actions/setup-node@v4
5454
with:
55-
node-version: '18'
55+
node-version: '20'
5656

5757
- name: Get yarn cache directory path
5858
id: yarn-cache-dir-path
5959
run: echo "::set-output name=dir::$(yarn cache dir)"
6060
- name: Setup yarn cache
61-
uses: actions/cache@v3
61+
uses: actions/cache@v4
6262
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
6363
with:
6464
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
@@ -83,15 +83,15 @@ jobs:
8383
uses: actions/checkout@v4
8484

8585
- name: Setup Node 💾
86-
uses: actions/setup-node@v3
86+
uses: actions/setup-node@v4
8787
with:
88-
node-version: '18'
88+
node-version: '20'
8989

9090
- name: Get yarn cache directory path
9191
id: yarn-cache-dir-path
9292
run: echo "::set-output name=dir::$(yarn cache dir)"
9393
- name: Setup yarn cache
94-
uses: actions/cache@v3
94+
uses: actions/cache@v4
9595
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
9696
with:
9797
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
@@ -113,15 +113,15 @@ jobs:
113113
uses: actions/checkout@v4
114114

115115
- name: Setup Node 💾
116-
uses: actions/setup-node@v3
116+
uses: actions/setup-node@v4
117117
with:
118-
node-version: '18'
118+
node-version: '20'
119119

120120
- name: Get yarn cache directory path
121121
id: yarn-cache-dir-path
122122
run: echo "::set-output name=dir::$(yarn cache dir)"
123123
- name: Setup yarn cache
124-
uses: actions/cache@v3
124+
uses: actions/cache@v4
125125
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
126126
with:
127127
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}

.github/workflows/docs-cd.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ jobs:
3333
working-directory: packages/components
3434

3535
- name: Setup Pages
36-
uses: actions/configure-pages@v4
36+
uses: actions/configure-pages@v5
3737

3838
- name: Upload artifact
3939
uses: actions/upload-pages-artifact@v3

.github/workflows/visual-test.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,14 @@ jobs:
2424
- name: Setup Node 💾
2525
uses: actions/setup-node@v3
2626
with:
27-
node-version: '18'
27+
node-version: '20'
2828

2929
- name: Get yarn cache directory path
3030
id: yarn-cache-dir-path
3131
run: echo "dir=$(yarn config get cacheFolder)" >> $GITHUB_OUTPUT
3232

3333
- name: Setup yarn cache
34-
uses: actions/cache@v3
34+
uses: actions/cache@v4
3535
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
3636
with:
3737
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
@@ -45,7 +45,7 @@ jobs:
4545
run: yarn install
4646

4747
- name: Set up browser cache
48-
uses: actions/cache@v3
48+
uses: actions/cache@v4
4949
with:
5050
path: |
5151
${{ github.workspace }}/pw-browsers
@@ -66,7 +66,7 @@ jobs:
6666
yarn run test:visual -u
6767
working-directory: packages/components
6868

69-
- uses: actions/upload-artifact@v3
69+
- uses: actions/upload-artifact@v4
7070
if: ${{ failure() }}
7171
with:
7272
name: jupyter-ui-test
Loading
Loading
Loading

packages/components/src/styles/patterns/field.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,8 @@ export const BaseFieldStyles = css`
4141
font-family: ${bodyFont};
4242
outline: none;
4343
user-select: none;
44+
/* Ensure to display focus highlight */
45+
margin: calc((${focusStrokeWidth} - ${strokeWidth}) * 1px);
4446
}
4547
4648
.root {
@@ -75,6 +77,10 @@ export const BaseFieldStyles = css`
7577
line-height: ${typeRampBaseLineHeight};
7678
}
7779
80+
.control:placeholder-shown {
81+
text-overflow: ellipsis;
82+
}
83+
7884
.control:hover,
7985
.control:${focusVisible},
8086
.control:disabled,

packages/lab-example/package.json

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -80,14 +80,6 @@
8080
"styleModule": "style/index.js",
8181
"jupyterlab": {
8282
"extension": true,
83-
"outputDir": "../../jupyter_ui_demo/labextension",
84-
"sharedPackages": {
85-
"@jupyter/react-components": {
86-
"singleton": true
87-
},
88-
"@jupyter/web-components": {
89-
"singleton": true
90-
}
91-
}
83+
"outputDir": "../../jupyter_ui_demo/labextension"
9284
}
9385
}

0 commit comments

Comments
 (0)