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 (
151151 } ) ;
152152
153153 app . commands . addCommand ( CommandIDs . createNew , {
154- label : args => ' GIS File ',
154+ label : args => ( args [ 'label' ] as string ) ?? ' GIS Project ',
155155 caption : 'Create a new JGIS Editor' ,
156156 icon : args => logoIcon ,
157157 execute : async args => {
@@ -238,6 +238,14 @@ const activate = async (
238238 } ) ;
239239 }
240240 }
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+ } ) ;
241249} ;
242250
243251const jGISPlugin : JupyterFrontEndPlugin < void > = {
Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ test.describe('#newFile', () => {
66 } ) ;
77
88 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 ( ) ;
1010
1111 const tab = page . getByLabel ( 'notebook content' ) ;
1212 const layers = page . getByText ( 'Layers' , { exact : true } ) ;
You can’t perform that action at this time.
0 commit comments