-
Notifications
You must be signed in to change notification settings - Fork 229
Native file browser #230
Comments
See #227 (comment). We discussed this in chat. The reason is that the native browser does not divulge the absolute file system path, but returns something like |
Background as well: https://github.com/mapbox/tilemill/issues/907 We could do this on certain platforms if it's not a lot of code. The TM1 picker always gets me when it comes to not remembering my place, not having access to keyboard shortcuts like |
What does it divulge? Seems like there's gotta be a way to work around this. In my experience working with TM2, browsing for files is the most frustrating interaction. |
It doesn't pass an absolute path which is currently required when accessing tm2 files. |
Yeah I guess this is an obvious security risk. I wonder if wrapping tm2 in something like webkit.js or node-webkit would help. |
I've been paying some attention to node-webkit - it looks to be extremely sophisticated and I've sought to support it with node-pre-gyp binaries in part to make this possible to experiment with. Though I've always been turned away by the extra size you pay for, at least compared to using system webkit on OS X like we do now. |
Just because we can't do this universally for all web clients doesn't mean we shouldn't do it for some native clients. Choosing an absolute file path and passing that to the server is clearly a security risk for the web globally, but makes the most sense from a user point of view for an operation that is repeated many times throughout the editing of a project. Yes, it's code branching, but it's a clearly superior user experience. Tagging #110 here as something to consider in that work. Fallback could remain the current HTML-based picker, but a future possible native app bundle could do a native picker. |
Hey y'all. I'm sure you heard about the open-sourcing of atom.io, but did you see atom-shell?! This could be a good fit for tm2: https://github.com/atom/atom-shell/blob/master/docs/tutorial/quick-start.md |
Thanks @zeke! Yes, I poured over atom-shell this morning - looks very very interesting as a wrapper. The trick it looks like would be to have it be optional - you should be able to launch tm2 either as an atom shell app or just a server process. The other issue is that native addons would need to be rebuilt against node v0.11.x. So atom-shell is not going to work until I port node-mapnik to use NAN |
Is there a technical reason why we are not using a native file picker/browser for adding sources? It seems a little overkill to reinvent the wheel and create our own.
Plus, there are advantages to using the systems file browser for adding sources:
Recent places
Tagged folders
Familiar
cc @tristen @samanpwbb
The text was updated successfully, but these errors were encountered: