Skip to content
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

File Importing #34

Closed
nelsonni opened this issue Jun 11, 2017 · 5 comments
Closed

File Importing #34

nelsonni opened this issue Jun 11, 2017 · 5 comments
Assignees
Milestone

Comments

@nelsonni
Copy link
Owner

nelsonni commented Jun 11, 2017

An Open button at the top of the canvas should allow users to browse their local filesystem and select any of the following files for opening:

  • Files with extensions that map to any of the 110 programming languages that AceEditor supports should load into a Code Editor card.
  • Files with no extension or a .txt should load into a Text card.
  • Files with image extensions (.png, .jpg, .gif, .webp, etc.) should load into a Sketch card.
  • For all other files with unknown/unsupported extensions, a popup message should let the user know that the selected file cannot be loaded into the IDE.
@nelsonni nelsonni added this to the v0.5.0 milestone Jun 11, 2017
@nelsonni
Copy link
Owner Author

Previous code to load a single file was introduced in b0f16ff. However, this code does not appear to work anymore on my system (MacOS) and does not account for the wide variety of file types as outlined above.

@El-Dringo-Brannde
Copy link
Collaborator

El-Dringo-Brannde commented Jun 16, 2017

Issue is mainly done except for two bugs:

  1. Loading an image file in Windows has issues since JS treats the '' folder separator as an escape character.

  2. When loading an image on MacOS, trying to drag the card around that contains the image causes it to disappear.

@laurengastineau
Copy link
Collaborator

I attempted to implement an alert when a file cannot be loaded but I could not get it to work. My idea for it is commented out. I am also unsure how to have file-spanned cards only have two faces.

@nelsonni
Copy link
Owner Author

@laurengastineau I added inline comments to your commit b303d4b. The comments should help you figure out where there might be problems with the implementation.

nelsonni added a commit that referenced this issue Jun 25, 2017
File loading now works properly regarding issue #34 and has same styling as UI
@nelsonni
Copy link
Owner Author

Resolved via PR #61.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants