Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@Xsantosh
Copy link
Contributor

@Xsantosh Xsantosh commented Sep 27, 2025

Description

Upgrade the freezed class documentation to add abstact before starting of class definition to support freezed versions 3.*
I have also changed brick definition for mason.

Related Issues

Closes #352

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

  • Refactor
    • Converted data classes (e.g., Stac{name}, PrintAction, CustomButton) to abstract classes while retaining factory constructors and JSON deserialization. Instances are now created via factories; direct instantiation is no longer available.
  • Documentation
    • Updated action_parsers and parsers guides to reflect abstract class declarations and factory-based instantiation patterns.

@CLAassistant
Copy link

CLAassistant commented Sep 27, 2025

CLA assistant check
All committers have signed the CLA.

@coderabbitai
Copy link

coderabbitai bot commented Sep 27, 2025

Walkthrough

Concrete freezed class declarations were changed to abstract across a Dart brick template and two documentation snippets. Factory constructors (including fromJson) remain intact. The update aligns examples and templates with newer freezed syntax, affecting Stac{{name}}, PrintAction, and CustomButton declarations only.

Changes

Cohort / File(s) Summary
Brick template: Stac freezed class to abstract
bricks/stac_parser/__brick__/{{#snakecase}}stac_{{name}}{{/snakecase}}/{{#snakecase}}stac_{{name}}{{/snakecase}}.dart
Changed class Stac{{#pascalCase}}{{name}}{{/pascalCase}} with _$_ to abstract class ... with _$_; retained factory constructor to private implementation.
Docs: freezed syntax updates
website/docs/concepts/action_parsers.md, website/docs/concepts/parsers.md
Updated code snippets to declare abstract class for PrintAction and CustomButton; kept existing factory and fromJson constructors.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

I nudge my paws through fields of code,
Adding “abstract” on the road.
Factories hop where types begin,
fromJson burrows safely in.
Snippets aligned, the docs now sing—
a tidy warren, spring by spring. 🐇✨

Pre-merge checks and finishing touches

✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title Check ✅ Passed The title “docs: upgrade freezed class to match freezed version 3.” accurately and concisely reflects the main change of updating documentation and code templates to the new freezed 3. syntax, making it clear to reviewers what this PR addresses.
Linked Issues Check ✅ Passed The changes update all advertised freezed class declarations in both documentation and the Mason brick to include the abstract keyword and match freezed 3.* syntax while preserving factory constructors and JSON factories, fully satisfying the replacement, compilation, and consistency requirements of issue #352.
Out of Scope Changes Check ✅ Passed All modifications are focused on adding the abstract keyword to freezed class snippets in the Mason brick template and documentation files as specified by the linked issue, with no unrelated or extraneous changes present.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
✨ Finishing touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between fc8512c and a08c1da.

📒 Files selected for processing (3)
  • bricks/stac_parser/__brick__/{{#snakecase}}stac_{{name}}{{/snakecase}}/{{#snakecase}}stac_{{name}}{{/snakecase}}.dart (1 hunks)
  • website/docs/concepts/action_parsers.md (1 hunks)
  • website/docs/concepts/parsers.md (1 hunks)

Tip

👮 Agentic pre-merge checks are now available in preview!

Pro plan users can now enable pre-merge checks in their settings to enforce checklists before merging PRs.

  • Built-in checks – Quickly apply ready-made checks to enforce title conventions, require pull request descriptions that follow templates, validate linked issues for compliance, and more.
  • Custom agentic checks – Define your own rules using CodeRabbit’s advanced agentic capabilities to enforce organization-specific policies and workflows. For example, you can instruct CodeRabbit’s agent to verify that API documentation is updated whenever API schema files are modified in a PR. Note: Upto 5 custom checks are currently allowed during the preview period. Pricing for this feature will be announced in a few weeks.

Please see the documentation for more information.

Example:

reviews:
  pre_merge_checks:
    custom_checks:
      - name: "Undocumented Breaking Changes"
        mode: "warning"
        instructions: |
          Pass/fail criteria: All breaking changes to public APIs, CLI flags, environment variables, configuration keys, database schemas, or HTTP/GraphQL endpoints must be documented in the "Breaking Change" section of the PR description and in CHANGELOG.md. Exclude purely internal or private changes (e.g., code not exported from package entry points or explicitly marked as internal).

Please share your feedback with us on this Discord post.


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

Copy link
Member

@divyanshub024 divyanshub024 left a comment

Choose a reason for hiding this comment

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

Thanks for your contribution 💯

@divyanshub024 divyanshub024 merged commit 6630f3b into StacDev:dev Sep 28, 2025
5 checks passed
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.

docs: upgrade code snippets where freezed annotations are used.

3 participants