-
Notifications
You must be signed in to change notification settings - Fork 5.1k
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 token on tree widget #6496
Merged
Merged
Add token on tree widget #6496
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
429e255
Adds a token on the notebook tree widget, in order to easily add widg…
brichet 5d6fdef
Update packages/tree/package.json
brichet 5a77a22
Add some docstring
brichet 8feaee8
Fix toolbar not displayed in tree view
brichet 9ac98a6
Code refctoring
brichet 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
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 |
---|---|---|
@@ -1,3 +1,3 @@ | ||
@import url('~@jupyterlab/filebrowser/style/index.css'); | ||
|
||
@import url('./base.css'); | ||
@import url('~@jupyter-notebook/tree/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 |
---|---|---|
@@ -1,3 +1,3 @@ | ||
import '@jupyterlab/filebrowser/style/index.js'; | ||
|
||
import './base.css'; | ||
import '@jupyter-notebook/tree/style/index.js'; |
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,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" | ||
} |
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,2 @@ | ||
export * from './notebook-tree'; | ||
export * from './token'; |
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,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 { | ||
/** | ||
* Constructor of the NotebookTreeWidget. | ||
*/ | ||
constructor() { | ||
super({ | ||
tabPlacement: 'top', | ||
tabsMovable: true, | ||
renderer: TabBarSvg.defaultRenderer | ||
}); | ||
this.addClass('jp-TreePanel'); | ||
} | ||
} |
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,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.
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 @@ | ||
@import url('~@jupyterlab/filebrowser/style/index.css'); | ||
|
||
@import url('./base.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,3 @@ | ||
import '@jupyterlab/filebrowser/style/index.js'; | ||
|
||
import './base.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,13 @@ | ||
{ | ||
"extends": "../../tsconfigbase", | ||
"compilerOptions": { | ||
"outDir": "lib", | ||
"rootDir": "src" | ||
}, | ||
"include": ["src/**/*"], | ||
"references": [ | ||
{ | ||
"path": "../application" | ||
} | ||
] | ||
} |
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
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.
Let's add a docstring to the class and
constructor
for consistency with the rest of the code base?