Skip to content
This repository has been archived by the owner on Feb 16, 2023. It is now read-only.

WIP Adds left and right widgets area #275

Closed
Closed
Show file tree
Hide file tree
Changes from 24 commits
Commits
Show all changes
50 commits
Select commit Hold shift + click to select a range
796bce7
Adds left and right widgets
JasonWeill Nov 2, 2021
7888e4e
WIP: Changes to add widgets to left and right areas
JasonWeill Nov 2, 2021
2ac2cc1
Adds element to contain left, main, and right panels; adds yarn error…
JasonWeill Nov 3, 2021
179a1fb
WIP: Reinstates layout to good appearance
JasonWeill Nov 3, 2021
cb16a75
Adds main element which should be relatively positioned
JasonWeill Nov 3, 2021
8aa196c
Re-enables left and right panels
JasonWeill Nov 3, 2021
63f9452
Adds dummy widget to left panel, adds menu item to show/hide left panel
JasonWeill Nov 4, 2021
931a93c
Adds functioning left panel with dummy widget
JasonWeill Nov 5, 2021
5bb84d0
Adds functioning left panel with dummy widget
JasonWeill Nov 5, 2021
f466b80
Merge branch 'jupyterlab:main' into left-right-widgets
JasonWeill Nov 5, 2021
91aed44
Merge branch 'left-right-widgets' of github.com:jweill-aws/retrolab i…
JasonWeill Nov 5, 2021
f1ac7a2
Adds isEmpty function, enables menu items based on it
JasonWeill Nov 5, 2021
510351b
Adds new tests for isEmpty, removes dummy widget from ctor
JasonWeill Nov 5, 2021
89c4c95
Adds toc-extension to package.json
JasonWeill Nov 8, 2021
b238723
Incorporates toc and toc-extension
JasonWeill Nov 8, 2021
ddcad1c
Merge branch 'main' of https://github.com/jupyterlab/retrolab into le…
JasonWeill Nov 8, 2021
fefec09
Package versions revised
JasonWeill Nov 9, 2021
bb59da0
Updates dependencies
JasonWeill Nov 9, 2021
65a515d
Reverts widgets version to 1.23.0 in application
JasonWeill Nov 9, 2021
b842b5b
Downgrades widget versions from 1.30.0 to 1.23.0
JasonWeill Nov 9, 2021
87386dc
Downgrade widgets version in application-extension
JasonWeill Nov 9, 2021
a9a0a26
Downgrades coreutils
JasonWeill Nov 9, 2021
c4e4424
Adds polyfill for webpack usage, other changes to facilitate building
JasonWeill Nov 10, 2021
9fe6886
Reverts some unnecessary upgrades
JasonWeill Nov 10, 2021
828e49d
Updates dependencies per @jtpio
JasonWeill Nov 11, 2021
2910774
Merge branch 'jupyterlab:main' into left-right-widgets-nocopy
JasonWeill Nov 11, 2021
9e356c1
Merge branch 'left-right-widgets-nocopy' of github.com:jweill-aws/ret…
JasonWeill Nov 11, 2021
50c9402
Removes 'util' from webpack config, as it appears no longer needed
JasonWeill Nov 11, 2021
e637ade
Updates webpack config to remove util dependency
JasonWeill Nov 11, 2021
9dc5eff
Update app/package.json per @jtpio
JasonWeill Nov 11, 2021
08dff68
Only shows the Show Left/Right Sidebar menu options on the 'notebooks…
JasonWeill Nov 11, 2021
756f34f
Reinstates old layout for pages without side panels
JasonWeill Nov 11, 2021
d0f47f9
Minor refactoring
JasonWeill Nov 11, 2021
6822ff9
Fixes tests
JasonWeill Nov 12, 2021
4fa5da0
Updates tests to test logic about left/right panels being unavailable
JasonWeill Nov 12, 2021
104cbb4
Merge changes from main
JasonWeill Nov 15, 2021
bf8656a
Merge branch 'jupyterlab-main' into left-right-widgets-nocopy
JasonWeill Nov 15, 2021
11f4107
Merge pull request #2 from jupyterlab/main
JasonWeill Nov 16, 2021
6ea1ea7
Updates dependencies
JasonWeill Nov 17, 2021
13cfee1
WIP: Adds cascading menu for widgets (not updated when widget added)
JasonWeill Nov 19, 2021
0e414ac
Refactors, adds right sidebar code
JasonWeill Nov 19, 2021
cf68741
Merge branch 'jupyterlab:main' into left-right-widgets-nocopy
JasonWeill Nov 29, 2021
1301213
Merge branch 'left-right-widgets-nocopy' of github.com:jweill-aws/ret…
JasonWeill Nov 29, 2021
05e4d3d
Merge branch 'jupyterlab:main' into left-right-widgets-nocopy
JasonWeill Dec 3, 2021
2dc667d
Waits for app.restored before populating list; fixes logic error in i…
JasonWeill Dec 10, 2021
86a6d44
Merge branch 'main' of https://github.com/jupyterlab/retrolab into ju…
JasonWeill Dec 22, 2021
aa6e9ce
Merge branch 'jupyterlab-main-2' into left-right-widgets-nocopy
JasonWeill Dec 22, 2021
83fd06d
Merge branch 'main' of https://github.com/jupyterlab/retrolab into ju…
JasonWeill Feb 2, 2022
b1a9c21
Remove toc-extension
JasonWeill Feb 2, 2022
ec60338
Merge branch 'jupyterlab-main' into left-right-widgets-nocopy
JasonWeill Feb 2, 2022
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
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ node_modules/
.ipynb_checkpoints
*.tsbuildinfo

