-
Notifications
You must be signed in to change notification settings - Fork 20
feat(image): add Custom export option opening configurable display di... #275
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
base: main
Are you sure you want to change the base?
Conversation
…alog and export-only ImageEditor
Reviewer's GuideAdds a “Custom” export option to the image editor that launches a configurable EPD dialog for user-defined display parameters, updates the color provider, and navigates to an export‐only editor instance with the custom device. Sequence diagram for Custom export option flowsequenceDiagram
actor User
participant ImageEditor
participant ConfigurableEpdDialog
participant ColorPaletteProvider
participant ExportOnlyImageEditor
User->>ImageEditor: Tap "Custom" button
ImageEditor->>ConfigurableEpdDialog: Open dialog with default params
User->>ConfigurableEpdDialog: Set custom width, height, colors, name
ConfigurableEpdDialog-->>ImageEditor: Return CustomEpdConfig
ImageEditor->>ColorPaletteProvider: updateColors(customEpd.colors)
ImageEditor->>ExportOnlyImageEditor: Navigate with customEpd
User->>ExportOnlyImageEditor: Interact with export-only editor
Class diagram for new and updated types in Custom export flowclassDiagram
class ConfigurableEpd {
+String modelId
+int width
+int height
+List<Color> colors
+String name
}
class CustomEpdConfig {
+int width
+int height
+List<Color> colors
+String presetName
}
class ColorPaletteProvider {
+updateColors(List<Color> colors)
}
ConfigurableEpdDialog --> CustomEpdConfig
ImageEditor --> ConfigurableEpd
ImageEditor --> ColorPaletteProvider
ImageEditor --> ConfigurableEpdDialog
ImageEditor --> ExportOnlyImageEditor
File-Level Changes
Possibly linked issues
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
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 there - I've reviewed your changes and they look great!
Prompt for AI Agents
Please address the comments from this code review:
## Individual Comments
### Comment 1
<location> `lib/view/image_editor.dart:759-763` </location>
<code_context>
+
+ try {
+ context.read<ColorPaletteProvider>().updateColors(customEpd.colors);
+ } catch (e) {
+ // provider may not be available in some contexts; ignore silently
+ }
+
</code_context>
<issue_to_address>
**suggestion (bug_risk):** Silent catch may obscure underlying issues.
Logging the exception or adding a debug print would help identify unexpected issues when the provider is unavailable.
```suggestion
try {
context.read<ColorPaletteProvider>().updateColors(customEpd.colors);
} catch (e, stackTrace) {
// provider may not be available in some contexts; log for debugging
debugPrint('ColorPaletteProvider unavailable: $e\n$stackTrace');
}
```
</issue_to_address>Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
Overview
This PR re-submits the clean version of my previous contribution that adds a "Custom" option on the image screen (similar to Arduino).
Features
Notes
Thank you for the feedback earlier — I’ve created this clean PR as requested.