-
Notifications
You must be signed in to change notification settings - Fork 814
refactor: minor UI enhancements #2791
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
Conversation
Reviewer's GuideRefactored the circular slider by introducing a custom ServoSlider, extended localization for new UI strings, added a documentation link with error handling in the navigation drawer, and applied minor UI spacing and bug fixes. Class diagram for ServoSlider refactor and related UI changesclassDiagram
class ServoCard {
- double value
- Function(double) onChanged
- VoidCallback onTap
- String label
- int servoId
- double cardHeight
}
ServoCard <|-- _ServoCardState
class ServoSlider {
+double progress
+double maxProgress
+double startAngle
+double sweepAngle
+double trackWidth
+double thumbRadius
+double size
+bool clockwise
+ValueChanged<double> onChanged
+Color trackColor
+Color progressColor
+Color thumbColor
}
ServoSlider <|-- _ServoSliderState
class _ServoSliderPainter {
+double angle
+double startAngle
+double sweepAngle
+double trackWidth
+double thumbRadius
+bool clockwise
+Color trackColor
+Color progressColor
+Color thumbColor
}
ServoSlider o-- _ServoSliderPainter : uses
ServoCard o-- ServoSlider : uses
class AppLocalizations {
+String documentationLink
+String documentationError
+String tapToEdit
}
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 @rahul31124 - 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/widgets/servo_slider.dart:92` </location>
<code_context>
+ width: widget.size,
+ height: widget.size,
+ child: GestureDetector(
+ onPanUpdate: (details) => _onPanUpdate(details.localPosition),
+ child: CustomPaint(
+ painter: _ServoSliderPainter(
</code_context>
<issue_to_address>
Using onPanUpdate may not capture initial touch events accurately for the slider.
Also handle onPanStart to update the slider as soon as the user touches it for better responsiveness.
</issue_to_address>
<suggested_fix>
<<<<<<< SEARCH
child: GestureDetector(
onPanUpdate: (details) => _onPanUpdate(details.localPosition),
child: CustomPaint(
=======
child: GestureDetector(
onPanStart: (details) => _onPanUpdate(details.localPosition),
onPanUpdate: (details) => _onPanUpdate(details.localPosition),
child: CustomPaint(
>>>>>>> REPLACE
</suggested_fix>
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
Build successful. APKs to test: https://github.com/fossasia/pslab-app/actions/runs/16853195845/artifacts/3726787761 |
Hello @rahul31124 , do you think is it better if we omit the "tap to edit" text and use that space to make the degree value a bit bigger? |
Hello @CloudyPadmal, I think it would be better to reduce the size of the 'Tap to edit' text and increase the size of the degree value. |
d67f06b
to
481c4e2
Compare
@CloudyPadmal, I have increased the size of the degree |
Fixes #2711
Changes
RoboticArmScreen
.Overflow

Checklist:
strings.xml
,dimens.xml
andcolors.xml
without hard coding any value.strings.xml
,dimens.xml
orcolors.xml
.Summary by Sourcery
Replace the external sleek_circular_slider with a custom ServoSlider widget and apply various UI refinements across the app
New Features:
Bug Fixes:
Enhancements:
Build: