Skip to content

experiment with supporting advanced editor flow through config #4465

Closed

Description

@Shinrai

Description

Portable versions of Atom are not supported. Even though with a little bit of work it works just fine.

Version

  • GitHub Desktop: 1.1.1
  • Operating system: Windows 10 Pro x64

Steps to Reproduce

N/A

Expected Behavior

The ability to edit the path for the atom editor.

Actual Behavior

If it's not a default install it won't show the atom editor

Additional Information

I've written what I did to get it to work. But seems like a huge hassle compared to simply giving the user the ability to change the path for atom.
See: https://gist.github.com/Shinrai/27500b67563f7bc1d6968ba8e73cc59b

Activity

  1. shiftkey commented on Apr 18, 2018

    @shiftkey
    Member

    @Shinrai thanks for the feedback.

    We don't currently support pointing to arbitrary locations for an editor, and there's some more context about this that I've added to an earlier thread in #2487 (comment)

  2. added
    help wanted
    on Apr 18, 2018
  3. shiftkey commented on Apr 18, 2018

    @shiftkey
    Member

    Marking this as help wanted because I'd like someone from the community to explore this further.

    The component for configuring your editor is in app/src/ui/preferences/advanced.tsx, and I also have some questions that need to be thought about as part of tackling this:

    • this dialog currently works by detecting installed versions of the tools in the registry - what does the UX look like for adding a portable version of Atom?
    • Desktop currently throws an error when it can't find the editor it's expecting - is that a suitable experience for portable tools that might not be present when using Desktop?
    • Desktop caches the editors it finds for performance reasons the first time the list is needed - a portable tool may become available later, meaning it won't exist in this list until restarting Desktop. What should we do about that?
  4. Shinrai commented on Apr 18, 2018

    @Shinrai
    Author

    @shiftkey
    Yes I’ve read that entire issue.

    As to the three questions you mentioned. Let’s step back and realize for the most part the only people using these tools are developers. Granted you want to make it as easy as possible for newcomers. But some fine grain control would also be nice for advanced users.

    1. Leave the auto detection in place but once detected fill in two input fields with the values needed to open the repo as a repo/project/workspace in an editor. The first field should be the full path to the program file. The 2nd should be a command line argument to send to the program. I haven’t looked into the code in depth to see what github desktop does exactly but let’s presume it sends a folder path into atom.exe. So here is an example of what the two fields might look like when atom is selected:

    Program input:
    C:/Users/username/Appdata/Local/atom/atom.exe

    Command line input:
    -d %REPO_PATH%

    This way if an external program supports the ability to open a repo/project/workspace but might need more command line arguments than the advanced user can get it working. Later this data could possibly be collected to build a database of editors, versions and command line arguments.

    Make the fields editable and when the path changes from one selected from the auto detected. Then simple label it as “Custom” or fish the file attributes for the program name if possible (the fishing for the name would be a nicety not a requirement)

    1. During my testing and eventual hack to get portable Atom to work I don’t recall seeing any error. Atom simply didn’t show up on the list of editors.

    2. Didn’t seem to cache it when I was testing. If I recall I just opened the options and either saw the editor or not. When changing registry settings and getting it to work it came up. When I changed it and it wasn’t working the normal install disappeared. As to performance the only time any editor look ups should be done is when you go to the options and the tab which contains the editor selection. At this point it’s a setting. As such right now there isn’t enough editors supported to really warrant a cache. However with the ability to add a custom editor anywhere other than the settings page github desktop would just use the two input fields to launch into an editor.

  5. changed the title [-]Portable Atom[/-] [+]experiment with supporting advanced editor flow through config[/+] on May 10, 2018
  6. added
    integrations
    and removed on Jul 3, 2018
  7. a2937 commented on Jul 25, 2022

    @a2937

    Um I think the latest pull request related to this might need a review.

  8. sergiou87 commented on Aug 15, 2024

    @sergiou87
    Member

    Please, try out the latest beta from https://desktop.github.com/beta which includes the changes from #18954

    It should help with this. Thank you for your patience!

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    help wantedintegrations

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions