Skip to content

Add support for finding Atom, Visual Studio, and VS Code - #2039

Closed
shimpossible wants to merge 26 commits into
desktop:masterfrom
shimpossible:external-editors
Closed

shimpossible wants to merge 26 commits into
desktop:masterfrom
shimpossible:external-editors

Conversation

@shimpossible

@shimpossible shimpossible commented Jun 17, 2017 •

Copy link
Copy Markdown
Contributor

[WIP]
Allow for additional external editors like the old GitHub Desktop. Supports #1554 #2009

Comment thread app/src/lib/dispatcher/app-shell.ts Outdated
result.push({
name: 'Atom',
})
}

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

Comment thread app/src/lib/dispatcher/app-shell.ts Outdated
if (__DARWIN__) {
const osx = require('shell-osx')
if (osx.isAtomInstalled()) {
result.push({

This comment was marked as spam.

Comment thread app/src/lib/dispatcher/app-shell.ts Outdated
} else {
const win32 = require('./shell-win32')
if(win32.isVisualStudioInstalled() ) {
result.push({

This comment was marked as spam.

Comment thread app/npm-shrinkwrap.json
"version": "0.0.6",
"from": "[email protected]",
"resolved": "https://registry.npmjs.org/7zip/-/7zip-0.0.6.tgz",
"version": "https://registry.npmjs.org/7zip/-/7zip-0.0.6.tgz",

This comment was marked as spam.

This comment was marked as spam.

@joshaber

joshaber commented Jun 22, 2017 •

Copy link
Copy Markdown
Contributor

Ideally we'd allow the user to select whatever application they want, instead of hardcoding a supported list. Otherwise we're likely to get issues asking why we don't support their favorite X editor 😄

I'm not very familiar with Windows—is there a reason to only support a fixed list?

@shimpossible

Copy link
Copy Markdown
Contributor Author

Being able to edit the list would be nice. I'm just trying to get a list as a first step. Different editors work differently. Vscode and atom can open a directory. Visual studio and xcode require project files. Changing to a dynamic list can be a later bunch of changes.

Not sure how I would change the settings ui to support a dynamic list, as I'm not sure what's needed yet. I can add in some hooks for it and let someone else do the ui change.

@shimpossible

Copy link
Copy Markdown
Contributor Author

😄 its configurable now. should work on osx and win
Need to add a settings ui so the user can change things.

Right now I do it in the console

localStorage.setItem('external-editors-.json', '[{"name":"Visual Studio", "cmd":"\\"C:\\\\Program Files (x86)\\\\Microsoft Visual Studio\\\\2017\\\\Community\\\\Common7\\\\IDE\\\\devenv.exe\\" \\"{path}\\""}]')

Might be better to store it by app instead of extension.. not sure yet

@saul

saul commented Jul 5, 2017

Copy link
Copy Markdown
Contributor

Why not open with the user's default editor for a given extension?

@shimpossible

Copy link
Copy Markdown
Contributor Author

It already opens with the default editor. Look at #2009
Theyre was also a request to open with multiple editors

Comment thread app/src/lib/dispatcher/app-shell.ts Outdated
readonly openItem: (path: string) => boolean
readonly getEditors: (path: string) => Promise<IEditorLauncher[]>
readonly setEditors: (ext: string, info: IEditorInfo) => void
readonly setEditors: (ext: string, info: IEditorInfo[]) => void

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

# Conflicts:
#	app/src/lib/dispatcher/app-shell.ts
#	app/src/ui/preferences/preferences.tsx
#	app/src/ui/repositories-list/repository-list-item.tsx
#	package.json
@shimpossible shimpossible changed the title [WIP] Add support for finding Atom, Visual Studio, and VS Code Add support for finding Atom, Visual Studio, and VS Code Jul 28, 2017
@shimpossible

Copy link
Copy Markdown
Contributor Author

🎐

@rlabrecque

rlabrecque commented Jul 28, 2017 •

Copy link
Copy Markdown

Can you show some screenshots of what this looks like now in all the places the UX has changed?

@shimpossible

Copy link
Copy Markdown
Contributor Author

image

Right clicking on any file (if it has an association) shows the menu

...
open in external editor
open in

Right click on a repo also shows:
open in

@shiftkey

Copy link
Copy Markdown
Member

@shimpossible apologies for not chiming in sooner, but I think we need to revisit the scope for this feature in 1.0 and keep it focused.

I wrote up some details in the original issue #2009 (comment) - could you have a look at that?

@shimpossible

Copy link
Copy Markdown
Contributor Author

I agree. This quickly got complicated. And I needs a design that everyone agrees on. But I had already started down the path and wanted to finish. If this doesn't get used, or get refactored into something better that's fine

@shiftkey shiftkey mentioned this pull request Aug 6, 2017
22 tasks done
@aalvrz

aalvrz commented Aug 9, 2017

Copy link
Copy Markdown

I remember some time ago using Github Desktop for Windows and it automatically could find Atom editor when it was installed in my machine. I could open the editor with the whole repository by clicking on the Atom logo shown on the top-right corner of Github Desktop.

However recently I downloaded and installed Github desktop and it looks completely different. Here is what it looked like before, sort of:

image

Can anyone tell me what happened? Was the whole UI changed? I could not find any mention of this in the release notes.

@joshaber

joshaber commented Aug 9, 2017

Copy link
Copy Markdown
Contributor

Can anyone tell me what happened?

Yes! The version you downloaded is the GitHub Desktop Beta. You can read more about it at https://github.com/blog/2362-announcing-git-integration-for-atom-and-github-desktop-beta.

If you want to download the Classic apps, scroll to the bottom of https://desktop.github.com for the links.

@aalvrz

aalvrz commented Aug 9, 2017 •

Copy link
Copy Markdown

@joshaber

Thanks for that. So if I understand correctly, Github Desktop Beta (the one I used before and the one that supported Atom Editor) had separate and different code bases for each platform. However a decision was made to re-write Github Desktop using Electron so that this new single code base (this repository I assume) could work accross all platforms.

Hope the above is correct. And sorry for sort of hijacking this issue.

@shimpossible

Copy link
Copy Markdown
Contributor Author

There is a new version of desktop that is built in typescript. It's listed as beta. If you scroll down to the bottom of https://desktop.GitHub.Com there is a link to the old one

@shiftkey

Copy link
Copy Markdown
Member

@shimpossible thanks for your work on getting this going, but we ended up merging #2407 which will go out in the next update. Please feel free to open issues against it, so we can refine it down the track!

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.

7 participants