Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Documentation tweaks post-API updates #142

Merged
merged 1 commit into from
Aug 31, 2023

Conversation

dpiatek
Copy link
Contributor

@dpiatek dpiatek commented Aug 29, 2023

Tweaks to our repo documentation post API updates.

@@ -107,7 +107,7 @@ space.subscribe('update', (spaceState) => {
});

// Enter a space, publishing an update event, including optional profile data
space.enter({
await space.enter({
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've added these everywhere in docs to make it clear these are async operations and can be waited upon

@@ -136,7 +136,7 @@ The following is an example event payload received by subscribers when a user en

## Space members

The `members` namespace within a Space is a client-side filtered listener optimized for building avatar stacks. Subscribe to members entering, leaving, being removed from the Space (after a timeout) or updating their profile information.
The `members` namespace contains methods dedicated to building avatar stacks. Subscribe to members entering, leaving, being removed from the Space (after a timeout) or updating their profile information.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wasn't a big fan of the wording here - I think it's not accurate and could lead to confusion (a listener is for an example a function passed to an event listener; that's not what the namespace is, just the subscribe method. I think also saying client-side filtered is quite unspecific, we should be more specific or leave out the implementation detail here, like I did above)


```ts
type getSelf = () => Promise<SpaceMember | undefined>;
type getSelf = () => Promise<SpaceMember | null>;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I made a separate PR to make sure we always return null from these get* methods #141

@@ -355,7 +355,7 @@ space.locations.unsubscribe('update');
Get location for self.

```ts
type getSelf = () => Promise<Location | undefined>;
type getSelf = () => Promise<Location>;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Location, as defined in this file, already includes null in it's type definition

@dpiatek dpiatek merged commit bde0448 into main Aug 31, 2023
5 checks passed
@dpiatek dpiatek deleted the api-updates-documentation-review branch August 31, 2023 14:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants