Merged
Conversation
Adjust device list navigation keyboard shortcut to align with GNOME Human Interface Guidelines.
Use Cairo to create a utility class that allows the app to draw line graphs to display history.
There was a problem hiding this comment.
Pull request overview
This PR implements battery history visualization functionality for the Wattage application. The feature allows users to view historical data for power devices including charge and rate metrics over configurable time periods.
Key Changes
- Added chart drawing functionality using Cairo to visualize battery history
- Integrated UPower D-Bus GetHistory method to retrieve historical device data
- Added UI controls for configuring history type, timespan, and resolution
- Refactored code style (removed braces from single-line conditionals)
Reviewed changes
Copilot reviewed 19 out of 26 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| src/utils/chart-drawer.vala | New file implementing line graph visualization using Cairo |
| src/window.vala | Added history dialog UI, settings integration, and code style refactoring |
| src/utils/numeric-toolkit.vala | Removed static keyword from functions and added utility methods |
| src/utils/device-manager.vala | Made stringify methods public and added has_history property |
| src/interfaces/dbus-upower.vala | Added GetHistory D-Bus method and HistoryItem struct |
| src/ui/window.ui | Added Device History menu item and adjusted margins |
| src/ui/preferences-dialog.ui | Added subtitles to preference options |
| src/meson.build | Added cairo dependency |
| data/meson.build | Added schema compilation |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
a6e745e to
0ad6c2c
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.