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

Update documentation for android v0.4.24 #139

Merged
merged 1 commit into from
Jun 14, 2024
Merged

Update documentation for android v0.4.24 #139

merged 1 commit into from
Jun 14, 2024

Conversation

7hong13
Copy link
Contributor

@7hong13 7hong13 commented Jun 14, 2024

What this PR does / why we need it?

Any background context you want to provide?

What are the relevant tickets?

Fixes #

Checklist

  • Added relevant tests or not required
  • Didn't break anything

Summary by CodeRabbit

  • New Features

    • Introduced enhanced synchronization modes: RealtimePushOnly and RealtimeSyncOff for more granular control.
    • Added client.changeSyncMode(doc, syncMode) to allow changing synchronization modes dynamically.
    • Enhanced event handling for better clarity on local and remote changes, including a new Snapshot event.
  • Documentation

    • Updated documentation to reflect changes in synchronization modes and event handling.
  • Chores

    • Updated Android SDK version in environment settings from 0.4.16 to 0.4.24.

@7hong13 7hong13 added the documentation 📔 Improvements or additions to documentation label Jun 14, 2024
@7hong13 7hong13 requested a review from hackerwins June 14, 2024 09:38
@7hong13 7hong13 self-assigned this Jun 14, 2024
Copy link

coderabbitai bot commented Jun 14, 2024

Walkthrough

The recent update focuses on enhancing both the environment setup and documentation for an Android SDK. The .env file has been updated to support a new version of NEXT_PUBLIC_YORKIE_ANDROID_VERSION. Notably, the documentation for the Android SDK has been refined to provide better control over synchronization modes and improved handling of subscription events.

Changes

File Change Summary
.env Updated NEXT_PUBLIC_YORKIE_ANDROID_VERSION from '0.4.16' to '0.4.24'.
docs/android-sdk.mdx Refined syncMode parameter, introduced new sync modes, improved event handling and subscription.

Sequence Diagram(s)

sequenceDiagram
    participant Developer
    participant SDK
    participant DocumentSystem

    Developer->>SDK: Initialize with syncMode
    SDK->>DocumentSystem: Attach document with specified syncMode
    DocumentSystem-->>SDK: Acknowledge attachment

    Developer->>SDK: changeSyncMode(newMode)
    SDK->>DocumentSystem: Update syncMode to newMode
    DocumentSystem-->>SDK: Confirm syncMode change

    Note right of SDK: Handles real-time events and subscriptions
Loading

Poem

In the world of sync, a new mode's song,
Yorkie's version soars ahead, not wrong.
Events now dance, both near and far,
With snapshots shining like a star.
Control and clarity, all in stride,
Our code and docs, renewed with pride. 🌟


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

Share
Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (invoked as PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Member

@hackerwins hackerwins left a comment

Choose a reason for hiding this comment

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

Thanks for your contribution.

@hackerwins hackerwins merged commit d495243 into main Jun 14, 2024
2 checks passed
@hackerwins hackerwins deleted the android-sdk branch June 14, 2024 09:43
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 4

Outside diff range and nitpick comments (1)
docs/android-sdk.mdx (1)

Line range hint 34-34: Address typographical issues in the documentation.

The phrase "client based events" should be hyphenated to "client-based events" for better readability and correctness.

Tools
LanguageTool

[uncategorized] ~81-~81: Loose punctuation mark. (UNLIKELY_OPENING_PUNCTUATION)
Context: ...rgument is options. - initialPresence: Sets the initial presence of the client...


[style] ~97-~97: Consider shortening or rephrasing this to strengthen your wording. (MAKE_CHANGES)
Context: ...Document.update()` method allows you to make changes to the state of the current user's presenc...

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 0981287 and ba2b78c.

Files selected for processing (2)
  • .env (1 hunks)
  • docs/android-sdk.mdx (6 hunks)
Files skipped from review due to trivial changes (1)
  • .env
Additional context used
LanguageTool
docs/android-sdk.mdx

[uncategorized] ~34-~34: This expression is usually spelled with a hyphen. (BASED_HYPHEN)
Context: ...can use client.events to subscribe to client based events, such as status, `streamConnec...


[uncategorized] ~81-~81: Loose punctuation mark. (UNLIKELY_OPENING_PUNCTUATION)
Context: ...rgument is options. - initialPresence: Sets the initial presence of the client...


[style] ~97-~97: Consider shortening or rephrasing this to strengthen your wording. (MAKE_CHANGES)
Context: ...Document.update()` method allows you to make changes to the state of the current user's presenc...


[uncategorized] ~153-~153: Loose punctuation mark. (UNLIKELY_OPENING_PUNCTUATION)
Context: ...erIsInstance<PresenceChange.MyPresnece>: Initialized, PresenceChanged-doc...


[uncategorized] ~192-~192: Use a comma before ‘and’ if it connects two independent clauses (unless they are closely connected and short). (COMMA_COMPOUND_SENTENCE)
Context: ...is modified, change events are triggered and we can subscribe to these events using ...


[grammar] ~235-~235: It appears that a hyphen is missing in the plural noun “to-dos”? (TO_DO_HYPHEN)
Context: ...ts(path)with a path argument, such as$.todos, where the $` sign indicates the root...


[uncategorized] ~258-~258: Loose punctuation mark. (UNLIKELY_OPENING_PUNCTUATION)
Context: ...e server. - SyncMode.RealtimePushOnly: Only - SyncMode.RealtimeSyncOff: Ch...


[uncategorized] ~260-~260: Loose punctuation mark. (UNLIKELY_OPENING_PUNCTUATION)
Context: ...ly: Only - SyncMode.RealtimeSyncOff`: Changes are not synchronized, but the w...


[uncategorized] ~262-~262: Loose punctuation mark. (UNLIKELY_OPENING_PUNCTUATION)
Context: ...eam remains active. - SyncMode.Manual: Synchronization no longer occurs in rea...


[style] ~293-~293: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym. (ENGLISH_WORD_REPEAT_BEGINNING_RULE)
Context: ...s such as JsonObject and JsonArray. Custom CRDT types can be created in the callba...

Additional comments not posted (2)
docs/android-sdk.mdx (2)

200-216: Detail the operations within document change events.

The documentation now includes detailed explanations of operations within document change events (LocalChange, RemoteChange, Snapshot). This enhancement will significantly aid developers in understanding and handling these events more effectively.


253-276: Validate the implementation of new synchronization modes.

This verification is necessary to ensure that the new synchronization modes are implemented correctly and are being used as intended in the SDK.

Tools
LanguageTool

[uncategorized] ~258-~258: Loose punctuation mark. (UNLIKELY_OPENING_PUNCTUATION)
Context: ...e server. - SyncMode.RealtimePushOnly: Only - SyncMode.RealtimeSyncOff: Ch...


[uncategorized] ~260-~260: Loose punctuation mark. (UNLIKELY_OPENING_PUNCTUATION)
Context: ...ly: Only - SyncMode.RealtimeSyncOff`: Changes are not synchronized, but the w...


[uncategorized] ~262-~262: Loose punctuation mark. (UNLIKELY_OPENING_PUNCTUATION)
Context: ...eam remains active. - SyncMode.Manual: Synchronization no longer occurs in rea...

docs/android-sdk.mdx Show resolved Hide resolved
docs/android-sdk.mdx Show resolved Hide resolved
docs/android-sdk.mdx Show resolved Hide resolved
docs/android-sdk.mdx Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation 📔 Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants