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

[SDK-4009] Refactoring presence #1870

Merged
merged 15 commits into from
Mar 14, 2024
Merged

[SDK-4009] Refactoring presence #1870

merged 15 commits into from
Mar 14, 2024

Conversation

maratal
Copy link
Collaborator

@maratal maratal commented Feb 8, 2024

Closes #1875

See commit messages on what goes where.

@github-actions github-actions bot temporarily deployed to staging/pull/1870/features February 8, 2024 22:11 Inactive
@github-actions github-actions bot temporarily deployed to staging/pull/1870/jazzydoc February 8, 2024 22:17 Inactive
@github-actions github-actions bot temporarily deployed to staging/pull/1870/features February 9, 2024 01:58 Inactive
@github-actions github-actions bot temporarily deployed to staging/pull/1870/jazzydoc February 9, 2024 02:02 Inactive
@github-actions github-actions bot temporarily deployed to staging/pull/1870/features February 9, 2024 23:21 Inactive
@github-actions github-actions bot temporarily deployed to staging/pull/1870/jazzydoc February 9, 2024 23:26 Inactive
@maratal maratal marked this pull request as ready for review February 12, 2024 10:36
@maratal maratal changed the title Refactoring presence [SDK-4009] Refactoring presence Feb 12, 2024
Copy link
Contributor

@sacOO7 sacOO7 left a comment

Choose a reason for hiding this comment

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

I feel most of the presence specific code is still defined under Source/ARTRealtimeChannel.m. It should be moved under Source/ARTRealtimePresence.m. Some of those methods are sync, onsync and onPresence. Also, part of the code under setAttached should be moved to Source/ARTRealtimePresence.m as an individual method.

Can you please refer to https://github.com/ably/ably-go/blob/main/ably/realtime_channel.go file to check what should be defined under ARTRealtimeChannel.m file

Copy link
Collaborator

@lawrence-forooghian lawrence-forooghian left a comment

Choose a reason for hiding this comment

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

