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

docs: readme trim and getting started #223

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Conversation

AndyTWF
Copy link
Contributor

@AndyTWF AndyTWF commented Feb 20, 2025

This change incorporates the following changes:

  • It trims the README to remove extensive documentation. We now consider the docs site to be the source of truth for our documentation (outside of inline documentation).
  • It adds a getting started guide, which is intended to guide users in their first steps of using Chat, up to sending their first message. This will be replicated to the website in due course.

CHA-841
CHA-819

I'd recommend reviewing by viewing the rendered markdown in GitHub - the diff is quite large!

Summary by CodeRabbit

  • Documentation
    • Reorganized the onboarding guide for a smoother user introduction.
    • Renamed sections and updated examples to focus on client initialization, chat room creation, and messaging.
    • Streamlined instructions to emphasize practical usage over detailed connection management.

We consider the docs site to be the source of truth for our documentation (outside of inline documentation). This change follows the
steps already taken by JS to remove the extra information from the README.
Copy link

coderabbitai bot commented Feb 20, 2025

Walkthrough

The pull request updates the README.md for the Ably Chat SDK by restructuring the content to improve onboarding for new users. The "Connections" section has been renamed to "Getting Started," with detailed connection management instructions removed. Instead, the documentation now focuses on initializing the Ably Chat client, creating a chat room, sending a message, and concluding with a congratulatory note. No changes were made to exported or public entity declarations.

Changes

File Summary
README.md Renamed "Connections" to "Getting Started"; removed detailed connection management instructions; updated code snippets for client initialization, room creation, and message sending; omitted room management (attach/detach) details.

Sequence Diagram(s)

sequenceDiagram
    participant U as User
    participant D as Documentation
    participant S as Ably Chat SDK

    U->>D: Reads "Getting Started" guide
    D->>S: Instructs client initialization
    U->>S: Creates chat room
    U->>S: Sends a message
    S-->>U: Returns success with a congratulatory message
Loading

Possibly related PRs

  • Minor readme fixes. #191: The changes in the main PR focus on restructuring the onboarding process and simplifying the tutorial in the README.md, while the retrieved PR makes specific updates to method calls and subscription handling in the same file, indicating a direct relationship in terms of documentation updates.

Suggested reviewers

  • ttypic
  • maratal
  • lawrence-forooghian

Poem

I'm a rabbit hopping through the docs so bright,
Guiding users with my gentle light.
From a simple start to a message sent with cheer,
My code-filled journey brings delight near.
Celebrate these changes with a twitch of my ear! 🐇✨


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>, please review it.
    • 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 gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @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 using 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 generate docstrings to generate docstrings for this PR. (Beta)
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration 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.

@github-actions github-actions bot temporarily deployed to staging/pull/223/AblyChat February 20, 2025 15:21 Inactive
@AndyTWF AndyTWF marked this pull request as ready for review February 20, 2025 15:21
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: 0

🧹 Nitpick comments (3)
README.md (3)

88-89: Refine introductory guidance text.
The phrase "First of all," is somewhat redundant. Consider simplifying the sentence to improve clarity. For example, you might change it to:

-First of all, start by creating a Swift project and installing the Chat SDK using the instructions described above. Next, replace the contents of your `main.swift` file with
+Start by creating a Swift project and installing the Chat SDK using the instructions described above. Then, replace the contents of your `main.swift` file with

91-145: Ensure the code snippet clarity and context.
The provided Swift code example is well-organized and demonstrates key concepts like initializing the Ably Chat client, attaching to a room, and sending a message. A couple of suggestions:

  • Consider adding a brief inline comment about the use of Task {} for asynchronous operations, as this may need highlighting for developers new to Swift concurrency.
  • It might be useful to note that error handling is simplified for this example and that production code should include robust error management.

147-163: Specify a language for the console output fenced code block.
For better clarity and to adhere to markdown linting guidelines, add a language identifier (e.g., text or console) to the fenced code block showing the expected terminal output. For example:

-```
+```text
🧰 Tools
🪛 markdownlint-cli2 (0.17.2)

155-155: Fenced code blocks should have a language specified
null

(MD040, fenced-code-language)

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between b8937a9 and cb9d9a2.

📒 Files selected for processing (1)
  • README.md (1 hunks)
🧰 Additional context used
🪛 LanguageTool
README.md

[style] ~87-~87: Often, this adverbial phrase is redundant. Consider using an alternative.
Context: ...at client and sent your first message. First of all, start by creating a Swift project and ...

