Skip to content

feat: added ability to override mirai parsers and action_parsers.#81

Merged
divyanshub024 merged 4 commits intoStacDev:devfrom
khanjasir90:users/jasir/parsers-action-override-feat
Jan 5, 2025
Merged

feat: added ability to override mirai parsers and action_parsers.#81
divyanshub024 merged 4 commits intoStacDev:devfrom
khanjasir90:users/jasir/parsers-action-override-feat

Conversation

@khanjasir90
Copy link
Contributor

Description

  1. Added a feature where users will able to override the existing parsers and action_parsers.
  2. This will provide better customization and flexibitlity.

Related Issues

Closes #17

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

@divyanshub024
Copy link
Member

Hey @khanjasir90, The analyze check is failing due to an unused import. Please check it.

https://github.com/BuildMirai/mirai/actions/runs/12608379968/job/35142662480?pr=81

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 this great work 🎉

Please check my suggestions.

@@ -16,24 +16,14 @@ class MiraiRegistry {

bool register(MiraiParser parser) {
Copy link
Member

Choose a reason for hiding this comment

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

@khanjasir90 Can we add an optional param called "bool override". And the parser will be overridden only of the value is true.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sure, added the same @divyanshub024

return true;
}

Future<dynamic> registerAll(List<MiraiParser> parsers) {
Copy link
Member

Choose a reason for hiding this comment

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

Also, please add the same logic to registerAll and registerAllActions functions.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Update the registerAll and update registerAllActions functions with the same logic

@divyanshub024
Copy link
Member

Hey @khanjasir90, There is some formatting issue. Can you please run dart format . in your branch?

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 this amazing PR @khanjasir90 🥇

@divyanshub024 divyanshub024 merged commit 7e32dbb into StacDev:dev Jan 5, 2025
3 checks passed
lstonussi pushed a commit to SuaMusica/stac that referenced this pull request Feb 25, 2026
…tion-override-feat

feat: added ability to override mirai parsers and action_parsers.
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.

feat: Allow Override Widgets and Actions Registration

2 participants