extensions
extensions copied to clipboard
[toggl-track] Add menu bar command
Description
There's only one thing I couldn't make to work perfectly - instant lifecycle update on menuBar. Something takes a bit longer to refresh on the extensions logic, than the async calls take, so the menuBar goes to sleep and it needs to wait the intervalTime (which is 10 seconds) to update the bar or the user has to click it to refresh the display.
One dirty fix would be to add something like this to both onActions:
await new Promise((r) => setTimeout(r, 1000));
Not sure if I want to go that route.
Anyways, this PR adds a great functionality to this extension and also brings a heap of fixes.
Here's the changelog:
[Bug Fixes] - 2024-07-10
- Do not show currently running time entry in the recent time entries list
[Bug Fixes] - 2024-07-05
- Fix running time entries not showing project details
[New Feature] - 2024-07-05
- Add ability to view, start, or stop existing time entries from the Menu Bar Solves #13165
Screencast
Menu bar when running:
Expanded menu when running:
Expanded menu when stopped:
Previously Start/Stop Timer Entry Window didn't show the running time entry details, because of coding error (here's an example from live plugin version):
Fixed:
Checklist
- [x] I read the extension guidelines
- [x] I read the documentation about publishing
- [x] I ran
npm run buildand tested this distribution build in Raycast - [x] I checked that files in the
assetsfolder are used by the extension itself - [x] I checked that assets used by the
READMEare placed outside of themetadatafolder
Thank you for your contribution! :tada:
🔔 @franzwilhelm @bkeys818 @michaelfaisst @teziovsky you might want to have a look.
You can use this guide to learn how to check out the Pull Request locally in order to test it.
You can expect an initial review within five business days.
@bkeys818
Great work! The refactoring is done super well!
Thanks! I'm new to Raycast Plugins development, so this was fun.
- You may want to add a user setting that defines whether the time entry name and/or duration is displayed in the menu bar.
Done ✅ I've added some extra options, if somebody wanted to see client/project also. The default is description only:
- I recommend calling the menu bar refresh command after starting or stopping a time entry to insure that it's updated as soon as possible.
Could you direct me how it's done? I can't find any methods for refreshing the menu bar in Raycast documentation.
The changes look great!
I'm actually not sure how to manually refresh the menu bar. You may want to reach out to the Raycast Developer Discord.
The changes look great!
I'm actually not sure how to manually refresh the menu bar. You may want to reach out to the Raycast Developer Discord.
Can we get this PR merged then?
I've added some workarounds for the menu bar to refresh, also fixed some bugs I've found and cleaned up the codebase even further.
@bkeys818 I've fixed all the things you've mentioned
@mil3na I guess we can go forward with the merge? 🙌
As soon as you fix the conflicts, I can do one final review, yes :D
This was fun! :D Conflicts are solved
As soon as you fix the conflicts, I can do one final review, yes :D
@mil3na just checking, are we doing the final review anytime soon? I'd love to avoid another conflict solving session 😅
Published to the Raycast Store: https://raycast.com/franzwilhelm/toggl-track
:tada: :tada: :tada:
Such a great contribution deserves a reward, but unfortunately we couldn't find your Raycast account based on your GitHub username (@lukebars). Please link your GitHub account to your Raycast account to receive your credits and soon be able to exchange them for some swag.
Am I still eligible for the swag credits after linking my account? 😆
Yes!