You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When doing development work on adding new accessibility commands to the command palette I would like it if there was a documented process for this
Proposed Solution
Here is a draft:
To add new command to the command palette of Jupyter please follow these steps:
Navigate to: packages/application-extension/src/index.tsx
create a command IDs used by the application plugin as exported variable (find examples in file) export const <new command name>: string = 'application:<new command name>';
create a function that detailed the functionality of the knew command being added commands.addCommand(CommandIDs.<command ID created in step 2>, { label: () => trans.__('<short description of the command>'), execute: () => { // new command functionality code here }, });
add command to the if palette statement block if (palette) { .... CommandIDs.<command ID created> }
Now navigate to packages/application-extension/schema/commands.json
Add a new json object in the format { "command": "application:<new command name>", "keys": ["<keyboard shortcut combination>"], // shortcut key that will be linked to the command "selector": "body"// which locations in the app can said command be called from }, `
Finally further is needed around:
Guidance on names convention for the command
Guidance on selecting the the combination keys for the a new command
Please indicate where this documentation would live
Additional context
There is this video on how to override a command which doesn't really cover adding new commands to the keyboard-shortcuts
There is also a list of commands which doesn't really cover the request User commands
_*ps this is a first draft, please leave feedback and comments
The text was updated successfully, but these errors were encountered:
Importantly, commands may belong to different packages so your suggestion about a documentation specific to adding a command to application-extension may not be generic enough.
Problem
When doing development work on adding new accessibility commands to the command palette I would like it if there was a documented process for this
Proposed Solution
Here is a draft:
To add new command to the command palette of Jupyter please follow these steps:
Navigate to: packages/application-extension/src/index.tsx
create a command IDs used by the application plugin as exported variable (find examples in file)
export const <new command name>: string = 'application:<new command name>';
create a function that detailed the functionality of the knew command being added
commands.addCommand(CommandIDs.<command ID created in step 2>, {
label: () => trans.__('<short description of the command>'),
execute: () => {
// new command functionality code here
},
});
add command to the if palette statement block
if (palette) {
....
CommandIDs.<command ID created> }
Now navigate to packages/application-extension/schema/commands.json
Add a new json object in the format
{
"command": "application:<new command name>",
"keys": ["<keyboard shortcut combination>"], // shortcut key that will be linked to the command
"selector": "body"// which locations in the app can said command be called from
},
`
Finally further is needed around:
Additional context
There is this video on how to override a command which doesn't really cover adding new commands to the
keyboard-shortcuts
There is also a list of commands which doesn't really cover the request
User commands
_*ps this is a first draft, please leave feedback and comments
The text was updated successfully, but these errors were encountered: