-
Notifications
You must be signed in to change notification settings - Fork 10
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
Commands refactor #86
Conversation
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.
Thanks, this looks good.
I just have a comment below.
EDIT:
Actually there are a bunch of functions that may be removed from the Private
namespace of commands.ts, IIUC
createRasterDemSource
createVideoSource
createImageSource
createVectorLayer
createHillshadeLayer
createVideoLayer
createImageLayer
// Layer and group actions | ||
palette.addItem({ | ||
command: CommandIDs.renameLayer, | ||
category: 'JupyterGIS' | ||
}); | ||
|
||
palette.addItem({ | ||
command: CommandIDs.removeLayer, | ||
category: 'JupyterGIS' | ||
}); | ||
|
||
palette.addItem({ | ||
command: CommandIDs.renameGroup, | ||
category: 'JupyterGIS' | ||
}); | ||
|
||
palette.addItem({ | ||
command: CommandIDs.removeGroup, | ||
category: 'JupyterGIS' | ||
}); | ||
|
||
palette.addItem({ | ||
command: CommandIDs.moveLayerToNewGroup, | ||
category: 'JupyterGIS' | ||
}); | ||
|
||
// Source actions | ||
palette.addItem({ | ||
command: CommandIDs.renameSource, | ||
category: 'JupyterGIS' | ||
}); | ||
|
||
palette.addItem({ | ||
command: CommandIDs.removeSource, | ||
category: 'JupyterGIS' | ||
}); |
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.
Wondering if we want to add these ones to the palette.
These commands need to have an item selected in side panel. But when the item is selected, it seems easier to type Del
or F2
instead of opening the command palette and search for the command...
I thought I got rid of those, must've snuck back in when I rebased 😂 That's a good point about the palette commands, I'll take out the ones with keyboard shortcuts. |
Images and videos are raster layers. I was thinking we could add an |
OK, I didn't realize that. |
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.
Thanks @gjmooney, this looks good
This replaces all the separate commands we had for creating sources and layers with one
createEntry
that takes all the necessary arguments to pass to theCreationFormDialog
, and I attempted to standardize how we handle icons and labels. I also wanted to have a consistent naming pattern so I changed the names of the commands that create a source and layer at the same time tonew{type}Entry
to differentiate those from the source/layer only commands. This also re-orders some functions to try and keep the order consistent between our constants, commands, context menus, and the toolbar.