-
-
Notifications
You must be signed in to change notification settings - Fork 757
Improve UI and UX for Debug Log Recorder #1914
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
Merged
Merged
Conversation
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
This commit significantly revamps the Debug Log Recorder screen with a more modern Material Design 3 look and feel, and introduces several UX improvements.
Key changes:
- **New Layout:** The `debug_recorder_activity.xml` has been completely redesigned using `CoordinatorLayout`, `NestedScrollView`, and `MaterialCardView` to create a more structured and visually appealing interface. This includes:
- A hero section with an icon, title, and subtitle.
- Dedicated cards for sensitive information warning, session path, and log files.
- Improved styling for log file items in `debug_recorder_logfile_item.xml`.
- **Edge-to-Edge Display:** Enabled edge-to-edge display for `RecorderActivity` for a more immersive experience.
- **Action Bar Behavior:** The bottom action bar now hides when scrolling down and reappears when scrolling up.
- **Discard Functionality:** Added a "Discard" button and corresponding `discard()` function in `RecorderViewModel` to allow users to delete the recorded log files and close the screen.
- **Improved Information Display:**
- The number of log files and the total compressed size are now more prominently displayed.
- File sizes are formatted using `Formatter.formatShortFileSize`.
- **Loading State:** The `isWorking` flag in `RecorderViewModel.State` now more accurately reflects the loading/processing state, and the UI updates accordingly.
- **Theme Update:** Removed the `AppThemeFloating` style as `RecorderActivity` no longer uses a floating dialog theme.
- **String Resources:** Added new string resources for the updated UI elements.
- **Code Refinements:**
- Updated `RecorderViewModel` to handle the new `isWorking` state and provide formatted compressed size.
- Adjusted `LogFileAdapter` to match the new item layout.
- Implemented edge-to-edge insets handling in `RecorderActivity`.
This commit removes the `getFormattedCompressedSize` method from the `UiState` data class within `RecorderViewModel.kt`. This method was not being used and has been removed to simplify the codebase.
Member
Author
This commit refactors the `RecorderViewModel` to improve the management of recorded log files and their compressed archives. Key changes: - Renamed `recordedPath` to `sessionPath` for clarity. - Introduced `zipPath` to explicitly manage the path of the compressed log archive. - Ensured that both the session directory and the zip file are deleted when the "discard" action is triggered. - Added logging for warnings if deletion of the session directory or zip file fails.
If creating the session log directory in public external storage fails, this commit introduces a fallback mechanism to attempt creating it in private internal storage. This ensures that session logging can proceed even if public external storage is unavailable or unwritable.
This commit updates the padding in the debug recorder activity and log file item layouts. These changes aim to improve the visual spacing and layout of the debug recorder interface.
This commit removes the unused string resources `debug_debuglog_size_label` and `debug_debuglog_size_compressed_label` from the Welsh, Irish, and Esperanto localizations.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
c: Debug
Debugging related features/issues
enhancement
New feature, request, improvement or optimization
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.

This commit significantly revamps the Debug Log Recorder screen with a more modern Material Design 3 look and feel, and introduces several UX improvements.
Key changes:
debug_recorder_activity.xmlhas been completely redesigned usingCoordinatorLayout,NestedScrollView, andMaterialCardViewto create a more structured and visually appealing interface. This includes:debug_recorder_logfile_item.xml.RecorderActivityfor a more immersive experience.discard()function inRecorderViewModelto allow users to delete the recorded log files and close the screen.Formatter.formatShortFileSize.isWorkingflag inRecorderViewModel.Statenow more accurately reflects the loading/processing state, and the UI updates accordingly.AppThemeFloatingstyle asRecorderActivityno longer uses a floating dialog theme.RecorderViewModelto handle the newisWorkingstate and provide formatted compressed size.LogFileAdapterto match the new item layout.RecorderActivity.See #1912