- Notifications
You must be signed in to change notification settings - Fork5.5k
Add token on tree widget#6496
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Merged
Uh oh!
There was an error while loading.Please reload this page.
Merged
Changes fromall commits
Commits
Show all changes
5 commits Select commitHold shift + click to select a range
429e255 Adds a token on the notebook tree widget, in order to easily add widg…
brichet5d6fdef Update packages/tree/package.json
brichet5a77a22 Add some docstring
brichet8feaee8 Fix toolbar not displayed in tree view
brichet9ac98a6 Code refctoring
brichetFile filter
Filter by extension
Conversations
Failed to load comments.
Loading
Uh oh!
There was an error while loading.Please reload this page.
Jump to
Jump to file
Failed to load files.
Loading
Uh oh!
There was an error while loading.Please reload this page.
Diff view
Diff view
There are no files selected for viewing
3 changes: 3 additions & 0 deletionsapp/package.json
This file contains hidden or 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
1 change: 1 addition & 0 deletionspackages/_metapackage/package.json
This file contains hidden or 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
1 change: 1 addition & 0 deletionspackages/_metapackage/src/index.ts
This file contains hidden or 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
1 change: 1 addition & 0 deletionspackages/tree-extension/package.json
This file contains hidden or 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
37 changes: 18 additions & 19 deletionspackages/tree-extension/src/index.ts
This file contains hidden or 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
2 changes: 1 addition & 1 deletionpackages/tree-extension/style/index.css
This file contains hidden or 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 |
|---|---|---|
| @@ -1,3 +1,3 @@ | ||
| @import url('~@jupyterlab/filebrowser/style/index.css'); | ||
| @import url('~@jupyter-notebook/tree/style/index.css'); |
2 changes: 1 addition & 1 deletionpackages/tree-extension/style/index.js
This file contains hidden or 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 |
|---|---|---|
| @@ -1,3 +1,3 @@ | ||
| import '@jupyterlab/filebrowser/style/index.js'; | ||
| import '@jupyter-notebook/tree/style/index.js'; |
66 changes: 66 additions & 0 deletionspackages/tree/package.json
This file contains hidden or 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,66 @@ | ||
| { | ||
| "name": "@jupyter-notebook/tree", | ||
| "version": "7.0.0-alpha.5", | ||
| "description": "Jupyter Notebook - Tree", | ||
| "homepage": "https://github.com/jupyter/notebook", | ||
| "bugs": { | ||
| "url": "https://github.com/jupyter/notebook/issues" | ||
| }, | ||
| "repository": { | ||
| "type": "git", | ||
| "url": "https://github.com/jupyter/notebook.git" | ||
| }, | ||
| "license": "BSD-3-Clause", | ||
| "author": "Project Jupyter", | ||
| "sideEffects": [ | ||
| "style/**/*.css", | ||
| "style/index.js" | ||
| ], | ||
| "main": "lib/index.js", | ||
| "types": "lib/index.d.ts", | ||
| "style": "style/index.css", | ||
| "directories": { | ||
| "lib": "lib/" | ||
| }, | ||
| "files": [ | ||
| "lib/*.d.ts", | ||
| "lib/*.js.map", | ||
| "lib/*.js", | ||
| "schema/*.json", | ||
| "style/**/*.css", | ||
| "style/index.js" | ||
| ], | ||
| "scripts": { | ||
| "build": "tsc -b", | ||
| "build:prod": "tsc -b", | ||
| "clean": "rimraf lib && rimraf tsconfig.tsbuildinfo", | ||
| "docs": "typedoc src", | ||
| "prepublishOnly": "npm run build", | ||
| "watch": "tsc -b --watch" | ||
| }, | ||
| "dependencies": { | ||
| "@jupyter-notebook/application": "^7.0.0-alpha.5", | ||
| "@jupyterlab/application": "^4.0.0-alpha.10", | ||
| "@jupyterlab/apputils": "^4.0.0-alpha.10", | ||
| "@jupyterlab/coreutils": "^6.0.0-alpha.10", | ||
| "@jupyterlab/docmanager": "^4.0.0-alpha.10", | ||
| "@jupyterlab/filebrowser": "^4.0.0-alpha.10", | ||
| "@jupyterlab/mainmenu": "^4.0.0-alpha.10", | ||
| "@jupyterlab/services": "^7.0.0-alpha.10", | ||
| "@jupyterlab/settingregistry": "^4.0.0-alpha.10", | ||
| "@jupyterlab/statedb": "^4.0.0-alpha.10", | ||
| "@jupyterlab/translation": "^4.0.0-alpha.10", | ||
| "@jupyterlab/ui-components": "^4.0.0-alpha.25", | ||
| "@lumino/algorithm": "^1.9.1", | ||
| "@lumino/commands": "^1.20.0", | ||
| "@lumino/widgets": "^1.32.0" | ||
| }, | ||
| "devDependencies": { | ||
| "rimraf": "~3.0.0", | ||
| "typescript": "~4.6.3" | ||
| }, | ||
| "publishConfig": { | ||
| "access": "public" | ||
| }, | ||
| "styleModule": "style/index.js" | ||
| } |
2 changes: 2 additions & 0 deletionspackages/tree/src/index.ts
This file contains hidden or 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,2 @@ | ||
| export * from './notebook-tree'; | ||
| export * from './token'; |
22 changes: 22 additions & 0 deletionspackages/tree/src/notebook-tree.ts
This file contains hidden or 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,22 @@ | ||
| import { TabBarSvg } from '@jupyterlab/ui-components'; | ||
| import { TabPanel } from '@lumino/widgets'; | ||
| import { INotebookTree } from './token'; | ||
| /** | ||
| * The widget added in main area of the tree view. | ||
| */ | ||
| export class NotebookTreeWidget extends TabPanel implements INotebookTree { | ||
Member There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others.Learn more. Let's add a docstring to the class and | ||
| /** | ||
| * Constructor of the NotebookTreeWidget. | ||
| */ | ||
| constructor() { | ||
| super({ | ||
| tabPlacement: 'top', | ||
| tabsMovable: true, | ||
| renderer: TabBarSvg.defaultRenderer | ||
| }); | ||
| this.addClass('jp-TreePanel'); | ||
| } | ||
| } | ||
14 changes: 14 additions & 0 deletionspackages/tree/src/token.ts
This file contains hidden or 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,14 @@ | ||
| import { Token } from '@lumino/coreutils'; | ||
| import { TabPanel } from '@lumino/widgets'; | ||
| /** | ||
| * The INotebookTree interface. | ||
| */ | ||
| export interface INotebookTree extends TabPanel {} | ||
| /** | ||
| * The INotebookTree token. | ||
| */ | ||
| export const INotebookTree = new Token<INotebookTree>( | ||
| '@jupyter-notebook/tree:INotebookTree' | ||
| ); |
File renamed without changes.
3 changes: 3 additions & 0 deletionspackages/tree/style/index.css
This file contains hidden or 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 @@ | ||
| @import url('~@jupyterlab/filebrowser/style/index.css'); | ||
| @import url('./base.css'); |
3 changes: 3 additions & 0 deletionspackages/tree/style/index.js
This file contains hidden or 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 @@ | ||
| import '@jupyterlab/filebrowser/style/index.js'; | ||
| import './base.css'; |
13 changes: 13 additions & 0 deletionspackages/tree/tsconfig.json
This file contains hidden or 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,13 @@ | ||
| { | ||
| "extends": "../../tsconfigbase", | ||
| "compilerOptions": { | ||
| "outDir": "lib", | ||
| "rootDir": "src" | ||
| }, | ||
| "include": ["src/**/*"], | ||
| "references": [ | ||
| { | ||
| "path": "../application" | ||
| } | ||
| ] | ||
| } |
20 changes: 20 additions & 0 deletionsyarn.lock
This file contains hidden or 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
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.