-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Add Report a Problem functionality #8605
base: main
Are you sure you want to change the base?
Conversation
{filename} | ||
</Text> | ||
<Text style={styles.logSize}> | ||
{`TXT ${size}KB`} |
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 is a helper function to get the size as a string https://github.com/mattermost/mattermost-mobile/blob/main/app/utils/file/index.ts#L311
@@ -117,12 +117,24 @@ - (NSDictionary *)constantsToExport { | |||
[self getRealFilePath:filePath resolve:resolve reject:reject]; | |||
} | |||
|
|||
RCT_EXPORT_METHOD(getFileSize:(NSString *)filePath |
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.
Same applies to iOS
fos.close() | ||
promise?.resolve(zipFile.absolutePath) | ||
} catch (e: Exception) { | ||
promise?.reject("Error creating ZIP file", e) |
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.
Should we attempt to delete the tempDir and contents if there is an error?
@@ -52,6 +52,7 @@ export interface Spec extends TurboModule { | |||
removeListeners: (count: number) => void; | |||
|
|||
getRealFilePath: (filePath: string) => Promise<string>; | |||
getFileSize: (filePath: string) => Promise<number>; |
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.
Adding a comment here so that is not forgotten when removed
test/setup.ts
Outdated
deleteFile: jest.fn(), | ||
getFileSize: jest.fn().mockResolvedValue(100), |
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.
Should use expo-filesystem
/update-branch |
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.
need to check the dependency version on android and it should be good to go, the other comment is non blocking
@@ -58,7 +58,8 @@ dependencies { | |||
implementation 'androidx.window:window:1.2.0' | |||
implementation 'androidx.window:window-core:1.2.0' | |||
implementation 'androidx.window:window-rxjava3:1.2.0' | |||
|
|||
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.7.1' |
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.
this is causing snyk to fail, I think a new version needs to be used
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.
Thank you! For some reason I am having trouble logging in into snyk...
<ScrollView | ||
horizontal={true} | ||
contentContainerStyle={styles.logsContainer} | ||
showsHorizontalScrollIndicator={false} |
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.
should we set alwaysBounceHorizontal to false when loading or when the items are less than x?
Summary
Add report a problem functionality. This needs a particular server version to show all the capabilities (see related PR).
Figma file: https://www.figma.com/design/vd5328lXOFcEdLkKT6Mlrg/MM-61217-Report-a-problem-UX?node-id=1-7
More information in the ticket
Ticket Link
Fix: https://mattermost.atlassian.net/browse/MM-61217
Related PR
Server/Web: Coming soon
Release Note