On the "Save to file" modal for unsaved notebooks, suggest a file name based on the notebook's origins or title #1404
postpostscript
started this conversation in
Ideas
Replies: 2 comments 4 replies
-
This looks great. I think for simplicity we should go with: Methods to derive the suggested path:
I.e. lowercase, replace spaces with "-" WDYT? |
Beta Was this translation helpful? Give feedback.
1 reply
-
I see what you mean about making it easy to select a different directory. What do you think of these changes here?: When you click the select button, instead open the file selector with the filename highlighted (this filename highlighting could also be nice to have in general): If you change the directory in the file selector, update the suggested file to use that directory: |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi! Thanks for creating this great tool!
I would like a way to quickly save unsaved notebooks in a way where I don't have to think about naming them. I have a simple solution working
My solution:
On a notebook's "Save to file" modal, if a file has not been selected previously, display the suggested file with a "Select" button:
If you click "Select", the file will be selected:
If you click it while the file picker is open, the input will be updated:
Methods to derive the suggested path:
https://example.com/example/example.livemd
->$LIVEBOOK_HOME/example.livemd
(could be$LIVEBOOK_HOME/example.com/example/example.livemd
?)$LIVEBOOK_HOME/[uploaded filename]
# My notebook
->$LIVEBOOK_HOME/My_notebook.livemd
# notebook.livemd
->$LIVEBOOK_HOME/notebook.livemd
# my/notebook.md
->$LIVEBOOK_HOME/my_notebook.md.livemd
The file path is sanitized, and
.livemd
is added if it has a different extension. If that file exists already, it will try-1.livemd
,-2.livemd
, etc. until one doesn'tIs this something that would make sense for me to polish for this repo? If so, do you have any feedback on my solution? Thanks!
Beta Was this translation helpful? Give feedback.
All reactions