(FIRST_OF_ALL)

🪛 markdownlint-cli2 (0.17.2)
README.md

155-155: Fenced code blocks should have a language specified
null

(MD040, fenced-code-language)

⏰ Context from checks skipped due to timeout of 90000ms (6)
  • GitHub Check: Example app, tvOS (Xcode 16)
  • GitHub Check: Example app, iOS (Xcode 16)
  • GitHub Check: Example app, macOS (Xcode 16)
  • GitHub Check: Xcode, tvOS (Xcode 16)
  • GitHub Check: Xcode, iOS (Xcode 16)
  • GitHub Check: Xcode, macOS (Xcode 16)
🔇 Additional comments (3)
README.md (3)

84-84: Clarify the "Getting Started" section header.
The addition of the "## Getting Started" section clearly signals the new focus of this guide. This makes the document structure more intuitive for newcomers.


86-86: Clear tutorial objective stated.
Stating that the tutorial will help users initialize the client and send their first message is concise and effective.


165-166: Concluding message is concise and encouraging.
The congratulatory note effectively wraps up the tutorial, reinforcing user success.

This change includes a basic getting-started guide intended to guide users through their first
steps with Ably Chat to sending their first message.

This will be replicated in the website dashboard in time.
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: 0

🧹 Nitpick comments (2)
README.md (2)

84-89: Clear Introduction in the “Getting Started” Section with a Minor Nitpick
The new “Getting Started” section provides a concise and user-friendly introduction to the SDK. However, the phrase “First of all” (line 86) comes across as redundant. Removing or rephrasing this phrase could tighten the prose and improve clarity.

🧰 Tools
🪛 LanguageTool

[style] ~87-~87: Often, this adverbial phrase is redundant. Consider using an alternative.
Context: ...at client and sent your first message. First of all, start by creating a Swift project and ...

(FIRST_OF_ALL)


147-163: Script Execution Instructions and Expected Output Formatting
The “Now run your script” section and the subsequent expected output block are nicely laid out, offering an end-to-end walkthrough. To adhere to markdownlint guidelines (MD040), specify a language identifier for the expected output fenced code block—for example, use “plaintext” instead of a plain “” for the block starting at line 155.

🧰 Tools
🪛 markdownlint-cli2 (0.17.2)

155-155: Fenced code blocks should have a language specified
null

(MD040, fenced-code-language)

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between cb9d9a2 and 20d5a76.

📒 Files selected for processing (1)
  • README.md (1 hunks)
🧰 Additional context used
🪛 LanguageTool
README.md

[style] ~87-~87: Often, this adverbial phrase is redundant. Consider using an alternative.
Context: ...at client and sent your first message. First of all, start by creating a Swift project and ...

(FIRST_OF_ALL)

🪛 markdownlint-cli2 (0.17.2)
README.md

155-155: Fenced code blocks should have a language specified
null

(MD040, fenced-code-language)

⏰ Context from checks skipped due to timeout of 90000ms (10)
  • GitHub Check: Example app, tvOS (Xcode 16)
  • GitHub Check: Example app, iOS (Xcode 16)
  • GitHub Check: Xcode, release configuration, tvOS (Xcode 16)
  • GitHub Check: Example app, macOS (Xcode 16)
  • GitHub Check: Xcode, release configuration, iOS (Xcode 16)
  • GitHub Check: Xcode, release configuration, macOS (Xcode 16)
  • GitHub Check: Xcode, tvOS (Xcode 16)
  • GitHub Check: Xcode, iOS (Xcode 16)
  • GitHub Check: SPM (Xcode 16)
  • GitHub Check: Xcode, macOS (Xcode 16)
🔇 Additional comments (2)
README.md (2)

91-145: Well-Structured Code Snippet Demonstrating Modern Swift Concurrency
The code sample is clear and effectively demonstrates key steps such as initializing the Ably Chat client, subscribing to connection state changes, attaching to a chat room, and sending a message using Swift’s async/await constructs. As an optional improvement, consider adding a brief inline comment explaining the async/await usage (for example, noting that Task { ... } is used to handle asynchronous events) to help developers who may be newer to Swift concurrency.


1-3: Overall Documentation Enhancement
The trimmed README and the added Getting Started guide are well aligned with the PR objectives. These changes streamline the documentation, making it clear that the online documentation site is the definitive reference while also providing a practical introductory guide for new users.

Also applies to: 164-179

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