File tree Expand file tree Collapse file tree 2 files changed +10
-2
lines changed
python/jupytergis_core/src/jgisplugin Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -151,7 +151,7 @@ const activate = async (
151
151
} ) ;
152
152
153
153
app . commands . addCommand ( CommandIDs . createNew , {
154
- label : args => ' GIS File ',
154
+ label : args => ( args [ 'label' ] as string ) ?? ' GIS Project ',
155
155
caption : 'Create a new JGIS Editor' ,
156
156
icon : args => logoIcon ,
157
157
execute : async args => {
@@ -238,6 +238,14 @@ const activate = async (
238
238
} ) ;
239
239
}
240
240
}
241
+
242
+ // Inject “New JupyterGIS file” into the File Browser context menu
243
+ app . contextMenu . addItem ( {
244
+ command : CommandIDs . createNew ,
245
+ selector : '.jp-DirListing' ,
246
+ rank : 55 ,
247
+ args : { label : 'New JupyterGIS Project' } ,
248
+ } ) ;
241
249
} ;
242
250
243
251
const jGISPlugin : JupyterFrontEndPlugin < void > = {
Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ test.describe('#newFile', () => {
6
6
} ) ;
7
7
8
8
test ( 'New file should open with no errors' , async ( { page } ) => {
9
- await page . getByLabel ( 'notebook content' ) . getByText ( 'GIS File ' ) . click ( ) ;
9
+ await page . getByLabel ( 'notebook content' ) . getByText ( 'GIS Project ' ) . click ( ) ;
10
10
11
11
const tab = page . getByLabel ( 'notebook content' ) ;
12
12
const layers = page . getByText ( 'Layers' , { exact : true } ) ;
You can’t perform that action at this time.
0 commit comments