These changes alone don't seem to resolve #1848; the PR doesn’t "re-enable presence tests", nor “go through the current presence implementation and check if it's compatible with spec” (although I'm not really sure what @sacOO7 had in mind when he wrote the latter; was there some reason to believe that we are not conforming to the spec)?

Source/ARTRealtimePresence.m Outdated Show resolved Hide resolved
Test/Tests/RealtimeClientPresenceTests.swift Outdated Show resolved Hide resolved
Source/PrivateHeaders/Ably/ARTRealtimePresence+Private.h Outdated Show resolved Hide resolved
Source/ARTRealtimeChannel.m Show resolved Hide resolved
@maratal maratal force-pushed the fix/1848-refactoring-presence branch from ac1152d to 3bdd244 Compare February 14, 2024 17:55
@github-actions github-actions bot temporarily deployed to staging/pull/1870/features February 14, 2024 18:02 Inactive
@github-actions github-actions bot temporarily deployed to staging/pull/1870/jazzydoc February 14, 2024 18:08 Inactive
@maratal
Copy link
Collaborator Author

maratal commented Feb 15, 2024

These changes alone don't seem to resolve #1848; the PR doesn’t "re-enable presence tests", nor “go through the current presence implementation and check if it's compatible with spec” (although I'm not really sure what @sacOO7 had in mind when he wrote the latter; was there some reason to believe that we are not conforming to the spec)?

I've changed the issue to #1875.

@lawrence-forooghian
Copy link
Collaborator

Changes look good to me — will let @sacOO7 say what other changes he'd like to see as part of this refactor.

@maratal
Copy link
Collaborator Author

maratal commented Feb 15, 2024

Changes look good to me — will let @sacOO7 say what other changes he'd like to see as part of this refactor.

I'm working on it - move all code with self.presence... into presence object.

@maratal maratal force-pushed the fix/1848-refactoring-presence branch from 240f979 to dcdd823 Compare February 15, 2024 21:01
@maratal maratal changed the base branch from feature/no-connection-serial to transition-refactoring February 15, 2024 21:01
@maratal maratal force-pushed the fix/1848-refactoring-presence branch from dcdd823 to ab104bc Compare February 15, 2024 21:29
@github-actions github-actions bot temporarily deployed to staging/pull/1870/features February 15, 2024 21:29 Inactive
@github-actions github-actions bot temporarily deployed to staging/pull/1870/jazzydoc February 15, 2024 21:34 Inactive
@github-actions github-actions bot temporarily deployed to staging/pull/1870/features February 17, 2024 14:46 Inactive
@github-actions github-actions bot temporarily deployed to staging/pull/1870/jazzydoc February 17, 2024 14:53 Inactive
Source/ARTRealtimeChannel.m Show resolved Hide resolved
Source/ARTRealtimeChannel.m Outdated Show resolved Hide resolved
Source/ARTRealtimeChannel.m Show resolved Hide resolved
Source/ARTRealtimePresence.m Outdated Show resolved Hide resolved
Source/ARTRealtimePresence.m Show resolved Hide resolved
@maratal maratal force-pushed the transition-refactoring branch 2 times, most recently from 77cc141 to db461a8 Compare February 23, 2024 01:25
Base automatically changed from transition-refactoring to main February 23, 2024 02:02
@github-actions github-actions bot temporarily deployed to staging/pull/1870/features March 9, 2024 23:28 Inactive
[SDK-4015] Renamed presence map's `localMembers` to `internalMembers`
@github-actions github-actions bot temporarily deployed to staging/pull/1870/features March 9, 2024 23:29 Inactive
@github-actions github-actions bot temporarily deployed to staging/pull/1870/jazzydoc March 9, 2024 23:33 Inactive
@github-actions github-actions bot temporarily deployed to staging/pull/1870/features March 10, 2024 00:04 Inactive
@github-actions github-actions bot temporarily deployed to staging/pull/1870/jazzydoc March 10, 2024 00:08 Inactive
@maratal maratal force-pushed the fix/1848-refactoring-presence branch from e365faa to b301249 Compare March 10, 2024 15:02
@github-actions github-actions bot temporarily deployed to staging/pull/1870/features March 10, 2024 15:03 Inactive
@github-actions github-actions bot temporarily deployed to staging/pull/1870/jazzydoc March 10, 2024 15:06 Inactive
Copy link
Contributor

@sacOO7 sacOO7 left a comment

Choose a reason for hiding this comment

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

Few more refactorings to be done

Source/ARTRealtimePresence.m Outdated Show resolved Hide resolved
Source/ARTRealtimePresence.m Outdated Show resolved Hide resolved
Source/ARTRealtimePresence.m Outdated Show resolved Hide resolved
Source/ARTRealtimePresence.m Outdated Show resolved Hide resolved
Source/ARTRealtimePresence.m Outdated Show resolved Hide resolved
@github-actions github-actions bot temporarily deployed to staging/pull/1870/features March 11, 2024 16:07 Inactive
@github-actions github-actions bot temporarily deployed to staging/pull/1870/jazzydoc March 11, 2024 16:11 Inactive
…e-tests

[ECO-4228] Re-enable skipped presence tests
@github-actions github-actions bot temporarily deployed to staging/pull/1870/features March 13, 2024 21:06 Inactive
@github-actions github-actions bot temporarily deployed to staging/pull/1870/jazzydoc March 13, 2024 21:10 Inactive
Source/ARTRealtimePresence.m Outdated Show resolved Hide resolved
Copy link
Contributor

@sacOO7 sacOO7 left a comment

Choose a reason for hiding this comment

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

LGTM

@maratal maratal merged commit ecec03d into main Mar 14, 2024
7 checks passed
@maratal maratal deleted the fix/1848-refactoring-presence branch March 14, 2024 16:39
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.

Refactor presence implementation
3 participants