Skip to content

Conversation

@shimpossible
Copy link
Contributor

@shimpossible shimpossible commented Jun 17, 2017

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

result.push({
name: 'Atom',
})
}

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

if (__DARWIN__) {
const osx = require('shell-osx')
if (osx.isAtomInstalled()) {
result.push({

This comment was marked as spam.

} else {
const win32 = require('./shell-win32')
if(win32.isVisualStudioInstalled() ) {
result.push({

This comment was marked as spam.

"version": "0.0.6",
"from": "7zip@0.0.6",
"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
Copy link
Contributor

joshaber commented Jun 22, 2017

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
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
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
Copy link
Contributor

saul commented Jul 5, 2017

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

@shimpossible
Copy link
Contributor Author

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

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
Contributor Author

🎐

@rlabrecque
Copy link

rlabrecque commented Jul 28, 2017

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

@shimpossible
Copy link
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
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
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

@aalvrz
Copy link

aalvrz commented Aug 9, 2017

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
Copy link
Contributor

joshaber commented Aug 9, 2017

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
Copy link

aalvrz commented Aug 9, 2017

@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
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
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