Skip to content

Commit

Permalink
Tweak some references to "namespace"
Browse files Browse the repository at this point in the history
  • Loading branch information
lawrence-forooghian committed Sep 21, 2023
1 parent 74c0d03 commit bb389a3
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src/Cursors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ const CURSORS_CHANNEL_TAG = '::$cursors';
*
* Live cursors build upon the functionality of the Pub/Sub Channels [presence](http://ably.com/docs/presence-occupancy/presence) feature.
*
* Due to the high frequency at which updates are streamed for cursor movements, live cursors utilizes its own [channel](http://ably.com/docs/channels). The other features of the Spaces SDK, such as avatar stacks, member locations and component locking all share a single channel. For this same reason, cursor position updates are not included in the [space state](/spaces/space) and may only be subscribed to on the `cursors` namespace.
* Due to the high frequency at which updates are streamed for cursor movements, live cursors utilizes its own [channel](http://ably.com/docs/channels). The other features of the Spaces SDK, such as avatar stacks, member locations and component locking all share a single channel. For this same reason, cursor position updates are not included in the [space state](/spaces/space) and may only be subscribed to via the {@link Space.cursors | `cursors` } property.
*
* The channel is only created when a member calls `space.cursors.set()`. The live cursors channel object can be accessed through `space.cursors.channel`. To monitor the [underlying state of the cursors channel](http://ably.com/docs/channels#states), the channel object can be accessed through `space.cursors.channel`.
*
Expand Down
2 changes: 1 addition & 1 deletion src/Locations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ export default class Locations extends EventEmitter<LocationsEventMap> {

/**
* <!-- BEGIN WEBSITE DOCUMENTATION (https://github.com/ably/docs/blob/14acea6dee7bf3872a3d32d43732f934cbe93a7d/content/spaces/locations.textile?plain=1#L29-L91) -->
* Subscribe to location events by registering a listener. Location events are emitted whenever a member changes location by calling {@link set}. Use the `subscribe()` method on the `locations` namespace of the space to receive updates.
* Subscribe to location events by registering a listener. Location events are emitted whenever a member changes location by calling {@link set}.
*
* All location changes are {@link LocationsEventMap.update | `update`} events. When a location update is received, clear the highlight from the UI component of the member’s {@link LocationsEvents.UpdateEvent.previousLocation | `previousLocation`} and add it to {@link LocationsEvents.UpdateEvent.currentLocation | `currentLocation`}.
*
Expand Down
2 changes: 1 addition & 1 deletion src/Locks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -413,7 +413,7 @@ export default class Locks extends EventEmitter<LocksEventMap> {

/**
* <!-- BEGIN WEBSITE DOCUMENTATION (https://github.com/ably/docs/blob/14acea6dee7bf3872a3d32d43732f934cbe93a7d/content/spaces/locking.textile?plain=1#L92-L151) -->
* Subscribe to lock events by registering a listener. Lock events are emitted whenever the [lock state](#states) transitions into `locked` or `unlocked`. Use the `subscribe()` method on the `locks` namespace of the space to receive updates.
* Subscribe to lock events by registering a listener. Lock events are emitted whenever the [lock state](#states) transitions into `locked` or `unlocked`.
*
* All lock events are `update` events. When a lock event is received, UI components can be updated to add and remove visual indications of which member is locking them, as well as enabling and disabling the ability for other members to edit them.
*
Expand Down
4 changes: 2 additions & 2 deletions src/Members.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export interface MembersEventMap extends EventMap {
* <!-- BEGIN WEBSITE DOCUMENTATION (https://github.com/ably/docs/blob/14acea6dee7bf3872a3d32d43732f934cbe93a7d/content/spaces/avatar.textile?plain=1#L9-L24) -->
* Avatar stacks are the most common way of showing the online status of members in an application by displaying an avatar for each member. Events are emitted whenever a member enters or leaves a space, or updates their profile data. Additional information can also be provided, such as a profile picture and email address.
*
* Subscribe to the `space.members` namespace in order to keep your avatar stack updated in realtime.
* Subscribe to the space’s { @link Space.members | `members` } property in order to keep your avatar stack updated in realtime.
*
* ## Event types
*
Expand All @@ -43,7 +43,7 @@ export interface MembersEventMap extends EventMap {
*
* > **Note**
* >
* > Members [enter](/spaces/space#enter), [leave](/spaces/space#leave), and [update](/spaces/space#update-profile) a [space](/spaces/space) directly. The `members` namespace is used to subscribe to these updates.
* > Members [enter](/spaces/space#enter), [leave](/spaces/space#leave), and [update](/spaces/space#update-profile) a [space](/spaces/space) directly. The space’s { @link Space.members | `members` } property is used to subscribe to these updates.
*
* <!-- END WEBSITE DOCUMENTATION -->
*
Expand Down
6 changes: 3 additions & 3 deletions src/Space.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,9 @@ export interface SpaceEventMap extends EventMap {
* - [Live cursors](/spaces/cursors)
* - [Component locking](/spaces/locking)
*
* The `space` namespace consists of a state object that represents the realtime status of all members in a given virtual space. This includes a list of which members are currently online or have recently left and each member’s location within the application. The position of members’ cursors are excluded from the space state due to their high frequency of updates. In the beta release, which UI components members have locked are also excluded from the space state.
* A `Space` instance consists of a state object that represents the realtime status of all members in a given virtual space. This includes a list of which members are currently online or have recently left and each member’s location within the application. The position of members’ cursors are excluded from the space state due to their high frequency of updates. In the beta release, which UI components members have locked are also excluded from the space state.
*
* Space state can be {@link subscribe | subscribed} to in the `space` namespace. Alternatively, subscription listeners can be registered for individual features, such as avatar stack events and member location updates. These individual subscription listeners are intended to provide flexibility when implementing collaborative features. Individual listeners are client-side filtered events, so irrespective of whether you choose to subscribe to the space state or individual listeners, each event only counts as a single message.
* Space state can be {@link subscribe | subscribed} to by using a `Space` object. Alternatively, subscription listeners can be registered for individual features, such as avatar stack events and member location updates. These individual subscription listeners are intended to provide flexibility when implementing collaborative features. Individual listeners are client-side filtered events, so irrespective of whether you choose to subscribe to the space state or individual listeners, each event only counts as a single message.
*
* To subscribe to any events in a space, you first need to create or retrieve a space.
*
Expand Down Expand Up @@ -385,7 +385,7 @@ class Space extends EventEmitter<SpaceEventMap> {
*
* > **Note**
* >
* > [Avatar stacks](/spaces/members) and [member location](/spaces/locations) events can be subscribed to on their individual namespaces; `space.members` and `space.locations`. These events are filtered versions of space state events. Only a single [message](http://ably.com/docs/channels/messages) is published per event by Ably, irrespective of whether you register listeners for space state or individual namespaces. If you register listeners for both, it is still only a single message.
* > [Avatar stacks](/spaces/members) and [member location](/spaces/locations) events can be subscribed to using the space’s {@link members | `members` } and {@link locations | `locations` } properties. These events are filtered versions of space state events. Only a single [message](http://ably.com/docs/channels/messages) is published per event by Ably, irrespective of whether you register listeners for space state or individual namespaces. If you register listeners for both, it is still only a single message.
* >
* > The key difference between the subscribing to space state or to individual feature events, is that space state events return the current state of the space as an array of all members in each event payload. Individual member and location event payloads only include the relevant data for the member that triggered the event.
*
Expand Down

0 comments on commit bb389a3

Please sign in to comment.