atom / fuzzy-finder

Find and open files quickly
MIT License
276 stars 138 forks source link

Use fuzzy-finder to open remote editors in Teletype portals #335

Closed jasonrudolph closed 6 years ago

jasonrudolph commented 6 years ago

Description of the Change

https://github.com/atom/teletype-client/pull/52 teaches the teletype package to provide a service that other packages can consume to get the list of remote editors that are available when a person is a guest in one or more portals. This pull request teaches the fuzzy-finder package to consume that service (if the teletype package is installed and enabled). Together, these pull requests deliver the following functionality for atom/teletype#268:

  • [ ] Allow guests to use fuzzy-finder to open any remote editor shared by the host

The UI/UX is modeled after the mockup in 2b of https://github.com/atom/teletype/issues/268#issuecomment-363692016. (Note that in addition to updating the fuzzy-finder, that mockup includes updates to the tree-view and the file tabs as well. We're interested in exploring those updates, but since this is a pull request on atom/fuzzy-finder, those other updates are out of scope for this pull request.)

TODO

Rolling out this change

The fuzzy-finder package is bundled with Atom. The teletype package is not yet bundled with Atom. The fuzzy-finder will continue to provide its normal behavior if teletype isn't present or if the user has an older version of teletype that doesn't expose the teletype service. Similarly, teletype will continue to provide its normal behavior if the user has an older version of fuzzy-finder that doesn't consume teletype's service. That said, we'd like to make this functionality available sooner rather than later. :smile: To do so, we're planning the following rollout:


🍐'ed with @as-cii

as-cii commented 6 years ago

After testing this locally it seems to be working quite well.

@simurai: I would love to get your feedback on this. Please, feel free to add commits to this branch until you feel like the design is ✨. To test it out, you will need to:

screen shot 2018-02-15 at 10 50 24
simurai commented 6 years ago

I can't get it to work, cmd-b and cmd-t doesn't show any shared files. I got this in the console:

WebSocket connection to 'wss://ws-mt1.pusher.com/app/f119821248b7429bece3?protocol=7&client=js&version=4.2.2&flash=false' failed: WebSocket is closed before the connection is established.
/Users/simurai/.atom/packages/teletype/lib/teletype-package.js:42 teletype: Using pusher key: f119821248b7429bece3
/Users/simurai/.atom/packages/teletype/lib/teletype-package.js:43 teletype: Using base URL: https://api.teletype.atom.io
4/Users/simurai/.atom/packages/teletype/node_modules/webrtc-adapter/src/js/utils.js:123 RTCIceServer.url is deprecated, please use RTCIceServer.urls instead.

Anyways, I just used var ownerGitHubUsername = 'simurai'; to make the avatars show up.

Added some extra padding, for very long names:

screen shot 2018-02-16 at 1 11 22 pm

simurai commented 6 years ago

I can't get it to work

Got it to work after uninstalling Teletype, and then apm link instead of apm link -d. Sorry for not reading carefully.

simurai commented 6 years ago

cmd+t, to show all local files as well as all the tabs that are currently open on the host.

Using cmd+t, will it eventually be possible to find any file in a host's workspace or is the limitation to show only currently open buffers on the host intentional?

as-cii commented 6 years ago

Using cmd+t, will it eventually be possible to find any file in a host's workspace or is the limitation to show only currently open buffers on the host intentional?

Correct, long-term we will want to show all the files in the remote workspace/project, but for now you're only allowed to see the currently open buffers.