Skip to content

Conversation

@divyanshub024
Copy link
Member

@divyanshub024 divyanshub024 commented Feb 3, 2026

Summary

Adds an ergonomic Dart API for navigation actions and expands docs so navigation is the main concept and the Navigate action is a focused API reference.

Changes

StacNavigator API (stac_core)

  • New StacNavigator with static helpers: pop/popAll, pushStac/pushFlutter/pushJson/pushAsset/pushNetwork and their pushReplacement/pushAndRemoveAll variants.
  • Exported from stac_core actions.

Documentation

  • New concept: Navigation in Stac — overview, destinations, StacNavigator usage, navigation styles, and full Dart+JSON examples.
  • Navigate action page is API reference only; links to concept doc for examples.
  • Navigation in Stac added under Overview → Concepts.

Examples

  • Movie app screens use StacNavigator.pushStac() and StacSetValueAction instead of raw JSON.
  • macOS: Podfile platform 10.14 → 10.15.

Summary by CodeRabbit

  • Documentation

    • Reorganized Navigate Action documentation with structured property reference.
    • Added comprehensive navigation concepts guide explaining navigation patterns.
  • New Features

    • Introduced streamlined navigation API providing ergonomic methods for push, pop, and replace operations.
    • Support for navigating to Stac routes, Flutter routes, inline JSON, assets, and network destinations.
  • Chores

    • Updated macOS minimum deployment target from 10.14 to 10.15.
    • Integrated CocoaPods dependency management for macOS example.
    • Added go_router dependency.

- Add StacNavigator: ergonomic Dart API for navigate actions (pushStac,
  pushFlutter, pushJson, pushAsset, pushNetwork, pop, popAll, and
  pushReplacement/pushAndRemoveAll variants).
- Export StacNavigator from stac_core actions.
- Docs: add concept 'Navigation in Stac' with overview, destinations,
  StacNavigator usage, navigation styles, and full Dart/JSON examples.
- Docs: make Navigate action page API reference only; link to concept
  for examples.
- Movie app: use StacNavigator.pushStac() and StacSetValueAction in
  home, detail, and onboarding screens.
- macOS example: bump Podfile platform to 10.15.
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 3, 2026

Important

Review skipped

Review was skipped due to path filters

⛔ Files ignored due to path filters (1)
  • examples/movie_app/macos/Podfile.lock is excluded by !**/*.lock

CodeRabbit blocks several paths by default. You can override this behavior by explicitly including those paths in the path filters. For example, including **/dist/** will override the default block on the dist directory, by removing the pattern from both the lists.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

  • 🔍 Trigger a full review
📝 Walkthrough

Walkthrough

This PR introduces a new ergonomic navigation API (StacNavigator) with factory methods for different navigation styles and destinations, updates macOS deployment targets to 10.15, integrates CocoaPods into the example app, refactors navigation usage across example screens to use typed actions, and provides comprehensive navigation documentation.

Changes

Cohort / File(s) Summary
Documentation Updates
docs/actions/navigate.mdx, docs/concepts/navigation_in_stac.mdx, docs/docs.json
Refactored Navigate Action documentation to API-reference style with property tables; added new navigation concepts documentation; updated docs navigation structure.
macOS Deployment & CocoaPods Integration
examples/movie_app/macos/Podfile, examples/movie_app/macos/Runner.xcodeproj/project.pbxproj, examples/movie_app/macos/Runner.xcworkspace/contents.xcworkspacedata
Updated macOS deployment target from 10.14 to 10.15 and integrated CocoaPods support with build phases, frameworks, and xcconfig references.
Navigation API Implementation
packages/stac_core/lib/actions/navigate/stac_navigator.dart, packages/stac_core/lib/actions/actions.dart
Introduced new StacNavigator class with 18 static factory methods covering pop, push, replace, and clear operations across multiple destination types (Stac routes, Flutter routes, JSON, assets, network); added dependency on go_router ^17.0.1.
Example Screen Navigation Refactoring
examples/movie_app/stac/home_screen.dart, examples/movie_app/stac/detail_screen.dart, examples/movie_app/stac/onboarding_screen.dart
Updated example screens to use typed StacSetValueAction and StacNavigator factory methods instead of JSON-based StacAction.fromJson() or direct StacNavigateAction constructors.
Dependency Addition
packages/stac/pubspec.yaml
Added go_router ^17.0.1 to dependencies.

Sequence Diagram(s)

sequenceDiagram
    participant App as Mobile App
    participant Navigator as StacNavigator
    participant Action as StacNavigateAction
    participant RouteHandler as Navigation Handler

    App->>Navigator: pushStac('detail_screen')
    Note over Navigator: Create action with<br/>routeName, navigationStyle: push
    Navigator->>Action: StacNavigateAction(routeName, push)
    Action-->>App: return configured action
    
    App->>RouteHandler: dispatch action
    RouteHandler->>RouteHandler: resolve destination<br/>(routeName/widgetJson/asset/network)
    RouteHandler->>RouteHandler: execute navigationStyle<br/>(push/pop/replace/clear)
    RouteHandler-->>App: navigate to destination
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

Suggested reviewers

  • Potatomonsta

🐰 Hops through screens with glee,
StacNavigator sets devs free,
No more JSON chains to write,
Just push, pop, and get it right!
Navigation magic, typed and bright,
This PR makes routing feel so light!

🚥 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 additions: a new StacNavigator API and expanded navigation documentation.
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 stac-navigator

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 `@packages/stac/pubspec.yaml`:
- Line 28: The pubspec declares go_router: ^17.0.1 but the Flutter SDK lower
bound is still the old constraint; update the Flutter SDK constraint in the
pubspec's environment section (the Flutter SDK lower bound) to >=3.32 to match
go_router 17.0.1 compatibility so dependency resolution succeeds.

stac_logger: ^1.1.0
stac_core: ^1.2.0
shared_preferences: ^2.5.4
go_router: ^17.0.1
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🌐 Web query:

go_router 17.0.1 pub.dev Flutter Dart SDK requirements constraints

💡 Result:

For go_router 17.0.1, the SDK constraints are:

  • Flutter SDK: >= 3.32 (minimum supported Flutter version) [2]
  • Dart SDK: >= 3.8 (minimum supported Dart version); pub.dev’s “Min Dart SDK” column shows 3.9 for 17.0.1 [2][1]

Sources: pub.dev versions table for min Dart SDK [1] and the package changelog note about updated minimum supported Flutter/Dart [2].


Bump Flutter lower bound to >= 3.32 for go_router 17.0.1 compatibility.

go_router 17.0.1 requires Flutter >= 3.32, but the current constraint is >=1.17.0. This will cause dependency resolution failures for users on older Flutter versions. Update the Flutter constraint to >=3.32.

🤖 Prompt for AI Agents
In `@packages/stac/pubspec.yaml` at line 28, The pubspec declares go_router:
^17.0.1 but the Flutter SDK lower bound is still the old constraint; update the
Flutter SDK constraint in the pubspec's environment section (the Flutter SDK
lower bound) to >=3.32 to match go_router 17.0.1 compatibility so dependency
resolution succeeds.

@divyanshub024 divyanshub024 merged commit 78cfb2c into dev Feb 3, 2026
6 checks passed
@divyanshub024 divyanshub024 deleted the stac-navigator branch February 3, 2026 13:25
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