Skip to content
This repository was archived by the owner on Dec 15, 2022. It is now read-only.

Commit

Permalink
Merge pull request #180 from atom/rename-to-teletype
Browse files Browse the repository at this point in the history
Rename package to teletype
  • Loading branch information
Antonio Scandurra authored Nov 8, 2017
2 parents bba91be + 7b63f35 commit 582f52a
Show file tree
Hide file tree
Showing 22 changed files with 93 additions and 93 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ addons:
postgresql: '9.6'

before_script:
- createdb real-time-test
- createdb teletype-test

script: 'curl -s https://raw.githubusercontent.com/atom/ci/master/build-package.sh | sh'

Expand Down
2 changes: 1 addition & 1 deletion ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Do you want to ask a question? Are you looking for support? The Atom message boa

[debugging-guide]: http://flight-manual.atom.io/hacking-atom/sections/debugging/
[message-board]: https://discuss.atom.io/c/faq
[already-filed]: https://github.com/atom/real-time/issues
[already-filed]: https://github.com/atom/teletype/issues

### Description

Expand Down
2 changes: 1 addition & 1 deletion PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
**Please be sure to read the [contributor's guide](https://github.com/atom/real-time/blob/master/CONTRIBUTING.md) before submitting any pull requests.**
**Please be sure to read the [contributor's guide](https://github.com/atom/teletype/blob/master/CONTRIBUTING.md) before submitting any pull requests.**

### Requirements

Expand Down
32 changes: 16 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# real-time
# teletype

Welcome to the **TOP SECRET** real-time package!
Welcome to the **TOP SECRET** teletype package!

⚠️❗🔐 This package is super duper top secret for now. Please don't mention it to any non-Hubbers. 🔐❗⚠️

Expand All @@ -12,7 +12,7 @@ Welcome to the **TOP SECRET** real-time package!
2. In the terminal, install the package via apm:

```sh
apm install atom/real-time
apm install atom/teletype
```

### GUI
Expand All @@ -21,37 +21,37 @@ Welcome to the **TOP SECRET** real-time package!
1. Launch Atom
1. Open Settings View using <kbd>Cmd+,</kbd> on macOS or <kbd>Ctrl+,</kbd> on other platforms
1. Click the Install tab on the left side
1. Enter `https://github.com/atom/real-time` in the search box and press <kbd>Enter</kbd>
1. Enter `https://github.com/atom/teletype` in the search box and press <kbd>Enter</kbd>
1. Click the "Install" button that appears

## Usage

Once you've installed the package, you're ready to start collaborating in real-time.
Once you've installed the package, you're ready to start collaborating in teletype.

- To share your workspace, open the command palette and run the _Real Time: Share Portal_ command. Then, use Slack to send the portal ID to the GitHubbers that you want to collaborate with.
- To join a portal, open the command palette, run the _Real Time: Join Portal_ command, and enter the portal ID.
- To share your workspace, open the command palette and run the _Teletype: Share Portal_ command. Then, use Slack to send the portal ID to the GitHubbers that you want to collaborate with.
- To join a portal, open the command palette, run the _Teletype: Join Portal_ command, and enter the portal ID.

## Demo

[![Real-time Collaboration in Atom](https://github-talks.s3.amazonaws.com/uploads/138/1089/e52cacb3-2d21-4974-b24e-545a33a684ef.embed_cover.jpg)](https://githubber.tv/jasonrudolph/real-time-collaboration-in-atom)
[![Real-time Collaboration in Atom](https://github-talks.s3.amazonaws.com/uploads/138/1089/e52cacb3-2d21-4974-b24e-545a33a684ef.embed_cover.jpg)](https://githubber.tv/jasonrudolph/teletype-collaboration-in-atom)

## Known issues

It's super early days for the real-time package, so there are a few things you'll want to keep in mind:
It's super early days for the teletype package, so there are a few things you'll want to keep in mind:

- Portals use security-by-obscurity for now. Anyone with your portal ID can join your portal. (We'll address this in [Milestone 2](https://github.com/github/atom-log/blob/1f94a5b7ce6f90d9232d51663c9a6adf728831d6/real-time-collaboration/portals-roadmap.md#milestone-2-authentication-and-presence).)
- If you're wondering what's coming next, check out the [roadmap](https://github.com/github/atom-log/blob/master/real-time-collaboration/portals-roadmap.md).
- If you notice any issues or have any feedback, please [open an issue](https://github.com/atom/real-time/issues/new) or ping us (@as-cii, @jasonrudolph, @nathansobo) in the [#atom-real-time][#atom-real-time] channel.
- Portals use security-by-obscurity for now. Anyone with your portal ID can join your portal. (We'll address this in [Milestone 2](https://github.com/github/atom-log/blob/1f94a5b7ce6f90d9232d51663c9a6adf728831d6/teletype-collaboration/portals-roadmap.md#milestone-2-authentication-and-presence).)
- If you're wondering what's coming next, check out the [roadmap](https://github.com/github/atom-log/blob/master/teletype-collaboration/portals-roadmap.md).
- If you notice any issues or have any feedback, please [open an issue](https://github.com/atom/teletype/issues/new) or ping us (@as-cii, @jasonrudolph, @nathansobo) in the [#atom-teletype][#atom-teletype] channel.

## Development

**Prerequisites**: For now, you must be a member of the [@atom/hubbers team in npm](https://www.npmjs.com/org/atom/team/hubbers#members). If you aren't, please drop a note in [#atom-real-time][#atom-real-time] and we'll add you.
**Prerequisites**: For now, you must be a member of the [@atom/hubbers team in npm](https://www.npmjs.com/org/atom/team/hubbers#members). If you aren't, please drop a note in [#atom-teletype][#atom-teletype] and we'll add you.

```sh
git clone https://github.com/atom/real-time
cd real-time
git clone https://github.com/atom/teletype
cd teletype
apm install
apm link
```

[#atom-real-time]: https://github.slack.com/messages/C65B6TS0K/details/
[#atom-teletype]: https://github.slack.com/messages/C65B6TS0K/details/
8 changes: 4 additions & 4 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
const RealTimePackage = require('./lib/real-time-package')
module.exports = new RealTimePackage({
const TeletypePackage = require('./lib/teletype-package')
module.exports = new TeletypePackage({
workspace: atom.workspace,
notificationManager: atom.notifications,
commandRegistry: atom.commands,
tooltipManager: atom.tooltips,
clipboard: atom.clipboard,
pusherKey: atom.config.get('real-time.pusherKey'),
baseURL: atom.config.get('real-time.baseURL')
pusherKey: atom.config.get('teletype.pusherKey'),
baseURL: atom.config.get('teletype.baseURL')
})
2 changes: 1 addition & 1 deletion lib/credential-cache.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
const {execFile} = require('child_process')
const path = require('path')

const SERVICE_NAME = 'atom-tachyon'
const SERVICE_NAME = 'atom-teletype'

class CredentialCache {
async get (key) {
Expand Down
6 changes: 3 additions & 3 deletions lib/editor-binding.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
const path = require('path')
const {Range, Disposable, CompositeDisposable} = require('atom')
const normalizeURI = require('./normalize-uri')
const {FollowState} = require('@atom/real-time-client')
const {FollowState} = require('@atom/teletype-client')
const SitePositionsComponent = require('./site-positions-component')

function doNothing () {}
Expand Down Expand Up @@ -83,7 +83,7 @@ class EditorBinding {
buffer.getPath = () => `${uriPrefix}:${bufferURI}`
buffer.save = () => {}
buffer.isModified = () => false
editor.element.classList.add('realtime-RemotePaneItem')
editor.element.classList.add('teletype-RemotePaneItem')
}

restoreOriginalEditorMethods (editor) {
Expand All @@ -100,7 +100,7 @@ class EditorBinding {
delete buffer.save
delete buffer.isModified

editor.element.classList.remove('realtime-RemotePaneItem')
editor.element.classList.remove('teletype-RemotePaneItem')
editor.emitter.emit('did-change-title', editor.getTitle())
}

Expand Down
2 changes: 1 addition & 1 deletion lib/empty-portal-pane-item.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ class EmptyPortalPaneItem {
this.emitter = new Emitter()
this.element = document.createElement('div')
this.element.tabIndex = -1
this.element.classList.add('realtime-RemotePaneItem')
this.element.classList.add('teletype-RemotePaneItem')
this.element.style.position = 'absolute'
this.element.style.width = '100%'
this.element.style.top = '50%'
Expand Down
2 changes: 1 addition & 1 deletion lib/guest-portal-binding.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
const {CompositeDisposable, Emitter, TextEditor, TextBuffer} = require('atom')
const {Errors} = require('@atom/real-time-client')
const {Errors} = require('@atom/teletype-client')
const BufferBinding = require('./buffer-binding')
const EditorBinding = require('./editor-binding')
const GuestPortalBinding = require('./guest-portal-binding')
Expand Down
4 changes: 2 additions & 2 deletions lib/host-portal-binding.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class HostPortalBinding {
this.didChangeActiveTextEditor.bind(this)
))

this.workspace.getElement().classList.add('realtime-Host')
this.workspace.getElement().classList.add('teletype-Host')
return true
} catch (error) {
this.notificationManager.addError('Failed to share portal', {
Expand All @@ -38,7 +38,7 @@ class HostPortalBinding {
}

dispose () {
this.workspace.getElement().classList.remove('realtime-Host')
this.workspace.getElement().classList.remove('teletype-Host')
this.disposables.dispose()
this.didDispose()
}
Expand Down
2 changes: 1 addition & 1 deletion lib/popover-component.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,6 @@ class PopoverComponent {
})
}

return $.div({className: 'RealTimePopoverComponent'}, activeComponent)
return $.div({className: 'TeletypePopoverComponent'}, activeComponent)
}
}
4 changes: 2 additions & 2 deletions lib/portal-binding-manager.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ class PortalBindingManager {
})

if (await portalBinding.initialize()) {
this.workspace.getElement().classList.add('realtime-Guest')
this.workspace.getElement().classList.add('teletype-Guest')
this.emitter.emit('did-change')
return portalBinding
}
Expand Down Expand Up @@ -126,7 +126,7 @@ class PortalBindingManager {
didDisposeGuestPortalBinding (portalBinding) {
this.promisesByGuestPortalId.delete(portalBinding.portalId)
if (this.promisesByGuestPortalId.size === 0) {
this.workspace.getElement().classList.remove('realtime-Guest')
this.workspace.getElement().classList.remove('teletype-Guest')
}
this.emitter.emit('did-change')
}
Expand Down
2 changes: 1 addition & 1 deletion lib/portal-status-bar-indicator.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class PortalStatusBarIndicator {
this.element,
{
item: this.popoverComponent,
class: 'RealTimePopoverTooltip',
class: 'TeletypePopoverTooltip',
trigger: 'click',
placement: 'top'
}
Expand Down
34 changes: 17 additions & 17 deletions lib/real-time-package.js → lib/teletype-package.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
const {RealTimeClient, Errors} = require('@atom/real-time-client')
const {TeletypeClient, Errors} = require('@atom/teletype-client')
const PortalBindingManager = require('./portal-binding-manager')
const PortalStatusBarIndicator = require('./portal-status-bar-indicator')
const AuthenticationProvider = require('./authentication-provider')
const CredentialCache = require('./credential-cache')

module.exports =
class RealTimePackage {
class TeletypePackage {
constructor (options) {
const {
workspace, notificationManager, commandRegistry, tooltipManager, clipboard,
Expand All @@ -22,7 +22,7 @@ class RealTimePackage {
this.baseURL = baseURL
this.tetherDisconnectWindow = tetherDisconnectWindow
this.credentialCache = credentialCache || new CredentialCache()
this.client = new RealTimeClient({
this.client = new TeletypeClient({
pusherKey: this.pusherKey,
baseURL: this.baseURL,
pubSubGateway: this.pubSubGateway,
Expand All @@ -45,17 +45,17 @@ class RealTimePackage {
}

activate () {
console.log('real-time: Using pusher key:', this.pusherKey)
console.log('real-time: Using base URL:', this.baseURL)
console.log('teletype: Using pusher key:', this.pusherKey)
console.log('teletype: Using base URL:', this.baseURL)

this.commandRegistry.add('atom-workspace', {
'real-time:share-portal': () => this.sharePortal()
'teletype:share-portal': () => this.sharePortal()
})
this.commandRegistry.add('atom-workspace', {
'real-time:join-portal': () => this.joinPortal()
'teletype:join-portal': () => this.joinPortal()
})
this.commandRegistry.add('atom-workspace.realtime-Host', {
'real-time:close-portal': () => this.closeHostPortal()
this.commandRegistry.add('atom-workspace.teletype-Host', {
'teletype:close-portal': () => this.closeHostPortal()
})

// Initiate sign-in, which will continue asynchronously, since we don't want
Expand Down Expand Up @@ -96,8 +96,8 @@ class RealTimePackage {
}

async consumeStatusBar (statusBar) {
const realTimeClient = await this.getClient()
if (!realTimeClient) return
const teletypeClient = await this.getClient()
if (!teletypeClient) return

const portalBindingManager = await this.getPortalBindingManager()
if (!portalBindingManager) return
Expand All @@ -106,7 +106,7 @@ class RealTimePackage {
if (!authenticationProvider) return

this.portalStatusBarIndicator = new PortalStatusBarIndicator({
realTimeClient,
teletypeClient,
portalBindingManager,
authenticationProvider,
tooltipManager: this.tooltipManager,
Expand Down Expand Up @@ -155,7 +155,7 @@ class RealTimePackage {

handleConnectionError (event) {
const message = 'Connection Error'
const description = `An error occurred with a real-time connection: <code>${event.message}</code>`
const description = `An error occurred with a teletype connection: <code>${event.message}</code>`
this.notificationManager.addError(message, {
description,
dismissable: true
Expand Down Expand Up @@ -209,18 +209,18 @@ class RealTimePackage {
} catch (error) {
let message, description, buttons
if (error instanceof Errors.ClientOutOfDateError) {
message = 'The real-time package is out of date'
message = 'The teletype package is out of date'
description = 'You will need to update the package to continue collaborating.'
buttons = [{
text: 'View Package Settings',
onDidClick: () => {
this.workspace.open('atom://config/packages/real-time')
this.workspace.open('atom://config/packages/teletype')
notification.dismiss()
}
}]
} else {
message = 'Failed to initialize the real-time package'
description = `Establishing a real-time connection failed with error: <code>${error.message}</code>`
message = 'Failed to initialize the teletype package'
description = `Establishing a teletype connection failed with error: <code>${error.message}</code>`
buttons = null
}

Expand Down
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
{
"name": "real-time",
"name": "teletype",
"version": "0.1.0",
"description": "",
"main": "index.js",
"repository": "https://github.com/atom/real-time",
"repository": "https://github.com/atom/teletype",
"scripts": {
"test": "atom --test test"
},
"author": "",
"license": "MIT",
"atomTestRunner": "./test/setup",
"devDependencies": {
"@atom/real-time-server": "https://user-with-just-readonly-access-to-realtime-repos:[email protected]/repos/atom/real-time-server/tarball/v0.15.0",
"@atom/teletype-server": "https://user-with-just-readonly-access-to-realtime-repos:[email protected]/repos/atom/teletype-server/tarball/v0.16.0",
"atom-mocha-test-runner": "^1.0.1",
"deep-equal": "^1.0.1",
"temp": "^0.8.3"
},
"dependencies": {
"@atom/real-time-client": "https://user-with-just-readonly-access-to-realtime-repos:[email protected]/repos/atom/real-time-client/tarball/v0.24.0",
"@atom/teletype-client": "https://user-with-just-readonly-access-to-realtime-repos:[email protected]/repos/atom/teletype-client/tarball/v0.25.0",
"etch": "^0.12.6"
},
"consumedServices": {
Expand Down
4 changes: 2 additions & 2 deletions styles/real-time.less → styles/teletype.less
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
}
}

.RealTimePopoverTooltip {
.TeletypePopoverTooltip {
user-select: none;

&.tooltip {
Expand Down Expand Up @@ -51,7 +51,7 @@
}
}

.RealTimePopoverComponent {
.TeletypePopoverComponent {
height: 100%;
display: flex;
align-items: center;
Expand Down
Loading

0 comments on commit 582f52a

Please sign in to comment.