Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add tiny margin to input so that the focus highlight is visible by default #96

Merged
merged 4 commits into from
Apr 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
22 changes: 12 additions & 10 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,17 @@ jobs:
- name: Checkout
uses: actions/checkout@v4
- name: Install node
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: '18'
node-version: '20'
- name: Install Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: '3.10'
architecture: 'x64'

- name: Setup pip cache
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ~/.cache/pip
key: pip-3.10-${{ hashFiles('package.json') }}
Expand All @@ -39,7 +39,7 @@ jobs:
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- name: Setup yarn cache
uses: actions/cache@v3
uses: actions/cache@v4
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
Expand All @@ -56,7 +56,9 @@ jobs:
jlpm run lint:check
python -m pip install .

jupyter labextension list 2>&1 | grep -ie "jupyter-ui-demo.*OK"
jupyter labextension list 2>&1 | grep -ie "jupyter-ui-demo.*enabled"

npx playwright install-deps
python -m jupyterlab.browser_check

pip install build
Expand All @@ -65,7 +67,7 @@ jobs:
pip uninstall -y jupyter_ui_demo jupyterlab
rm -rf myextension

- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: myextension-sdist
path: myextension.tar.gz
Expand All @@ -78,11 +80,11 @@ jobs:
- name: Checkout
uses: actions/checkout@v4
- name: Install Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: '3.10'
architecture: 'x64'
- uses: actions/download-artifact@v3
- uses: actions/download-artifact@v4
with:
name: myextension-sdist
- name: Install and Test
Expand All @@ -93,5 +95,5 @@ jobs:
sudo rm -rf $(which node)
pip install myextension.tar.gz
pip install jupyterlab
jupyter labextension list 2>&1 | grep -ie "jupyter-ui-demo.*OK"
jupyter labextension list 2>&1 | grep -ie "jupyter-ui-demo.*enabled"
python -m jupyterlab.browser_check --no-browser-test
2 changes: 1 addition & 1 deletion .github/workflows/check-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
token: ${{ secrets.GITHUB_TOKEN }}

- name: Upload Distributions
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: jupyter_ui_demo-releaser-dist-${{ github.run_number }}
path: .jupyter_releaser_checkout/dist
24 changes: 12 additions & 12 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,15 @@ jobs:
uses: actions/checkout@v4

- name: Setup Node 💾
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: '18'
node-version: '20'

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

- name: Setup Node 💾
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: '18'
node-version: '20'

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

- name: Setup Node 💾
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: '18'
node-version: '20'

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

- name: Setup Node 💾
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: '18'
node-version: '20'

- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- name: Setup yarn cache
uses: actions/cache@v3
uses: actions/cache@v4
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/docs-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
working-directory: packages/components

- name: Setup Pages
uses: actions/configure-pages@v4
uses: actions/configure-pages@v5

- name: Upload artifact
uses: actions/upload-pages-artifact@v3
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/visual-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,14 @@ jobs:
- name: Setup Node 💾
uses: actions/setup-node@v3
with:
node-version: '18'
node-version: '20'

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

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

- name: Set up browser cache
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: |
${{ github.workspace }}/pw-browsers
Expand All @@ -66,7 +66,7 @@ jobs:
yarn run test:visual -u
working-directory: packages/components

- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
if: ${{ failure() }}
with:
name: jupyter-ui-test
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 6 additions & 0 deletions packages/components/src/styles/patterns/field.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ export const BaseFieldStyles = css`
font-family: ${bodyFont};
outline: none;
user-select: none;
/* Ensure to display focus highlight */
margin: calc((${focusStrokeWidth} - ${strokeWidth}) * 1px);
}

.root {
Expand Down Expand Up @@ -75,6 +77,10 @@ export const BaseFieldStyles = css`
line-height: ${typeRampBaseLineHeight};
}

.control:placeholder-shown {
text-overflow: ellipsis;
}

.control:hover,
.control:${focusVisible},
.control:disabled,
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 1 addition & 9 deletions packages/lab-example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -80,14 +80,6 @@
"styleModule": "style/index.js",
"jupyterlab": {
"extension": true,
"outputDir": "../../jupyter_ui_demo/labextension",
"sharedPackages": {
"@jupyter/react-components": {
"singleton": true
},
"@jupyter/web-components": {
"singleton": true
}
}
"outputDir": "../../jupyter_ui_demo/labextension"
}
}
Loading