-
Notifications
You must be signed in to change notification settings - Fork 211
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
fix: inlineimagecontroller now has a validation check #1123
base: flutter_app
Are you sure you want to change the base?
Conversation
Signed-off-by: Arya Pratap Singh <[email protected]>
Reviewer's Guide by SourceryThis PR introduces a validation check for the Sequence diagram for save badge validation flowsequenceDiagram
actor User
participant UI as HomeScreen
participant Controller as InlineImageController
participant Dialog as SaveBadgeDialog
User->>UI: Clicks Save Button
UI->>Controller: Check text value
alt text is empty
Controller-->>UI: Empty value
UI->>UI: Set error message
UI-->>User: Display error hint
else text has value
Controller-->>UI: Valid value
UI->>UI: Clear error message
UI->>Dialog: Show save dialog
Dialog-->>User: Display save options
end
State diagram for inline image controller validationstateDiagram-v2
[*] --> Empty
Empty --> Error: Save clicked
Error --> Valid: Text entered
Valid --> SaveDialog: Save clicked
SaveDialog --> [*]
note right of Empty: Initial state
note right of Error: Shows red error message
note right of Valid: Ready to save
File-Level Changes
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 @ARYPROGRAMMER - I've reviewed your changes - here's some feedback:
Overall Comments:
- Consider implementing proper hex string validation instead of just checking for empty string to prevent invalid inputs from reaching hexStringToBool()
- The error message could be more specific about the expected input format (e.g., 'Please enter a valid hex string')
Here's what I looked at during the review
- 🟢 General issues: all looks good
- 🟢 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.
This PR solves a small edge case where the Value of
inlineimagecontroller
used byExtendedTextField
is null. Ideally it should have some sort of error checking mechanism else when it gets saved and is played from theSavedBadges
section, it throws the error:THE CHANGES IN THIS PR FIX THIS
Summary by Sourcery
Bug Fixes: