Skip to content

Conversation

@divyanshub024
Copy link
Member

@divyanshub024 divyanshub024 commented Nov 27, 2025

Description

This PR exposes the new parser extension methods for widgets and actions. These extensions make it much simpler to render nested StacWidget without manually calling Stac.fromJson or dealing with map conversions.

Example

  1. parse widget
  child: model.child?.parse(context),
  1. parse List
children: model.children.parseList(context) ?? [],
  1. parse actions
onPressed: () => action.onPressed.parse(context),

Summary by CodeRabbit

  • New Features
    • Expanded the parsers library public API, making additional parser modules accessible for integration into applications.

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

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Nov 27, 2025

Walkthrough

Two new exports are added to the parsers barrel file, exposing stac_action_parser.dart and stac_widget_parser.dart from the core parsers module. This extends the public API surface of the parsers library.

Changes

Cohort / File(s) Change Summary
Parsers Barrel Export Additions
packages/stac/lib/src/parsers/parsers.dart
Added two new public exports: stac_action_parser.dart and stac_widget_parser.dart from package:stac/src/parsers/core

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Possibly related PRs

  • PR #361: Directly imports and utilizes the exposed parser modules (stac_action_parser.dart and stac_widget_parser.dart) with calls like model.action.parse(context) and widget.model.child.parse(context), sharing the same parser API surface.

Suggested reviewers

  • Potatomonsta
  • rahulbisht25

Poem

🐰 Two exports hop into the light,
Action and widget parsers now in sight,
The barrel opens wide with cheer,
The public API grows so clear! ✨

Pre-merge checks and finishing touches

✅ 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 describes the main change—exporting new stac action and widget parser extension methods to the public API.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch dv/export-widget-extensions

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.

@divyanshub024 divyanshub024 added the feature New feature or request label Nov 27, 2025
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

🧹 Nitpick comments (1)
packages/stac/lib/src/parsers/parsers.dart (1)

2-3: New core parser exports look consistent; remember API/documentation updates

The added exports align with the existing barrel style and cleanly surface the core action/widget parser extensions. From this file’s perspective everything looks correct; the only follow‑ups I’d suggest are:

  • Ensure CHANGELOG / release notes call out the newly public parser extensions.
  • Confirm any public docs or examples are updated to use the new .parse / .parseList helpers so consumers don’t keep reimplementing the old patterns.
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between a028171 and 24016c7.

📒 Files selected for processing (1)
  • packages/stac/lib/src/parsers/parsers.dart (1 hunks)

@divyanshub024 divyanshub024 merged commit 11de03f into dev Nov 27, 2025
6 checks passed
@divyanshub024 divyanshub024 deleted the dv/export-widget-extensions branch November 27, 2025 09:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants