[SUGGESTION] Improving behaviour when renaming the extension out of a note
CompletedIt very easy to accidentally to rename a note so that it loses its file extension. Given that the UI encourages an approach of ignoring such details for note creation, it feels natural to just type in "new name of document", rather than "new name of document.md". However this results in the file being renamed on the disk to precisely that---and lacking an extension, is no longer recognised as a text file. The system drops to what appears to be a Quick Look preview that is immutable. There are a few options that make sense here to me:
* Use a selection mask similar to how Finder works. You don't by default overtype into the extension area without deliberately changing the selection. This allows for quick and easy renaming in the same vein as creating a new note.
* Consider files without extensions to be text files. It's a perfectly valid UNIX condition anyway (and seems to be what Quick Look assumes, at that).
* If an extension is omitted, for the sake of consistency use the same rules followed by creating a new note and append the application default extension.
On a side note, I feel extensions should be considered a technical detail, optionally hidden and ignorable in a program like this (at least for how I'd use it, I have no intention of putting anything other than text files into it, and use ".md" for everything). But then on the other hand, if one *is* going to be putting a variety of file types in here---protecting that extension becomes all the more important.
-
Official comment
Finally stumbled across the right search terms to get me to something that would give me the ability to tweak the editing behavior when double-clicking a filename.
Changed for next release.
-
I'll look at not selecting the file extension by default when double-clicking a cell (figuring out how to do that is actually trickier than it should be!!). But extensions are necessary, as you can have images, text files, or anything in your folders, so it is important to disambiguate.
As for files without extensions, it is up to macOS how they are treated and whether they are treated as text files -- nvUltra looks to see if whatever file is selected is treated as `public.text` by your system. Anything that is not considered to be a text file by the system is shown using the QuickLook preview.
I added behavior to add the default text extension if you did not use one. This could cause problems if you were renaming an image for example, but at some point the user has to take responsibility for their actions.... ;)
0 -
I second the suggestion to make extensions optionally hidden.
0 -
> …but at some point the user has to take responsibility for their actions…. ;)
Hey now! :)
I totally get where you are coming from with how some people might want to put different kinds of files in, and the freeform nature of how you can open any folder at all only compounds that. It’s a good default behaviour, all things considered—no debate there.
But like I say, for those of us that intend to use this strictly as a text-based notepad (or even those that don’t care so much about the type but rather just what can be seen), having “.md” hundreds of times in the sidebar, taking up valuable width and positioning, feels unnecessary and overly technical. It’s a valuable slot of text because of how macOS truncation works. Those last three characters are given as much priority as the first three, so in a list with a lot of long titles, it reduces the effectiveness of symmetrical truncation to half.
Well, it’s no hill to die on, that’s for sure. But it’s one of the first things that jumped out to me when I launched the beta, and the first thing I looked for an option to switch off.
1 -
>> …but at some point the user has to take responsibility for their actions…. ;)
> Hey now! :)
I can't help it if someone wants to name `image.png` to `image.txt`, and then becomes confused when things don't work properly. ;)
> Those last three characters are given as much priority as the first three, so in a list with a lot of long titles, it reduces the effectiveness of symmetrical truncation to half.
I looked at different forms of truncation, but a common situation is `Some long filename 1.txt`, `Some long filename 2.txt`, so I think truncating the middle is the best approach in this situation overall. Especially since you can widen the sidebar as much as desired, and then use Focus mode to hide it while typing so it doesn't always take up screen real estate. You can even navigate between files from within the search field with the sidebar hidden.
I'll look at whether hiding extensions is reasonable (I know it's possible -- it's a computer, anything is *possible*. ;) But I need to be careful not to overcomplicate the relationships between file paths (which require extensions), a modified display name without extension, the table view (which can show the display name, but still needs to integrate with the indexing and file controllers behind the scenes that require full paths). The last thing I want to do is to unnecessarily introduce opportunity for error or fragility. Maybe there's something that can be done with a custom NSFormatter for the table cells....
0 -
Update -- changing what is displayed in the table without affecting the underlying value was easier than anticipated compared to trying to "pre-select" everything but the extension when editing the cell. So that will be in the next version.
1
Please sign in to leave a comment.
Comments
7 comments