Top
Best
New

Posted by steveharrison 1 day ago

window.showDirectoryPicker opens up a whole new world(steveharrison.dev)
112 points | 107 commentspage 2
rightlane 1 day ago|
We are introducing new and exciting ways to expose environment variables and PII every day! Introducing features like this while we are in the midst of uncontrolled supply chain attacks feels like a not great idea.
acbart 1 day ago||
Some of the permissions problems related to window.showDirectoryPicker have been frustrating. I'm developing a client-side Python web framework, and during development I need to mount the library locally; I hand off the directory to Pyodide using this API. But that doesn't work in VSCode's internal browser, apparently because the API just simply isn't able to be approved.
Yiin 1 day ago|
sounds like vscode issue more than anything else
tantalor 1 day ago||
Usability issues? In vscode? No...
steve1977 1 day ago||
I'm not sure if this is meant to be ironic?

"You can also create folders within the app and move photos into them, and it all happens on your filesystem."

Why, yes. But you can also do that with Finder.

And if you want to work with local data, why use the often inferior web-based widgets and toolkits instead of native ones?

This seems to be the worst of both worlds so to speak.

coldpie 1 day ago||
I used to think like this too, but somewhat surprisingly to myself, I have actually come around to deciding the web API is the most user-forward API that closed-source software can target, and it is actually good for end users for closed-source software to target it. This is because web API software is distributed as plaintext to be interpreted by software under user's control, the browser. This gives a ton of power to the user. We as end users can develop browser extensions, CSS hacks, and so on, to make this closed-source software work better for us.

I frequently do this; why can't I paste into this password text box? Screw it, I go into dev tools and enable pasting into it. Who decided grey-on-grey text was a good idea? Screw it, I got into dev tools and make the text black. Why can't I copy the text on this page? Screw it, I go into dev tools and yank it straight from the DOM. Why does this stupid animation take so long? Screw it, I go develop a greasemonkey script to set the animation timer value to 0. This is all quite easy with web API software, but would be be extremely difficult with a compiled binary.

This is to say nothing about the cross-platform benefits. No one's shipping a HaikuOS binary, but most web apps work just fine there, depending on browser feature support.

I think it is also a good choice for open-source software for the same reason. It provides a common, well-tooled API for users to hack the software they are using. But open-source software has other hackable options that make it less of a strong argument there.

Native toolkits definitely have a lot of nice features that the web API doesn't (yet) have, and there's a ton of value in the consistency native toolkits provide. But I think I've come around to valuing hackability over those features, so I'm actually now a web API fan. Again, surprising myself with this switch :)

Ajedi32 12 hours ago||
There are a lot of things to like about the web as an application platform. The security model is a big one for me. There aren't many other application platforms out there where you can just download random apps off the internet and run them with zero worries they'll screw up your system. Plus the web is an open standard, works on desktop and mobile, and has multiple competing independent open source implementations.
petcat 1 day ago||
The best app is the one that is available on your platform.

Unfortunately I think the ubiquity of browser-based web apps are the only reason the Linux desktop is even remotely usable at this point.

yread 1 day ago||
But webkitdirectory="true" could already do that, no?
justusthane 1 day ago||
No, they're very different. Using webkitdirectory="true" on an <input> element just allows you to select a directory to e.g. upload it to the server. It's a one-time operation.

This API returns a handle to the selected directory, giving the webpage ongoing read/write access to the directory.

You couldn't use the former to e.g. create a local-first notes app that stores its files on disk.

simonw 1 day ago|||
That's read-only.

It's very cool though, and worth learning about for anyone who's unfamiliar.

I have a demo page showing what it can do here: https://tools.simonwillison.net/webkitdirectory

bigrocketapps 1 day ago||
Currently using this in socket2.me

Not truly supported across all mobile browser currently, but it's certainly better than just one year ago.

tantalor 1 day ago|
https://caniuse.com/mdn-api_window_showdirectorypicker

* Global 75.2%

Mainly missing Safari and Firefox

chrismorgan 1 day ago|||
You say “mainly missing Safari and Firefox”, but the better way to look at it is “only Chromium”. There is only one implementation, and the other two major implementers have explicitly rejected it. And we don’t standardise things without at least two implementations.
skeledrew 1 day ago||
> we don’t standardise things without at least two implementations

... unless you have the weight of Google.

asdfsa32 1 day ago|||
This new IE6 called Chrome, I hate it.
llosio 1 day ago||
photopea.com already does this...

It's a full photoshop-like image (svg, gif, and video too) editor that runs completely on the browser, and has the ability to load a folder as you "Local Projects" folder.

I'm surprised nobody commented this already

steveharrison 51 minutes ago|
Nice one!
rvz 1 day ago||
Phishers and exploit developers are celebrating and jumping for joy over yet another way to deploy their payload to their victims.

What are the many ways could this possibly go wrong?

Anduia 1 day ago|
"Choose your browser cache folder to improve performance"
codedokode 1 day ago||
Choose .autostart directory to install a video codec needed to play this video.
pmontra 1 day ago||
Or "to save the pictures of those girls." There are infinite ways to make people open the doors of their storage.
cicko 1 day ago||
Too many prompts and not an official API. Back in the day, IE also had tons of "great" and novel ideas, including COM+ something something.
libria 1 day ago||
They also popularized XMLHttpRequest. Sometimes a flexible idea can trend to the greater ecosystem.
steve1977 1 day ago||
ActiveX something something!
buckle8017 1 day ago|
A whole new world of phishing.
More comments...