Skip to content

Commit fb90756

Browse files
committed
iterate on filter toggle button
1 parent 01c1292 commit fb90756

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

src/plugins/driveBrowserPlugin.ts

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,11 @@ import {
1919
Dialog
2020
} from '@jupyterlab/apputils';
2121
import { ISettingRegistry } from '@jupyterlab/settingregistry';
22-
import { FilenameSearcher, IScore } from '@jupyterlab/ui-components';
22+
import {
23+
filterIcon,
24+
FilenameSearcher,
25+
IScore
26+
} from '@jupyterlab/ui-components';
2327
import { CommandRegistry } from '@lumino/commands';
2428
import { Widget } from '@lumino/widgets';
2529

@@ -143,7 +147,10 @@ export const driveFileBrowser: JupyterFrontEndPlugin<void> = {
143147
}
144148
);
145149

146-
// connect the filebrowser toolbar to the settings registry for the plugin
150+
// Add commands
151+
Private.addCommands(app, drive, driveBrowser);
152+
153+
// Connect the filebrowser toolbar to the settings registry for the plugin.
147154
setToolbar(
148155
driveBrowser,
149156
createToolbarFactory(
@@ -176,9 +183,6 @@ export const driveFileBrowser: JupyterFrontEndPlugin<void> = {
176183

177184
// Listen for your plugin setting changes using Signal
178185
setting.changed.connect(loadSetting);
179-
180-
// Add commands
181-
Private.addCommands(app, drive, driveBrowser);
182186
})
183187
.catch(reason => {
184188
console.error(
@@ -352,7 +356,7 @@ namespace Private {
352356
const toggled = browser.showFileFilter;
353357
return toggled;
354358
},
355-
icon: driveBrowserIcon.bindprops({ stylesheet: 'menuItem' }),
359+
icon: filterIcon.bindprops({ stylesheet: 'menuItem' }),
356360
label: 'Toggle File Filter'
357361
});
358362
}

0 commit comments

Comments
 (0)