Skip to content

Improve "save as" to be able to create directories and to be able to infer the notebook name from the current notebook. #266

Open
@andrewfulton9

Description

Problem

Currently when you try to use "save as" you are limited to saving a file in an already existing folder and furthermore the full path of the new file (except for the .ipynb suffix) must be given. If the notebook name is not given in the path the only feedback you are given is that the text, "Enter a notebook path relative to the notebook dir", turns red:

nb_classic_save_as_folder.mp4

If you give a path that includes 1 or more folders that don't exist the error "No such file or directory":

nb_classic_save_as_new_folder.mp4

Proposed Solution

If no notebook name is given infer the name of the new notebook from the existing notebook. For example say you are working on notebook.ipynb in the root directory, and typed existing_folder/ into the save as dialog the new notebook would be saved to existing_folder/notebook.ipynb.

For paths that contain new folders, open a dialog giving the option to cancel the save as operation, or to create the directory, similar to how overwriting a file from save as works.

Additional context

These changes will behave similarly to JupyterLab current functioning.

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions