-
-
Notifications
You must be signed in to change notification settings - Fork 36
Improve format for discovered services #209
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
Summary of ChangesHello @fotiDim, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request significantly improves the user experience on the peripheral detail page by enhancing how discovered Bluetooth services and their characteristics are presented. It introduces a structured, human-readable format for displaying this information and refactors the 'Copy Services' functionality to leverage this new format, while also relocating the button to a more intuitive position within the UI. Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
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.
Code Review
This pull request effectively improves the user experience by providing a more detailed format for discovered services and relocating the 'Copy Services' button for better accessibility. The new _formattedServices method is a great addition for creating a human-readable representation of services and characteristics.
My review includes a few suggestions to enhance the code quality:
- Refactoring duplicated logic for copying services into a separate method to improve maintainability.
- Simplifying the construction of a log message to make it more readable.
- Removing a redundant check in the
ServicesSideWidget.
These changes will make the code cleaner and easier to maintain. Overall, this is a solid improvement.
example/lib/peripheral_details/widgets/services_side_widget.dart
Outdated
Show resolved
Hide resolved
…rvices more clearly, including characteristics.
8078f78 to
6b28003
Compare
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.
Pull request overview
This PR improves the presentation of discovered BLE services by adding formatted output that includes both services and their characteristics with properties. The "Copy Services" button has been relocated from the Device Actions panel to the Services panel header for better UX.
Changes:
- Added a
_formattedServicesmethod that creates human-readable output showing services with nested characteristics and their properties - Moved the "Copy Services" button from Device Actions to the Services panel header as an icon button
- Updated service discovery logs to use the new formatted output for better readability
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| example/lib/peripheral_details/widgets/services_side_widget.dart | Added optional onCopyServices callback parameter and integrated a copy icon button in the Services panel header |
| example/lib/peripheral_details/peripheral_detail_page.dart | Implemented _formattedServices method for detailed service formatting, added _copyServicesToClipboard method, refactored service discovery logging to use formatted output, removed old "Copy Services" button from Device Actions, and wired up the new copy functionality |
| example/CHANGELOG.md | Documented the button relocation and enhanced services formatting |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
2f46844 to
12345fe
Compare
Update the peripheral detail page to format and display discovered services more clearly, including characteristics.