-
-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
Dark High Contrast Theme for JupyterLab with Improved Sidebar Focus Indication #15623
Merged
Merged
Changes from 24 commits
Commits
Show all changes
26 commits
Select commit
Hold shift + click to select a range
957c8f4
Added a high contrast dark theme
m158261 0abcaa2
Updated variables to improve contrast and improved focus indication o…
m158261 91933ad
Added a test for toggling high contrast theme
m158261 c99d6ed
Changed theme name
m158261 0f06313
Merge branch 'main' into high-contrast-theme
m158261 887e4f3
Updated versions in package.json
m158261 ab0963a
Update Playwright Snapshots
github-actions[bot] 978e915
Merge branch 'main' into high-contrast-theme
m158261 9cbcb34
Update version numbers in package.json
m158261 36a9525
Updated snapshots
m158261 f21f6f4
Merge branch 'main' into high-contrast-theme
m158261 b86eefa
Merge branch 'main' into high-contrast-theme
m158261 47d1ad4
Update package.json
m158261 824bfab
Update package.json
m158261 b3f6cae
Update package.json
m158261 f913e68
Update package.json - missed quotation marks
m158261 6dd35e9
Merge branch 'main' into high-contrast-theme
m158261 c16dd33
Update package.json version numbers
m158261 8a7eae4
Merge branch 'main' into high-contrast-theme
m158261 341f44b
Update package.json
m158261 cb789ca
Made naming more consistent
m158261 c28423c
Updated naming in test helpers
m158261 16d720f
Merge branch 'main' into high-contrast-theme
krassowski 547f80f
Update package.json
krassowski a9f5a97
Merge branch 'main' into high-contrast-theme
krassowski 53baccd
Update package.json
krassowski File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file modified
BIN
+454 Bytes
(110%)
...yterlab/menus.test.ts-snapshots/opened-menu-settings-theme-jupyterlab-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# @jupyterlab/theme-dark-high-contrast-extension | ||
|
||
A JupyterLab theme extension which provides a dark high contrast theme. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
{ | ||
"name": "@jupyterlab/theme-dark-high-contrast-extension", | ||
"version": "4.2.0-alpha.2", | ||
"description": "JupyterLab - Dark High Contrast Theme", | ||
"homepage": "https://github.com/jupyterlab/jupyterlab", | ||
"bugs": { | ||
"url": "https://github.com/jupyterlab/jupyterlab/issues" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/jupyterlab/jupyterlab.git" | ||
}, | ||
"license": "BSD-3-Clause", | ||
"author": "Project Jupyter", | ||
"sideEffects": true, | ||
"main": "lib/index.js", | ||
"types": "lib/index.d.ts", | ||
"directories": { | ||
"lib": "lib/" | ||
}, | ||
"files": [ | ||
"lib/*.d.ts", | ||
"lib/*.js.map", | ||
"lib/*.js", | ||
"style/**/*.{css,eot,gif,html,jpg,json,png,svg,woff2,ttf}", | ||
"style/index.js", | ||
"src/**/*.{ts,tsx}" | ||
], | ||
"scripts": { | ||
"build": "tsc -b", | ||
"clean": "rimraf lib && rimraf tsconfig.tsbuildinfo", | ||
"watch": "tsc -b --watch" | ||
}, | ||
"dependencies": { | ||
"@jupyterlab/application": "^4.2.0-alpha.2", | ||
"@jupyterlab/apputils": "^4.3.0-alpha.2", | ||
"@jupyterlab/translation": "^4.2.0-alpha.2" | ||
}, | ||
"devDependencies": { | ||
"rimraf": "~5.0.5", | ||
"typedoc": "~0.24.7", | ||
"typescript": "~5.1.6" | ||
}, | ||
"publishConfig": { | ||
"access": "public" | ||
}, | ||
"jupyterlab": { | ||
"extension": true, | ||
"themePath": "style/theme.css" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
// Copyright (c) Jupyter Development Team. | ||
// Distributed under the terms of the Modified BSD License. | ||
/** | ||
* @packageDocumentation | ||
* @module theme-dark-high-contrast-extension | ||
*/ | ||
|
||
import { | ||
JupyterFrontEnd, | ||
JupyterFrontEndPlugin | ||
} from '@jupyterlab/application'; | ||
import { IThemeManager } from '@jupyterlab/apputils'; | ||
import { ITranslator } from '@jupyterlab/translation'; | ||
|
||
/** | ||
* A plugin for the Jupyter Dark Theme. | ||
*/ | ||
const plugin: JupyterFrontEndPlugin<void> = { | ||
id: '@jupyterlab/theme-dark-high-contrast-extension:plugin', | ||
description: 'Adds a dark high contrast theme.', | ||
requires: [IThemeManager, ITranslator], | ||
activate: ( | ||
app: JupyterFrontEnd, | ||
manager: IThemeManager, | ||
translator: ITranslator | ||
) => { | ||
const trans = translator.load('jupyterlab'); | ||
const style = '@jupyterlab/theme-dark-high-contrast-extension/index.css'; | ||
manager.register({ | ||
name: 'JupyterLab Dark High Contrast', | ||
displayName: trans.__('JupyterLab Dark High Contrast'), | ||
isLight: false, | ||
themeScrollbars: true, | ||
load: () => manager.loadCSS(style), | ||
unload: () => Promise.resolve(undefined) | ||
}); | ||
}, | ||
autoStart: true | ||
}; | ||
|
||
export default plugin; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
/*----------------------------------------------------------------------------- | ||
| Copyright (c) Jupyter Development Team. | ||
| Distributed under the terms of the Modified BSD License. | ||
|----------------------------------------------------------------------------*/ | ||
|
||
/* This file was auto-generated by ensurePackage() in @jupyterlab/buildutils */ | ||
@import url('~@jupyterlab/apputils/style/index.css'); | ||
@import url('~@jupyterlab/application/style/index.css'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
/*----------------------------------------------------------------------------- | ||
| Copyright (c) Jupyter Development Team. | ||
| Distributed under the terms of the Modified BSD License. | ||
|----------------------------------------------------------------------------*/ | ||
|
||
/* This file was auto-generated by ensurePackage() in @jupyterlab/buildutils */ | ||
import '@jupyterlab/apputils/style/index.js'; | ||
import '@jupyterlab/application/style/index.js'; |
26 changes: 26 additions & 0 deletions
26
packages/theme-dark-high-contrast-extension/style/theme.css
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
/*----------------------------------------------------------------------------- | ||
| Copyright (c) Jupyter Development Team. | ||
| Distributed under the terms of the Modified BSD License. | ||
|----------------------------------------------------------------------------*/ | ||
|
||
@import './variables.css'; | ||
|
||
/* Set the default typography for monospace elements */ | ||
tt, | ||
code, | ||
kbd, | ||
samp, | ||
pre { | ||
font-family: var(--jp-code-font-family); | ||
font-size: var(--jp-code-font-size); | ||
line-height: var(--jp-code-line-height); | ||
} | ||
|
||
/* fix illegible yellow backround in exception stacktrace */ | ||
:where( | ||
.jp-RenderedText[data-mime-type='application/vnd.jupyter.stderr'] | ||
pre | ||
.ansi-yellow-bg | ||
) { | ||
color: black; | ||
} |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we really need this? What do folks think?