jupyterlab-code-snippets icon indicating copy to clipboard operation
jupyterlab-code-snippets copied to clipboard

Templated Fields

Open kpinnipa opened this issue 5 years ago • 2 comments

Problem Description Currently no arguments can be passed to code snippets and no parameters can be set for a snippet.

Solution

  • Allow a place/way for arguments to be passed into a code snippet upon insertion. When creating the snippet users should be allowed to specify a number of parameters and when they insert it a dialog should appear that allows them to fill in these sections.

Problems to Address

  • Have to figure out where these args will be visually and how they will be editable:
    1. On the snippet?
    2. Can they be modified in the editor?
    3. Will types be included?
    4. Limit to number of parameters?
  • Design must be mostly solidified before implementation

kpinnipa avatar Sep 22 '20 18:09 kpinnipa

This would be really excellent feature for daily use.

For example for data analytics, where you have to call many similar transformations like df.pivot_table(index='COL', columns='COL', aggfunc={'COL': FUNCTION}

It would really help to type code much faster...

stefansimik avatar Nov 06 '20 09:11 stefansimik

Thank you for providing an example @stefansimik! We are currently still in the planning stages for this feature and are not sure about the exact release date for it but are definitely interested in developing it. Regardless, we appreciate the feedback and feel free to let us know if you have any further suggestions or encounter any problems!

kpinnipa avatar Nov 20 '20 21:11 kpinnipa