-
Notifications
You must be signed in to change notification settings - Fork 951
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
Export timeline log feature #1533
base: master
Are you sure you want to change the base?
Export timeline log feature #1533
Conversation
Very cool feature! |
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.
Hey @denis-remitly - thanks for this! I really like it a lot. I have two suggestions. I'd love if you can tackle both in this PR before we merge, but only one of them is really blocking (I think an empty timeline should be an empty array, rather than nothing at all).
) | ||
console.log(`Exported timeline log to ${downloadDir}`) | ||
} else { | ||
console.error("There is nothing to export.") |
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.
suggestion: @denis-remitly - what do you think about still exporting an empty array here instead? That would be my preference.
function downloadLog() { | ||
if (commands.length > 0) { | ||
const homeDir = os.homedir() | ||
const downloadDir = path.join(homeDir, "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.
issue: if ~/Downloads
doesn't exist, this fails silently. Can we either give the user an alert, or perhaps prompt them to set a download location instead of just assuming this path will exist for them?
I don't think we need to block on this because it doesn't crash the app, but if we can add that to this PR or quickly follow up, that would be great.
Please verify the following:
yarn build-and-test:local
passesREADME.md
(or relevant documentation) has been updated with your changesDescribe your PR
This PR adds the ability to export the timeline log into a JSON file.