*/yarn-error.log

# Created by https://www.gitignore.io/api/python
# Edit at https://www.gitignore.io/?templates=python

Expand Down
3 changes: 2 additions & 1 deletion app/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,8 @@ async function main() {
'@jupyterlab/tooltip-extension:manager',
'@jupyterlab/tooltip-extension:notebooks'
].includes(id)
)
),
require('@jupyterlab/toc-extension')
]);
break;
}
Expand Down
4 changes: 4 additions & 0 deletions app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@
"@jupyterlab/tooltip-extension": "~3.2.0",
"@jupyterlab/translation": "~3.2.0",
"@jupyterlab/translation-extension": "~3.2.0",
"@jupyterlab/toc": "~5.3.0",
"@jupyterlab/toc-extension": "~5.3.0-alpha.15",
"@jupyterlab/ui-components": "~3.2.0",
"@jupyterlab/vega5-extension": "~3.2.0",
"@lumino/algorithm": "~1.6.0",
Expand Down Expand Up @@ -113,6 +115,7 @@
"@jupyterlab/terminal-extension": "^3.2.0",
"@jupyterlab/theme-dark-extension": "^3.2.0",
"@jupyterlab/theme-light-extension": "^3.2.0",
"@jupyterlab/toc-extension": "^5.3.0-alpha.15",
"@jupyterlab/tooltip-extension": "^3.2.0",
"@jupyterlab/translation-extension": "^3.2.0",
"@jupyterlab/vega5-extension": "^3.2.0",
Expand Down Expand Up @@ -177,6 +180,7 @@
"@jupyterlab/terminal-extension",
"@jupyterlab/theme-dark-extension",
"@jupyterlab/theme-light-extension",
"@jupyterlab/toc-extension",
"@jupyterlab/tooltip-extension",
"@jupyterlab/translation-extension"
],
Expand Down
5 changes: 4 additions & 1 deletion app/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,9 @@ module.exports = [
name: 'CORE_FEDERATION',
shared: createShared(data)
})
]
],
resolve: {
fallback: { util: require.resolve('util/') }
JasonWeill marked this conversation as resolved.
Show resolved Hide resolved
}
})
].concat(extras);
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -86,5 +86,8 @@
"skip": [
"check-links"
]
},
"dependencies": {
"util": "^0.12.4"
}
}
72 changes: 72 additions & 0 deletions packages/application-extension/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,16 @@ namespace CommandIDs {
*/
export const toggleTop = 'application:toggle-top';

/**
* Toggle left sidebar visibility
*/
export const toggleLeft = 'application:toggle-left';

/**
* Toggle right sidebar visibility
*/
export const toggleRight = 'application:toggle-right';

/**
* Toggle the Zen mode
*/
Expand Down Expand Up @@ -513,6 +523,67 @@ const topVisibility: JupyterFrontEndPlugin<void> = {
autoStart: true
};

/**
* Plugin to toggle the left or right sidebar's visibility.
*/
const sidebarVisibility: JupyterFrontEndPlugin<void> = {
id: '@retrolab/application-extension:sidebar',
requires: [IRetroShell, ITranslator],
optional: [IMainMenu, ISettingRegistry],
activate: (
app: JupyterFrontEnd<JupyterFrontEnd.IShell>,
retroShell: IRetroShell,
translator: ITranslator,
menu: IMainMenu | null,
settingRegistry: ISettingRegistry | null
) => {
const trans = translator.load('retrolab');

app.commands.addCommand(CommandIDs.toggleLeft, {
label: trans.__('Show Left Sidebar'),
execute: () => {
if (retroShell.leftCollapsed) {
retroShell.expandLeft();
} else {
retroShell.collapseLeft();
if (retroShell.currentWidget) {
retroShell.activateById(retroShell.currentWidget.id);
}
}
},
isToggled: () => !retroShell.leftCollapsed,
isEnabled: () => !retroShell.isEmpty('left')
});

app.commands.addCommand(CommandIDs.toggleRight, {
label: trans.__('Show Right Sidebar'),
execute: () => {
if (retroShell.rightCollapsed) {
retroShell.expandRight();
} else {
retroShell.collapseRight();
if (retroShell.currentWidget) {
retroShell.activateById(retroShell.currentWidget.id);
}
}
},
isToggled: () => !retroShell.rightCollapsed,
isEnabled: () => !retroShell.isEmpty('right')
});

if (menu) {
menu.viewMenu.addGroup(
[
{ command: CommandIDs.toggleLeft },
{ command: CommandIDs.toggleRight }
],
2
);
}
},
autoStart: true
};

/**
* The default tree route resolver plugin.
*/
Expand Down Expand Up @@ -672,6 +743,7 @@ const plugins: JupyterFrontEndPlugin<any>[] = [
router,
sessionDialogs,
shell,
sidebarVisibility,
spacer,
status,
tabTitle,
Expand Down
2 changes: 1 addition & 1 deletion packages/application/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
},
"dependencies": {
"@jupyterlab/application": "^3.2.0",
"@jupyterlab/coreutils": "^5.2.0",
"@jupyterlab/coreutils": "^3.2.0",
jtpio marked this conversation as resolved.
Show resolved Hide resolved
"@jupyterlab/docregistry": "^3.2.0",
"@jupyterlab/rendermime-interfaces": "^3.2.0",
"@jupyterlab/ui-components": "^3.2.0",
Expand Down
Loading