-
Notifications
You must be signed in to change notification settings - Fork 9
Add a toggle to add timestamps to relative dates #292
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
Conversation
src/js/lib/pages/github/all.js
Outdated
| // Set up timestamp format conversion | ||
| const applyTimestampFormatPeriodic = AllPages.applyTimestampFormat(); | ||
| setTimeout(() => applyTimestampFormatPeriodic(), 500); | ||
| setInterval(() => applyTimestampFormatPeriodic(), 2000); |
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'm not too sure how this works, but a constant loop to do this seems a bit excessive. Could we just apply timestamp on page load rather than every 2 seconds?
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.
so I think this is to allow for things like "load more" button presses, so we probably want it at least somewhat periodically? Can definitely slow it down, though - let me know what you think!
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.
Most of the changes that k2 makes on typical pages are done repeatedly, but I don't know how frequent it needs to be. I bet we could consolidate them all down to like every 5 sec and no one would notice a difference
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.
That sounds good to me, thanks!
|
okay i simplified the timestamp stuff to only one interval, and set it to 5 seconds |
|
🚀 Released in version 1.5.17 🚀 |
|
|
||
| "name": "K2 for GitHub", | ||
| "version": "1.5.15", | ||
| "version": "1.5.16", |
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.
No need to manually update these anymore. There is a GH action that will automatically bump them.
|
|
||
| // Set up timestamp format conversion | ||
| setTimeout(() => AllPages.applyTimestampFormat(), 500); | ||
| setInterval(() => AllPages.applyTimestampFormat(), 5000); |
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 will be applied every 5 seconds. Is there a reason it's refreshed so often?
As the title says.
This was 99% Cursor, not me, so feel free to rip it apart. Seems to work okay though.
Look at the bottom of your sidebar (example, on this PR!) and try toggling timestamps on and off! That's all this does, but it seems helpful - https://expensify.slack.com/archives/CDXCTAJQP/p1766012917820919