Skip to content

Conversation

@joalves
Copy link
Collaborator

@joalves joalves commented Jan 30, 2026

Summary

  • Add Dart SDK documentation with simplified initialization API
  • Add Rust SDK documentation with builder pattern support
  • Add Liquid (Shopify) SDK documentation with server-side rendering guidance
  • Update Flutter SDK to use new simplified API (matching Dart)
  • Fix naming inconsistencies: "Absmartly" → "ABsmartly" across Ruby and React examples

Changes

New SDK Documentation

  • Dart: Standalone Dart SDK with simplified .create() API and advanced manual configuration option
  • Rust: Rust SDK with SDKConfig::new() and optional builder pattern for advanced use cases
  • Liquid: Shopify Liquid template integration with client-side SDK and server-side rendering support

Updated Documentation

  • Flutter: Migrated to simplified API matching new Dart SDK pattern
  • React: Fixed component naming from <ABSmartly> to <ABsmartly>
  • Ruby: Fixed class naming from Absmartly to ABsmartly

Test Plan

  • Verify all code examples are syntactically correct
  • Confirm documentation builds without errors
  • Validate all SDK links and references are accurate
  • Check that naming is consistent across all SDK examples

Summary by CodeRabbit

Release Notes

  • Documentation

    • Added comprehensive initialization guides for Dart, Rust, and Liquid SDKs, including code examples and configuration options.
    • Updated Flutter and Ruby SDK initialization documentation with simplified and streamlined API usage patterns.
    • Included advanced configuration examples and server-side rendering options across language-specific guides.
  • Bug Fixes

    • Corrected component reference in React/Javascript initialization example.

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

- Updated Flutter/Dart initialization example to use new ABSmartly.create() factory
- Simplified from multi-step ClientConfig creation to single factory call
- Added comprehensive SDK options table including retries, timeout, contextEventLogger
- Added advanced configuration section showing manual Client creation for custom use cases
- Improved code clarity and developer experience
- Maintained backwards compatibility

Example change:
Before: ClientConfig → Client → ABSmartlyConfig → ABSmartly
After: ABSmartly.create(endpoint, apiKey, application, environment)
Add missing SDK tabs to import-and-initialize documentation:
- Dart SDK with Absmartly.create() factory method and advanced config
- Rust SDK with SDKConfig builder pattern and async/await examples
- Liquid SDK for Shopify integration with server-side rendering

Update naming convention from ABSmartly to Absmartly:
- Flutter SDK now uses Absmartly.create() instead of ABSmartly.create()
- React provider examples updated to use <Absmartly> component
- Dart advanced config uses Absmartly/AbsmartlyConfig naming

Separate Dart from Flutter documentation to clarify pure Dart usage
versus Flutter-specific implementation.
- Updated all code examples to use correct naming: ABsmartly (AB uppercase)
- Fixed references in Rust, Dart, Flutter, and Ruby SDK examples
- Updated React component references in MDX documentation
- Ensured consistency across all import and initialize documentation
@coderabbitai
Copy link

coderabbitai bot commented Jan 30, 2026

Walkthrough

This pull request extends SDK initialization documentation by adding new code examples for Dart, Rust, and Liquid languages. The primary documentation file is reorganized to include language-specific tabs with corresponding SDK options and configuration examples. Existing Flutter and Dart examples are updated to use a consistent ABsmartly.create() factory method pattern. A Ruby import example is updated to use consistent naming conventions. The changes are entirely documentation-focused, introducing new language support without modifying the underlying SDK implementations.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~22 minutes

Poem

🐰 Hops with glee through docs anew,
Adding Dart, Rust, Liquid too!
Languages dance in tidy tabs,
Configuration, no more slabs.
Consistency blooms, the SDK grows bright,
Documentation shines with all its might! 🌟

🚥 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 directly and accurately reflects the main changes: addition of Dart, Rust, and Liquid SDK documentation support to enhance the documentation.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

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

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch update-sdk-docs

Tip

🧪 Unit Test Generation v2 is now available!

We have significantly improved our unit test generation capabilities.

To enable: Add this to your .coderabbit.yaml configuration:

reviews:
  finishing_touches:
    unit_tests:
      enabled: true

Try it out by using the @coderabbitai generate unit tests command on your code files or under ✨ Finishing Touches on the walkthrough!

Have feedback? Share your thoughts on our Discord thread!


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.

@netlify
Copy link

netlify bot commented Jan 30, 2026

Deploy Preview for absmartly-docs ready!

Name Link
🔨 Latest commit a2c7bef
🔍 Latest deploy log https://app.netlify.com/projects/absmartly-docs/deploys/697caf5c76885400084907d5
😎 Deploy Preview https://deploy-preview-249--absmartly-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

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

🤖 Fix all issues with AI agents
In
`@docs/APIs-and-SDKs/SDK-Documentation/getting-started/import-and-initialize/liquid/initialize.liquid`:
- Around line 6-16: The Liquid template embeds unescaped values into
window.absmartlyConfig (application, units.session_id, units.customer_id) which
can break JS or enable XSS; update the template to JSON-encode those
interpolations using the Liquid json filter (e.g. application: {{ shop.name |
json }}, session_id: {{ request.cookie.session_id | json }}, and customer_id: {{
customer.id | json }}) so the values are safely serialized for inclusion in the
script.

Comment on lines +6 to +16
<script>
window.absmartlyConfig = {
endpoint: 'https://your-company.absmartly.io/v1',
apiKey: 'YOUR-API-KEY',
application: '{{ shop.name }}',
environment: 'production',
units: {
session_id: '{{ request.cookie.session_id }}',
{% if customer %}customer_id: {{ customer.id }}{% endif %}
}
};
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

Escape Liquid output to keep JS valid and avoid injection.
shop.name, request.cookie.session_id, and customer.id are interpolated without JSON encoding; quotes or special characters can break the script or introduce XSS. Use the json filter to safely serialise values.

Proposed fix
-  window.absmartlyConfig = {
-    endpoint: 'https://your-company.absmartly.io/v1',
-    apiKey: 'YOUR-API-KEY',
-    application: '{{ shop.name }}',
-    environment: 'production',
-    units: {
-      session_id: '{{ request.cookie.session_id }}',
-      {% if customer %}customer_id: {{ customer.id }}{% endif %}
-    }
-  };
+  window.absmartlyConfig = {
+    endpoint: 'https://your-company.absmartly.io/v1',
+    apiKey: 'YOUR-API-KEY',
+    application: {{ shop.name | json }},
+    environment: 'production',
+    units: {
+      session_id: {{ request.cookie.session_id | json }}{% if customer %},
+      customer_id: {{ customer.id | json }}{% endif %}
+    }
+  };
🤖 Prompt for AI Agents
In
`@docs/APIs-and-SDKs/SDK-Documentation/getting-started/import-and-initialize/liquid/initialize.liquid`
around lines 6 - 16, The Liquid template embeds unescaped values into
window.absmartlyConfig (application, units.session_id, units.customer_id) which
can break JS or enable XSS; update the template to JSON-encode those
interpolations using the Liquid json filter (e.g. application: {{ shop.name |
json }}, session_id: {{ request.cookie.session_id | json }}, and customer_id: {{
customer.id | json }}) so the values are safely serialized for inclusion in the
script.

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.

2 participants