Skip to content
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

Additional status bar format options #150

Merged
merged 12 commits into from
Jul 15, 2024
Merged

Conversation

leoccyao
Copy link
Contributor

@leoccyao leoccyao commented Jan 2, 2024

An easy improvement, since the setting already exists. Code for handing numbers very similar to https://github.com/liamcain/obsidian-calendar-plugin/blob/master/src/settings.ts#L108-L122

Also removes a duplicate initiation of a status bar item (which has been creating additional spacing in the status bar)

Edit: also closes #151

Allows for more frequent updating of status bar text
without polling the Toggl API. So far, allows status bar
status to update on the minute, instead of a few seconds later.
No change in functionality, but opens the door to
custom format strings.
@leoccyao leoccyao changed the title Expose status bar char limit option Additional status bar format options Jan 3, 2024
@leoccyao
Copy link
Contributor Author

leoccyao commented Jan 3, 2024

Added a number more options for formatting the status bar. Increases the rate at which the status bar text is updated to once per second, though the Toggl API is still polled at the previous rate of every 6 seconds.

Partially remediates #5 (oops not #6, which refers to the sidebar), though does not yet allow full customization (a template string with substitutions such as "{project}" "{description}", such as how https://github.com/lukeleppan/better-word-count does it, would be a further improvement)

Also ran into the source of the bug for #151 while working on project in status bar!

Copy link

socket-security bot commented Jan 3, 2024

New dependencies detected. Learn more about Socket for GitHub ↗︎

Package New capabilities Transitives Size Publisher
npm/@types/[email protected] None 0 6.1 kB types
npm/[email protected] None 0 678 kB jsmreese

View full report↗︎

@mcndt
Copy link
Owner

mcndt commented Jan 13, 2024

Hi Leo, thanks for your PRs (also #149)!! I really appreciate other people building together on this.

I'm a bit in a slow mode when it comes to maintaining my Obsidian plugins, but I will try to take some time out of my schedule the next week or two to properly review and test your code, so that it can merge to main and ship to plugin users.

@mcndt mcndt self-requested a review January 13, 2024 17:26
@mcndt mcndt added the enhancement New feature or request label Jan 13, 2024
@leoccyao
Copy link
Contributor Author

Just wondering if there's any update on when my contribution can be reviewed!

Copy link
Owner

@mcndt mcndt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks pretty good! If you make a few changes I will release this one as well.

Promise I won't leave you hanging for weeks this time!

I'll hold off on releasing 0.12.0 for a moment in case you can resolve this PR this week, then I can bundle the changes together.

lib/config/PluginSettings.ts Show resolved Hide resolved
lib/config/PluginSettings.ts Show resolved Hide resolved
lib/util/millisecondsToTimeString.ts Outdated Show resolved Hide resolved
lib/toggl/TogglService.ts Outdated Show resolved Hide resolved
@mcndt
Copy link
Owner

mcndt commented Jul 15, 2024

LGTM, merging this into master and making a release today. Thanks for your contributions!!
I'll try to stay a bit more on top if it now so don't hesitate if you have more ideas for PRs.

@mcndt mcndt merged commit 0cb44a4 into mcndt:master Jul 15, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Side panel fails to update when running time entry has no project
2 participants