Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: modifiers in spec #333

Merged
merged 32 commits into from
Jul 11, 2024
Merged

feat: modifiers in spec #333

merged 32 commits into from
Jul 11, 2024

Conversation

tilucasoli
Copy link
Collaborator

@tilucasoli tilucasoli commented Jun 27, 2024

Related issue

#313

Description

Add the ability to set modifiers in specs.

Changes

  • Add modifiers as an attribute of Spec;
  • Add the ability to set modifiers in specs;
  • Change the default way to reorder modifiers, now it should be a Spec instead of Attribute;
  • Deprecate some attributes of RenderModifiers;
  • Create a directory, which will group the old tests to ensure doesn't exist breaking changes.

Review Checklist

  • Testing: Have you tested your changes, including unit tests and integration tests for affected code?
  • Breaking Changes: Does this change introduce breaking changes affecting existing code or users?
  • Documentation Updates: Are all relevant documentation files (e.g. README, API docs) updated to reflect the changes in this PR?
  • Website Updates: Is the website containing the updates you make on documentation?

Additional Information (optional)

I tried not to create breaking changes, let me know if you have any doubts about some modifications.

Copy link

vercel bot commented Jun 27, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
mix-docs ⬜️ Ignored (Inspect) Visit Preview Jul 11, 2024 3:01pm

Copy link
Contributor

github-actions bot commented Jun 27, 2024

DCM report

❌ warning issues: 1

Full report: https://github.com/conceptadev/mix/runs/26769029694

@tilucasoli tilucasoli changed the base branch from main to test-pipeline-1 June 27, 2024 19:45
@tilucasoli tilucasoli changed the base branch from test-pipeline-1 to main June 27, 2024 19:45
packages/mix/lib/src/specs/flex/flex_widget.dart Outdated Show resolved Hide resolved
@@ -50,28 +51,32 @@ class IconSpecWidget extends StatelessWidget {
this.semanticLabel,
super.key,
this.textDirection,
this.modifierOrder = const [],
this.orderOfModifiers = const [],
});

final IconData? icon;
final IconSpec? spec;
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

For the Widget spec, all of them follow the same basic structure, a spec attribute with some Spec and an attribute called orderOfModifiers. What if we create an abstract class SpecWidget?

@tilucasoli tilucasoli changed the title Feat/modifiers in spec feat: modifiers in spec Jul 2, 2024
@tilucasoli
Copy link
Collaborator Author

@leoafarias do you think we should create a document for this migration now?

@tilucasoli tilucasoli marked this pull request as ready for review July 8, 2024 13:38
@github-actions github-actions bot added documentation Improvements or additions to documentation and removed documentation Improvements or additions to documentation mix mix_generator repo examples labels Jul 8, 2024
@tilucasoli tilucasoli merged commit 2e88dc9 into main Jul 11, 2024
6 checks passed
@tilucasoli tilucasoli deleted the feat/modifiers-in-spec branch July 11, 2024 15:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants