Skip to content

Conversation

@adityaoberai
Copy link
Member

@adityaoberai adityaoberai commented Jan 19, 2026

What does this PR do?

Add docs page for Screenshots API

Test Plan

Visit /docs/products/avatars/screenshots

Related PRs and Issues

appwrite/appwrite#10675

Have you read the Contributing Guidelines on issues?

Yes

Summary by CodeRabbit

  • Documentation
    • Added a new "Screenshots" guide under Avatars explaining how to capture webpage screenshots with customizable viewport, theme, browser settings, geolocation simulation, wait-time, and permissions.
    • Included a comprehensive parameters table, use cases, and multi-language code samples (web, Flutter, Apple, Android, React Native).
    • Added a navigation entry and documentation card linking to the new Screenshots guide.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 19, 2026

Warning

Rate limit exceeded

@adityaoberai has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 10 minutes and 14 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

📥 Commits

Reviewing files that changed from the base of the PR and between e560ce4 and fb2f12d.

📒 Files selected for processing (1)
  • src/routes/docs/products/avatars/screenshots/+page.markdoc

Walkthrough

Imported isNewUntil in the Avatars docs layout and added a new navigation item labeled "Screenshots" under Concepts > Favicons with its new-status driven by isNewUntil('28 Feb 2026'). Added a docs card linking to /docs/products/avatars/screenshots. Created a new markdoc page src/routes/docs/products/avatars/screenshots/+page.markdoc documenting Avatars.getScreenshot, including parameters, viewport/browser/geolocation options, permissions, wait-time, use cases, and multi-language code samples.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'Add screenshots API docs' directly and clearly describes the main change: adding documentation for the Screenshots API, which is fully reflected in the changeset across three files.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Contributor

@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: 1

🤖 Fix all issues with AI agents
In `@src/routes/docs/products/avatars/screenshots/`+page.markdoc:
- Line 257: Replace the incorrect enum name Timezone.EuropeParisAppwrite with
the correct Timezone.EuropeParis on the line that currently sets timezone:
Timezone.EuropeParisAppwrite; update that single occurrence so it matches the
other PascalCase timezone enums (e.g., Timezone.EuropeLondon,
Timezone.AsiaTokyo) and preserves the existing casing and punctuation.
🧹 Nitpick comments (2)
src/routes/docs/products/avatars/screenshots/+page.markdoc (2)

106-106: Inconsistent boolean parameter documentation.

The fullpage and touch parameters are described using 1/0 values, but the code examples throughout the document use true/false (e.g., fullpage: true on line 150, touch: true on line 269). Update the descriptions to use true/false for consistency with the examples.

📝 Suggested fix
-| fullpage | boolean | Capture the full scrollable page (`1`) or only the viewport (`0`). Defaults to `false` if not provided. |
+| fullpage | boolean | Capture the full scrollable page (`true`) or only the viewport (`false`). Defaults to `false` if not provided. |
-| touch | boolean | Enable touch device support (`1`) or disable it (`0`). Defaults to `false` if not provided. |
+| touch | boolean | Enable touch device support (`true`) or disable it (`false`). Defaults to `false` if not provided. |

Also applies to: 112-112


124-237: Missing React Native example in viewport customization section.

The initial code example (lines 76-90) includes client-react-native, but this section omits it. Consider adding React Native examples for consistency, or document that subsequent examples focus on a subset of SDKs.

| scale | float | The device pixel ratio for the screenshot. Accepts values between `0.1-3` for different DPI settings. Defaults to `1` if not provided. |
| theme | string | The browser color scheme theme. Accepts: `light` or `dark`. Defaults to `light` if not provided. |
| userAgent | string | A custom user agent string for the browser request. Defaults to browser default if not provided. |
| fullpage | boolean | Capture the full scrollable page (`1`) or only the viewport (`0`). Defaults to `false` if not provided. |
Copy link
Member

Choose a reason for hiding this comment

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

Should we stick to true and false instead of 1 and 0

| latitude | float | Geolocation latitude for the screenshot. Accepts values between `-90` to `90`. Defaults to `0` if not provided. |
| longitude | float | Geolocation longitude for the screenshot. Accepts values between `-180` to `180`. Defaults to `0` if not provided. |
| accuracy | float | Geolocation accuracy in meters. Accepts values between `0-100000`. Defaults to `0` if not provided. |
| touch | boolean | Enable touch device support (`1`) or disable it (`0`). Defaults to `false` if not provided. |
Copy link
Member

Choose a reason for hiding this comment

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

Same here

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.

4 participants