feat: draw-canvas-feature-to-display-on-badge.#21
feat: draw-canvas-feature-to-display-on-badge.#21Dhruv1797 wants to merge 3 commits intofossasia:mainfrom
Conversation
Reviewer's Guide by SourceryThis pull request introduces a new drawing canvas feature to the application, allowing users to draw, add text and images, and adjust the final image for display on the Magic ePaper Badge. It includes a custom drawing page, overlay management, image adjustments, and necessary dependencies and assets. Sequence diagram for drawing and exporting an imagesequenceDiagram
participant User
participant DrawingPage
participant ImageAdjustScreen
participant ImageLoader
User->>DrawingPage: Draws on canvas / Adds overlays
User->>DrawingPage: Clicks 'Download' (Export)
DrawingPage->>DrawingPage: Captures the current state of the canvas
DrawingPage->>ImageAdjustScreen: Navigates to ImageAdjustScreen with captured image
ImageAdjustScreen->>ImageAdjustScreen: Allows brightness and contrast adjustments
User->>ImageAdjustScreen: Adjusts image properties
User->>ImageAdjustScreen: Clicks 'Submit'
ImageAdjustScreen->>ImageLoader: Passes adjusted image bytes
ImageLoader->>ImageLoader: Loads the image from bytes
ImageLoader->>DrawingPage: Returns to DrawingPage with the final image
DrawingPage-->>User: Displays the final image
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Hey @Dhruv1797 - I've reviewed your changes - here's some feedback:
Overall Comments:
- Consider adding a clear button to the canvas to allow users to easily reset their drawing.
- The canvas implementation introduces many new files - consider grouping these into a single directory for better organization.
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 and I'll use the feedback to improve your reviews.
| required Color selectedColor, | ||
| required void Function(OverlayItem) onItemCreated, | ||
| }) { | ||
| TextEditingController controller = TextEditingController(); |
There was a problem hiding this comment.
suggestion: Consider disposing the TextEditingController.
Since the controller is created in the dialog without being disposed, there is a potential for a memory leak. Even in dialog code, ensuring proper disposal can improve resource management.
|
@mariobehling @kienvo Thank you! |
|
@mariobehling @AsCress @kienvo can you please review this pr ? |
|
@AsCress I believe it shouldn't conflict with PR #18 as I have already pulled the latest changes from the main branch after it was merged. As for PR #23, it has not been merged into main yet. |
latest-video-preview.mp4@AsCress Here's the latest video preview of the draw canvas, which includes all the changes from PR #18. The previous video was actually an older version, but I’ve pulled the latest changes from main after PR #18 was merged. So, I think there shouldn't be any conflict with this branch for this PR. |
|
@AsCress, please guide me if I’m wrong or if there’s anything I should improve, your guidance means a lot to me 🙏. |
By conflicting, I meant changes in implementation and app flows and not git merge conflicts.
Alright, now I get it. Thank you for your explanation and the screen recording. I saw the one which you had uploaded in the PR body and thought that you had based your changes over the previous UI. |
|
Thank you for taking the time to review this, @AsCress, really appreciate it! 🙏 I'm glad the explanation and screen recording helped clarify things. |
|
Please also resolve conflicts. Thanks! |
|
Hi @mariobehling, |
|
@Dhruv1797 I guess this has been superseeded by #31 ? |
In this PR, I have delivered a fully custom, high-performance canvas editor specifically designed for the Magic ePaper Badge. Every feature was built from the ground up to ensure precise control over rendering, user interactions, and export workflows.
draw-canvas-demo.mp4
🖌️ Canvas & Drawing Tools
🔤 Text Overlay System
🖼️ Image Import & Manipulation
📚 Layer Manager
👁️ Preview, Crop & Adjustments
📲 NFC Integration with Canvas Image
Demo Resources
Summary by Sourcery
Implement a comprehensive drawing canvas feature for the Magic ePaper Badge, providing a fully custom image editing experience with advanced drawing, text, and image overlay capabilities.
New Features:
Enhancements:
Build: