-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
Save logs data in downloads and show meaningful path #40777
Conversation
@ishpaul777 Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
Reviewer Checklist
Screenshots/VideosAndroid: NativeAndroid: mWeb ChromeiOS: NativeiOS: mWeb SafariMacOS: Chrome / SafariMacOS: Desktop |
@@ -70,7 +72,7 @@ function BaseClientSideLoggingToolMenu({shouldStoreLogs, capturedLogs, file, onS | |||
</TestToolRow> | |||
{!!file && ( | |||
<> | |||
<Text style={[styles.textLabelSupporting, styles.mb4]}>{`path: ${file.path}`}</Text> | |||
<Text style={[styles.textLabelSupporting, styles.mb4]}>{`path: ${displayPath}/${file.newFileName}`}</Text> |
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.
I think we dont need file and displaypath both here, pass the display path (${displayPath}/${file.newFileName}`) only and build it in parent component
@@ -38,6 +38,7 @@ function ClientSideLoggingToolMenu() { | |||
onEnableLogging={() => setFile(undefined)} | |||
onDisableLogging={createAndSaveFile} | |||
onShareLogs={shareLogs} | |||
displayPath="/Downloads" |
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.
use constant for /Downloads
@@ -28,6 +28,7 @@ function ClientSideLoggingToolMenu() { | |||
onEnableLogging={() => setFile(undefined)} | |||
onDisableLogging={createFile} | |||
onShareLogs={shareLogs} | |||
displayPath="/New Expensify" |
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.
use constant
@@ -83,15 +88,16 @@ function ProfilingToolMenu({isProfilingInProgress = false}: ProfilingToolMenuPro | |||
[totalMemory, usedMemory], | |||
); | |||
|
|||
const newFileName = `Profile_trace_for_${pkg.version}.cpuprofile`; |
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.
i think this can be moved outside the component
return ( | ||
<BaseProfilingToolMenu | ||
pathToBeUsed={RNFS.DocumentDirectoryPath} | ||
displayPath="/New Expensify" |
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.
use costant whereever we use /Downloads
and /New Expensify
@@ -4713,6 +4713,9 @@ const CONST = { | |||
|
|||
MAX_TAX_RATE_INTEGER_PLACES: 4, | |||
MAX_TAX_RATE_DECIMAL_PLACES: 4, | |||
|
|||
DOWNLOADS_PATH: '/Downloads', | |||
NEW_EXPENSIFY_PATH: '/New Expensify', |
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.
@ShridharGoel Whats you ETA for resolving above comments |
It is done locally, will be testing once again tomorrow and then will update. |
@ishpaul777 Updated. |
@ShridharGoel Can you please resolve conflicts, @techievivek Can you please help running a adhoc build once conflicts resolved 🙏 |
src/libs/getFolderPathSuffix.ts
Outdated
folderSuffix = ''; | ||
break; | ||
case CONST.ENVIRONMENT.ADHOC: | ||
folderSuffix = ' AdHoc'; |
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.
use constants we have in CONST.ENVIRONMENT
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.
The existing ones don't have the same values which we need. Should we go ahead with new constants?
Co-authored-by: Ishpaul Singh <104348397+ishpaul777@users.noreply.github.com>
package-lock.json
Outdated
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.
why? 🤔
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.
Not sure how this change got added, will revert
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.
@ShridharGoel Let's revert this one so we can move forward with the merge.
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.
@techievivek Updated.
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.
Looks good! we just need to uncommit unnecessary package-lock.json
file changes. Approving because i'll be OOO until monday
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.
Looks good, thanks.
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
🚀 Deployed to production by https://github.com/marcaaron in version: 1.4.71-6 🚀
|
Details
Save logs data in downloads and show meaningful path.
Fixed Issues
$ #40213
PROPOSAL: #40213 (comment)
Tests
QA Steps
PR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)myBool && <MyComponent />
.src/languages/*
files and using the translation methodSTYLE.md
) were followedAvatar
, I verified the components usingAvatar
are working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG)
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)Design
label and/or tagged@Expensify/design
so the design team can review the changes.ScrollView
component to make it scrollable when more elements are added to the page.main
branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTest
steps.Screenshots/Videos
Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
MacOS: Desktop