-
Notifications
You must be signed in to change notification settings - Fork 279
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
Always open dropped files if possible #850
base: master
Are you sure you want to change the base?
Conversation
I made a mistake on this, but have fixed it now. Travis should be passing. |
Testing this from the Vancouver airport as I wait for a flight and it works great. Files open as expected after dragging them in. Another option for the ZIP case would be just to not do this at all. Can we skip doing this for ZIPs? Reason is we can avoid some complexity in trying to figure out the "right file" and also in an archive there are usually a bunch of files, so there isn't this expectation that I want to see that one file open like I would with a single added image etc. In the single-image cases this works great. It's also a good way to discover some of our new viewers for users. Lastly, after dragging in a file, the viewer opens, but the file it's showing doesn't get "selected" in the File Tree. See below, for a file I just dragged in "_blam.gif" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well since I have to add comment if I'm requesting changes:
- Highlight the opened file in the Filetree view
- Don't open any files after importing a ZIP
@flukeout made some changes, still can't get the "select when open" to always work, it's a bug deep in Brackets I can't quite find. However, the zip/tar case should work now. |
Awesome, retesting. |
Hey @humphd - give this a try with a css file. For me, it doesn't open a css file after dragging it in, getting this error in the console... This is on src/hosted just running brackets in mac after clearing the application storage. It also throws that error when I try to switch to that file (or, also HTML files) after uploading it. It's cleared up after reloading the editor. I confirmed that this happens only within this branch, and not when running on master. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please see comments I left regarding JS error on CSS/HTML files.
Fixes https://github.com/mozilla/thimble.mozilla.org/issues/2316. Try this out and see what you think. One thing I don't love is that it flashes through opening all the files when you import a
.zip
, which I think is a bit jarring. Maybe we should add some code here to pick the best file to open when you have many and only open that one? For example, prefer an.html
but then have a sliding scale for different types.Please test this multiple ways:
bramble.showUploadDialog()
and use the drop area and "from computer".zip
and.tar
file