-
Notifications
You must be signed in to change notification settings - Fork 275
Sam/logbox #5748
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
Sam/logbox #5748
Conversation
This comment was marked as outdated.
This comment was marked as outdated.
Sorry, something went wrong.
34ece8c to
57f1ad7
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.
The lint cleanups in app.js need to go a bit deeper. I haven't reviewed the second commit, since I'm not the assigned reviewer.
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.
Take all this performance stuff, and move it to its own file. Do not attach it to the global scope, but instead export const pnow = and so forth for each performance function. If we want to do performance analysis in the future, we can just import { pstart, pend, ... } from '../../perf.ts' or whatever you call the new file, rather than grabbing it from the global scope.
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 reason why this is in global scope was for the convenience in putting it in any repo like login-ui. Admittedly since most of our code is in the webview, this doesn't help much although it would be nice to have some equivalent in there as well.
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.
Indeed, it does need an explanation.
This is needed for our logging integration. When we replace console.log with our own custom logging, we use global.clog to keep forwarding logs to the normal place.
This is dumb. Instead, our logging infrastructure should use named variable like export const realLog = console.log, and then call realLog() in the logging system. That avoids polluting the global scope, and makes it clear where this is being used (TypeScript becomes aware of what's going on).
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.
Optional: This should really be makePeriodicTask, since that avoids overlapping work in cases where the async function takes more that 3s.
CHANGELOG
Does this branch warrant an entry to the CHANGELOG?
Dependencies
noneRequirements
If you have made any visual changes to the GUI. Make sure you have: