Skip to content

Conversation

@divyanshub024
Copy link
Member

@divyanshub024 divyanshub024 commented Jan 30, 2026

Description

add Dart code examples and wrap all examples in a CodeGroup component for sliver widget documentation

Related Issues

Closes #

Type of Change

  • New feature (non-breaking change which adds functionality)
  • Bug fix (non-breaking change which fixes an issue)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Code refactor
  • Build configuration change
  • Documentation
  • Chore

Summary by CodeRabbit

  • Documentation
    • Improved widget documentation with enhanced code example formatting
    • Added Dart code snippets alongside JSON examples for better clarity
    • Reorganized examples using grouped presentation format across multiple widget pages

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

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 30, 2026

📝 Walkthrough

Walkthrough

This PR standardizes example formatting across three sliver widget documentation files by replacing standalone "Example JSON" sections with unified "Example" sections that wrap both Dart and JSON code snippets within <CodeGroup> containers for improved presentation.

Changes

Cohort / File(s) Summary
Documentation Example Reformatting
docs/widgets/sliver_fill_remaining.mdx, docs/widgets/sliver_grid.mdx, docs/widgets/sliver_list.mdx
Renamed "Example JSON" section headers to "Example" and wrapped code snippets in <CodeGroup> containers to display Dart and JSON examples together in a single cohesive block.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Possibly related PRs

Poem

🐰 Documentation hops with style so bright,
CodeGroups wrap examples, a delightful sight,
Dart and JSON in harmony dance,
Widget docs get their formatting chance—
Standardized, polished, and oh so neat,
Making every reader's journey complete! ✨

🚥 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 accurately summarizes the main changes: adding Dart code examples and wrapping examples in CodeGroup components across sliver widget documentation 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.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch dv/sliver-docs

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

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
docs/widgets/sliver_list.mdx (1)

31-111: ⚠️ Potential issue | 🟡 Minor

Inconsistent structure between Dart and JSON examples.

The Dart example shows only the StacSliverList component (lines 33-57), but the JSON example wraps it in a full scaffold > customScrollView > slivers structure (lines 61-109). This differs from the other sliver docs (sliver_fill_remaining.mdx and sliver_grid.mdx) where both Dart and JSON show just the component.

Consider aligning the JSON to show only the sliverList portion for consistency:

📝 Suggested JSON (component only)
-{
-  "type": "scaffold",
-  "body": {
-    "type": "customScrollView",
-    "slivers": [
-      {
-        "type": "sliverList",
-        "children": [
+{
+  "type": "sliverList",
+  "children": [
           ...
-        ]
-      }
-    ]
-  }
-}
+  ]
+}

@divyanshub024 divyanshub024 merged commit a683231 into dev Jan 30, 2026
3 checks passed
@divyanshub024 divyanshub024 deleted the dv/sliver-docs branch January 30, 2026 19:40
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.

1 participant