News for hackers. Stuff that matters.
Re:Preview, the Mac app people forget about by hnlmorg on Monday May 09, 2022 @12:36PM (#31316331)
> Another tiny macOS feature I love is that you can drop a file icon on any Open or Save dialog to select the file in the dialog. On other OSs, this moves the file to the directory shown in the dialog, or does nothing.

The reason other OS's don't support that macOS feature is because their open and save dialogue is usable on its own. In my opinion the open and save dialogue is one of the worst designed interfaces on macOS (and easily the worst open and save dialogue across all of the popular desktop environments). The fact that it's "killer feature" is having to use another file navigator to find the target and then drag that file into the first dialogue (ie dialogue that should have been used to find the file to begin with) is more damning than anything.

If there were two things I wish Apple would add in macOS, it is:

1. draggable hotspots (like in Windows and KDE)

2. a completely redesigned open and save dialogue that works a little more like Windows and KDE

I can live (and even like some of) macOS's idiosyncrasies. But those two irritate the hell out of me on an almost daily basis.

Re:Preview, the Mac app people forget about by kergonath on Monday May 09, 2022 @12:46PM (#31316467)
> The reason other OS's don't support that macOS feature is because their open and save dialogue is usable on its own. In my opinion the open and save dialogue is one of the worst designed interfaces on macOS (and easily the worst open and save dialogue across all of the popular desktop environments). The fact that it's "killer feature" is having to use another file navigator to find the target and then drag that file into the first dialogue (ie dialogue that should have been used to find the file to begin with) is more damning than anything.

It is not a browser, or a file manager. It is a file selector. So it allows you to select files, not do some file management. It is not rocket science. I get bitten at least a couple of times a week on Windows when I stupidly drag and drop the file I want to open, and instead of the sensible behaviour it gets just moved to whatever the app thought the default directory should be for its open file dialogs.

> a completely redesigned open and save dialogue that works a little more like Windows and KDE

Hell, no! Let me double that: hell fucking no.

Re:Preview, the Mac app people forget about by hnlmorg on Monday May 09, 2022 @02:53PM (#31318239)
> It is not a browser, or a file manager. It is a file selector.

But you're selecting the file in a file manager and then dragging it into your "file selector". That whole dialogue then becomes completely redundant because you might as well just drag that file into the application window without having to click "open".

> I get bitten at least a couple of times a week on Windows when I stupidly drag and drop the file I want to open

If you drag the file into the text area it will work as you wish. Or you could just drag the file into the application -- a lot of applications will support that and open the file without displaying the file open dialogue.

Re:Preview, the Mac app people forget about by kergonath on Monday May 09, 2022 @03:39PM (#31318760)
> But you're selecting the file in a file manager and then dragging it into your "file selector". That whole dialogue then becomes completely redundant because you might as well just drag that file into the application window without having to click "open".

Sometimes. Others the dialog is how you set things like the format of the file or some import options. Or you need a multiple selection and dropping a bunch of files just opens them separately. Sometimes you can input a regex and you just need to quickly go to the right directory. Sometimes you need to select a file to import it into another document and not open it. It is also damn convenient to just drop the folder where you want a new file to be in a “save as” dialog without having to navigate from dog knows where. There are plenty of use cases.

What is redundant is a file manager in an import dialog. There is a full blown file manager that’s always going to be better just a click away.

> If you drag the file into the text area it will work as you wish.

In theory, yes. In practice it’s hit and miss as developers don’t seem to care about using native widgets (that, and the fact that native widgets have vastly different capabilities on Windows thanks to years of cruft they cannot remove).

[edit] sorry if it sounded harsh; I have nothing against you. It’s just that the file selection dialogs are a particular pain point on Windows and Linux.

Re:Preview, the Mac app people forget about by hnlmorg on Monday May 09, 2022 @04:01PM (#31318999)
> Sometimes

None of that prevents Apple from building a more featureful dialogue

> In theory, yes. In practice it’s hit and miss as developers don’t seem to care about using native widgets (that, and the fact that native widgets have vastly different capabilities on Windows thanks to years of cruft they cannot remove).

I agree it sucks when developers roll their own but that’s not really relevant because we are comparing two very specific dialogues and not the wider OS ecosystem. (I’d use macOS over Windows any day of the week. But that doesn’t mean I have to love everything about macOS).

> sorry if it sounded harsh

You didn’t and we are good :) It’s been really interesting hearing another viewpoint.

> It’s just that the file selection dialogs are a particular pain point on Windows and Linux.

For you. :) Personally I think KDE got it just about perfect.

I guess this just goes to show how completely different two peoples preferences can be.

Re:Preview, the Mac app people forget about by SllX on Monday May 09, 2022 @06:21PM (#31320609)
It’s a shortcut that comes in handy when you operate in deep file hierarchies and can’t be bothered to memorize the path.

That said there’s even easier ways to get there:

Just navigate, the sidebar will reflect what’s in your Finder sidebar so you can use that as a shelf if you’re going into one specific directory a lot for your work. It’s a dynamic environment, you don’t have to treat it like it’s static.

Or: hit Command-Shift-G. This will allow you to type the path with tab completion.

Dragging the folder in is for when you’re operating in the Finder and another application and rather than navigating you want to just drag the proxy in to go right there. It’s a shortcut, but depending on the task it’s not necessarily the most efficient way to do it.

Re:Preview, the Mac app people forget about by cassianoleal on Tuesday May 10, 2022 @04:52AM (#31324937)
> Dragging the folder in is for when you’re operating in the Finder and another application

Not only Finder! You can hover over the filename on the top bar of any application and drag the icon from there as well. It works for any application where you have a file opened.

Re:Preview, the Mac app people forget about by nautilius on Tuesday May 10, 2022 @09:31AM (#31326913)
Is there a pattern to it? I find it an amazing feature, but also find that it doesn't always works. Do I have to do something before I can drag the icon?
Re:Preview, the Mac app people forget about by kergonath on Tuesday May 10, 2022 @10:33AM (#31327597)
In recent versions you might have to hover for the icon to appear, which is infuriating.

Except for that, all proxy icons should be dragable without problem if they are from the native widgets (so no guarantee for misguided developers who reimplemented it to look like the native one without actually implementing its behaviour). There might be a small delay between the moment you click on it and the moment you can drag it, to avoid mistakes (I think that was the case at some point, not really sure now).

Re:Preview, the Mac app people forget about by nautilius on Tuesday May 10, 2022 @08:03PM (#31334214)
Awesome, thank you!
Re:Preview, the Mac app people forget about by adrusi on Monday May 09, 2022 @03:23PM (#31318565)
Sometimes the application doesn't open files you drag onto its windows, and sometimes you want to select a file but not open it.
Re:Preview, the Mac app people forget about by Klonoar on Monday May 09, 2022 @08:26PM (#31321773)
Absolute hard second on this, it works well and doesn't need to be changed.
Re:Preview, the Mac app people forget about by hedgehog on Monday May 09, 2022 @12:44PM (#31316431)
I gotta say, for all of my (many, many) criticisms of macOS the save dialog seems fine to me. I almost always have the destination folder already open in Finder, if anything the improvement would be to put a list of Finder's open folders into the save dialog. Dragging it over works ok though.
Re:Preview, the Mac app people forget about by kitsunesoba on Monday May 09, 2022 @01:33PM (#31317113)
A list of open Finder windows in the sidebar would indeed be lovely.
Re:Preview, the Mac app people forget about by sixstringtheory on Monday May 09, 2022 @02:31PM (#31317962)
Not quite that, but macOS' new tabs-in-windows is close. I personally don't love keeping them all in tabs in a single window, but I can always select the Window > Merge All Windows option to gather all my disparate Finder windows together for this purpose.

(ETA: This wouldn't work in the save dialog though, I missed that detail)

Re:Preview, the Mac app people forget about by adrusi on Monday May 09, 2022 @03:20PM (#31318535)
The macOS open/save dialog is almost identical to the Finder UI, what would you change about it? The reason it's helpful to be able to drag a file from somewhere else into the open/save dialog is that you often already have the file open somewhere. A common workflow: navigate to a document in finder, edit it in some app, save it, upload it to a web form. Similarly if you have a path to the file handy somewhere, you can hit ⌘⇧G and paste it.

And while I can see how reasonable people can disagree about the virtues of Mac/Windows/KDE open/save dialogs, Gnome definitely has the worst. Personally my KDE experience is limited, but of the other three I prefer macOS by a wide margin.

Re:Preview, the Mac app people forget about by hnlmorg on Monday May 09, 2022 @04:40PM (#31319413)
I almost never have Finder open. I usually think "I want to create a spreadsheet" so I'll open Excel and then look for the document. Or I'll be doing some dev work so I'll navigate there in the terminal and then open code via `code .`

I think some of that habit might have stemmed from the fact that I don't like Finder much. I don't like the hotkeys (eg [ENTER] to rename), I don't like it's layout. As much as I disliked Microsoft's "lets turn explorer.exe into Internet Explorer", the editable address bar is actually really nice (you can see precisely where you are and quickly change it to where you want to be).

I'd say Dolphin (KDE) is probably the perfect file manager for me. It's got a terminal baked in (which automatically changes directories when you navigate in the GUI) so you can mix and match GUI and CLI operations. You can add tabs so your file manager can be used as a session (eg if you're working in multiple directories for a specific task or project, you can have one file manager instance open for that task but different tabs per directory). There's so much I love about it. But it's also the polar opposite of Finder, which might explain why I don't like Finder much.

I do completely agree with you about Gnome though.

Re:Preview, the Mac app people forget about by vvillena on Monday May 09, 2022 @03:44PM (#31318805)
This is an interesting chicken-and-egg problem. It could be said that other OSs had to add lots of file management features to their file selector dialog because relying on drag-and-drop from another application was unfeasible.
Re:Preview, the Mac app people forget about by saagarjha on Monday May 09, 2022 @12:38PM (#31316357)
What do you not like about the existing dialog?
Re:Preview, the Mac app people forget about by hnlmorg on Monday May 09, 2022 @03:07PM (#31318395)
Navigating is a pain. eg you cannot navigate to any "hidden" directories and cannot you type paths in the "address bar" nor the file name input selector.

There's a few other little annoyances but I can't recall them right now (currently awaiting delivery of a new MacBook Pro so I'm back to running Linux for the time being).

The dialogue annoys me enough that I've just gotten into the habit of opening everything from the command line instead. In fact Finder is pretty poor for those things too (I've lost count of the amount of times I've ran `open .` to launch Finder in the path I want rather than navigating there via the GUI). But at least Finder does 90+% of what I want, even if I do have to turn to the command line a lot. Whereas I find the open dialogue to be almost completely useless.

Re:Preview, the Mac app people forget about by Rebelgecko on Monday May 09, 2022 @04:09PM (#31319090)
You can just start typing to go to a folder. E.G. type "/tmp↵" will move the panel to that directory
Re:Preview, the Mac app people forget about by jitl on Monday May 09, 2022 @03:56PM (#31318941)
- Cmd-Shift-G opens a fuzzy complete path input

- “Show hidden files” is a preference you can change.

Once you’re comfortable with the CLI and know the paths you care about for a task, in what cases do you prefer a GUI open dialog on other systems?

Re:Preview, the Mac app people forget about by hnlmorg on Monday May 09, 2022 @04:28PM (#31319290)
> Cmd-Shift-G opens a fuzzy complete path input

The problem is that's not going to be an easy thing to remember. It's not an obvious hotkey and nor is it even memorable that the hotkey even exists. There's no UI hints that it does. And when you use hundreds of different pieces of software every day, from CLI tools to complicated desktop applications, there's no way anyone can remember every single hotkey and flag for them. This is why tools like fzf and sophisticated shell auto-completion exist. They've at least recognised that this stuff needs to be discoverable somehow.

In fact that is my biggest annoyance with Apple's UIs. There's so much hidden functionality that is almost impossible to discover (and a lot of it is incredibly easy to forget again too). For example I was using an iPhone for years before I discovered you could move the caret by long pressing on the space bar. Before then I was cursing how much easier it was to edit text in Android because I just assumed there wasn't a precise way to move the caret in iOS. I felt like such an idiot that it took an internet meme to teach me to use my phone...but then I remember that it shouldn't have taken a meme to make people aware that feature existed.

> "Show hidden files” is a preference you can change.

I don't want to change a preference. I want to be able to view hidden files on demand. Most of the time hidden files are better off hidden. That's actually an example of sensible defaults. However it's also useful to be able to toggle them on from the open dialogue when needed.

> Once you’re comfortable with the CLI and know the paths you care about for a task, in what cases do you prefer a GUI open dialog on other systems?

It's the other way around, I grew up on text only systems and had to learn to adapt to GUIs. I still struggle with them even now (which is why I hate it when you're expected to stumble upon functionality by chance).

As for when I prefer to use the GUI open dialogue? It's when I'm already using the GUI for something. Like emails, spreadsheets, word processing. Boring stuff we all wish we didn't have to do but cannot escape completely. I'd rather not have to context switch away from the GUI and back into iTerm just to open a file.

Re:Preview, the Mac app people forget about by chipotle_coyote on Monday May 09, 2022 @09:02PM (#31322062)
> The problem is that's not going to be an easy thing to remember. It's not an obvious hotkey and nor is it even memorable that the hotkey even exists. There's no UI hints that it does.

While I think Apple's UIs do have annoyingly hidden functionality, this particular one is something you can learn by using Finder -- it's the keyboard shortcut for "Go to Folder…" in the "Go" menu. A lot of the "View" and "Go" keyboard shortcuts there work in file picker boxes, but it's true you're not going to be able to do actual file management there.

A lot of "hidden" keyboard shortcuts in macOS really aren't hidden, though; they're either right there in the menus or in the Help menu. If you're in Finder, the first item in that menu is "macOS Help," which opens a user guide…and that User Guide talks about a lot of things. And, it also links to the fairly extensive "Mac keyboard shortcuts" support article. This may be the technical writer in me, but I kinda wish people would read manuals a little more than they do. :)

https://support.apple.com/en-us/HT201236

Re:Preview, the Mac app people forget about by rovolo on Monday May 09, 2022 @05:14PM (#31319843)
> The problem is that's not going to be an easy thing to remember.

'G' for "Go to folder". cmd-G is standardized as "Find Next" across apps, so you add "shift" to do an app-specific behavior.

> I want to be able to view hidden files on demand.

cmd-shift-'.' . The '.' matches the prefix for auto-hidden files.

Re:Preview, the Mac app people forget about by chipotle_coyote on Monday May 09, 2022 @08:47PM (#31321932)
> cmd-shift-'.' . The '.' matches the prefix for auto-hidden files.

This is definitely not behavior I'm seeing in either file picking dialogs or Finder windows.

Re:Preview, the Mac app people forget about by rovolo on Thursday May 12, 2022 @05:31PM (#31360352)
I tested it again locally and it's working for me. Just for you to double check, here's an article with pictures:

https://osxdaily.com/2018/02/12/show-hidden-files-mac-keyboa...

[dead]
Re:Preview, the Mac app people forget about by hnlmorg on Monday May 09, 2022 @02:56PM (#31318259)
I hate Windows! Just because I happen to think specific UI elements are better than macOS it doesn't mean I prefer Windows as a platform. In fact I consider such opinions as being more objective than the "apple can do no wrong" fanboyism that often gets posted.