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

Rename RoomState to ConnectionState #232

Merged
merged 2 commits into from
May 17, 2022
Merged

Conversation

lukasIO
Copy link
Contributor

@lukasIO lukasIO commented May 16, 2022

ConnectionState is more descriptive about what kind of state it actually holds and we already have a RoomState type in the livekit-react repo, so this additionally avoids confusion.
Old name is just deprecated for now and not yet removed.

@lukasIO lukasIO requested a review from davidzhao May 16, 2022 17:15
/**
* @deprecated StateChanged has been renamed to ConnectionStateChanged
*/
StateChanged = 'connectionStateChanged',
Copy link
Member

Choose a reason for hiding this comment

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

with 1.0 change, we could remove this? since it won't be fired anywhere.

Copy link
Contributor Author

@lukasIO lukasIO May 16, 2022

Choose a reason for hiding this comment

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

only thing to keep in mind is that if we don't release another version before 1.0 (likely) it will simply break people's apps if they are currently using RoomEvent.StateChanged. Because both events (StateChanged and ConnectionStateChanged) share the same event identifier connectionStateChanged people could still use StateChanged right now and receive events.

But I think it might be ok to remove it as long as we explicitly mention the fix for it in the release notes of 1.0.

Copy link
Member

Choose a reason for hiding this comment

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

right.. you mean their existing app would fail to compile if they were using this. I guess it's fine if we left it in there until 1.1.

@lukasIO lukasIO merged commit 0ecbfe2 into main May 17, 2022
@lukasIO lukasIO deleted the lukas/change-roomstate-naming branch May 17, 2022 07:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants