-
Notifications
You must be signed in to change notification settings - Fork 668
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
Create New Note Skips Asking Filename #640
Comments
cc @movermeyer as he is the best person to address the comment |
SummaryThanks @smithalexk for raising this issue. It is certainly not a great user experience. I've opened a PR to improve it. The technical detailsThis is happening since the This behaviour of not asking for the title unless the template asks for it was intentional, as in the future we want things like This decision lead to this confusing UX. "Working as expected...incorrectly"It's important to note that our imagined future of (Disclaimer: proposed syntax below. Not official/formalized. May still change) ---
filepath: '${CURRENT_YEAR}-${CURRENT_MONTH}-${CURRENT_DATE}.md'
---
# ${CURRENT_YEAR}-${CURRENT_MONTH}-${CURRENT_DATE} In this case, the template provides everything you need in order to create the note (filepath + file contents) without referencing In the code, this was implemented as "if the template doesn't mention A solution?In order to create a note from a template you need two things:
In cases where the template doesn't explicitly specify the path using the metadata syntax (i.e. all current templates since the metadata syntax isn't implemented yet), we'll add This will prompt the user for a title as they (reasonably) expect it to. Then in the future when the template metadata block contains an explicit override of the filepath, we will stop adding |
Great thanks @movermeyer, I appreciate the quick response! |
Summary
When I use the Foam: Create New Note command with a .foam/templates/new-note.md template present, I am not given an option for a name. Instead, it creates a note in the current directory called "New Note.md" using the new-note.md template.
This seems to be a bug when reading: https://github.com/movermeyer/foam/blob/mo.template_v2_proposal/docs/proposals/templates-v2.md#case-2-foamtemplatesnew-notemd-exists
Steps to reproduce
The text was updated successfully, but these errors were encountered: