-
Notifications
You must be signed in to change notification settings - Fork 213
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: Added animation mode #1009
feat: Added animation mode #1009
Conversation
…badge. feat: Added the modes support for left right top down fixed and animation support for flash and marquee. animation right
Reviewer's Guide by SourceryThis pull request implements an animation mode for a badge display system. It introduces new animation types, refactors existing code to support animations, and adds utility functions for handling animations and conversions between different data representations. File-Level Changes
Tips
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @Jhalakupadhyay - I've reviewed your changes - here's some feedback:
Overall Comments:
- Consider refactoring the DrawBadgeProvider class to reduce its responsibilities and improve maintainability.
- Look for opportunities to reduce code duplication across animation classes, possibly by introducing a common base class or utility functions.
Here's what I looked at during the review
- 🟡 General issues: 1 issue found
- 🟢 Security: all looks good
- 🟢 Testing: all looks good
- 🟢 Complexity: all looks good
- 🟢 Documentation: all looks good
Help me be more useful! Please click 👍 or 👎 on each comment to tell me if it was helpful.
} | ||
} | ||
|
||
void changeGridValue(List<List<int>> newGrid) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
suggestion: Refactor animation logic for improved clarity and maintainability
The changeGridValue method contains complex animation logic. Consider breaking it down into smaller, more focused functions for each animation type or aspect. This will improve readability and make the code easier to maintain and debug.
void changeGridValue(List<List<int>> newGrid) {
_animateGridChange(newGrid);
}
void _animateGridChange(List<List<int>> newGrid) {
int badgeWidth = homeViewGrid[0].length;
int badgeHeight = homeViewGrid.length;
// ... rest of the animation logic
}
Summary by Sourcery
Add a new animation mode for badges, introducing multiple animation effects and refactor the badge drawing logic to use a new provider for improved flexibility and control.
New Features:
Enhancements:
BadgeViewProvider
, replacing the previousDrawBadgeProvider
.Chores: