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 extensions #66

Merged
merged 3 commits into from
Oct 12, 2016
Merged

File extensions #66

merged 3 commits into from
Oct 12, 2016

Conversation

jonatanklosko
Copy link
Contributor

Improves the Open in separate editor feature.

This adds an ability of inferring the appropriate file extension basing on the response Content-Type. The most important point is that this allows Atom to highlight the file nicely and makes working with it easier. (Quiet related with #37.)

I also moved the option to the top as it's really frustrating to scroll down when the response is huge. Here's how it looks now:

screenshot from 2016-10-10 19-39-59

screenshot from 2016-10-10 19-40-12

Copy link
Owner

@ddavison ddavison left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

i too agree this looks wayyy better with the link on the top. good call

@ddavison
Copy link
Owner

@javaguirre @bernardlee ?

Copy link
Contributor

@javaguirre javaguirre left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice PR! Thank you! Please check a couple of comments I left on it.

editor.open()

constructFileName: ->
extension = mime.extension(@lastResponse.headers['content-type']);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This ; is not needed

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done!

editor.open()

constructFileName: ->
extension = mime.extension(@lastResponse.headers['content-type']);
"#{@lastRequest.method} #{@lastRequest.url}#{'.' + extension if extension}"
Copy link
Contributor

@javaguirre javaguirre Oct 10, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is kind of unreadable, could you rewrite it in a way It's easier to read? Thank you! :-)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nevermind, I think It's fine this way 👍

@ddavison ddavison merged commit 0c79079 into ddavison:master Oct 12, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants