-
Notifications
You must be signed in to change notification settings - Fork 155
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
View Folders and logs #2283
View Folders and logs #2283
Conversation
📱 Scan the QR code below to install the build (arm64 only) for this PR. |
ab92e67
to
3ba6698
Compare
Add test Add test
137677b
to
5fa396d
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.
Note: I have tested using a Monospace
font, but the result is less nice to me.
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.
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.
Yes, I have seen that too, but user has to scroll a lot to see it, so instead I preferred to add "Save" and "Share" actions to be able to read the file in better conditions (i.e. on a computer).
I will iterate to adapt the size depending on the total number of lines.
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.
...folder/impl/src/main/kotlin/io/element/android/features/viewfolder/impl/file/ViewFileView.kt
Outdated
Show resolved
Hide resolved
...rageshake.impl.bugreport_BugReportView_null_BugReportView-Day-0_1_null_1,NEXUS_5,1.0,en].png
Outdated
Show resolved
Hide resolved
|
||
data class ViewFileState( | ||
val name: String, | ||
val lines: ImmutableList<String>, |
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.
Maybe this should be an AsyncData
and the UI should have a loader? For large files, the viewer will display an 'empty file' text for 1-2s before actually displaying the file contents.
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.
Yes, you're right, I've been a bit lazy here :). 4601e2a
* Ex: `01-23 13:14:50.740 25818 25818 D org.matrix.rust.sdk: elementx: SyncIndicator = Hide | RustRoomListService.kt:81` | ||
*/ | ||
@Composable | ||
private fun String.toColor(): Color { |
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.
❤️
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.
LGTM, just a few minor nits I've already mentioned. Also, the tests need to be fixed.
…`AsyncData<List<String>>` to properly handle loading and error states.
Quality Gate passedKudos, no new issues were introduced! 0 New issues |
Type of change
Content
Introduce a
viewfolder
module, able to navigate to a folder hierarchy and to display the content of any file (ofc it works better with TXT files).When viewing file, it possible to copy a line to the clipboard, or download or share the file.
Line numbers are displayed, as well as a basic syntactic coloration, using logcat colors.
Add a entry to the problem report screen so that user can inspect the logs that will be sent when reporting a problem.
viewfolder
may be used later in the developer screen to be able to navigate to thefiles
orcache
directories.Motivation and context
Closes #2276
Screenshots / GIFs
see recorded screenshot.
Tests
Tested devices
Checklist