Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Browsers have tab groups(spaces, workspaces, islands).
I thought that it will be very convenient to group my tabs by projects in those tab groups, and say to the wakatime extension to use the tab group name as a project name, instead of using the "Custom project name" feature(not very convenient) or logging the
<<LAST PROJECT>>(not very accurate).So this is what was done in this PR.
"Tab groups" settings were added to Options page:

Now you can enable the "Use tab's group name as project name" checkbox(disabled by default to keep the backwards compatibility), and the tab group name, if the tab is in a group, of course, will be used as a project name. For example, if the group name is "My Company Name", then you'll see on the Wakatime dashboard all the activity from the tabs within this tab group logged under the name "My Company Name".
Also you have the checkbox "Log only grouped tabs activity"(off by default, to keep the backwards compatibility). With this option all the activity from ungrouped tabs will be ignored. For example, if you want to have some tabs for your personal use, and don't want Wakatime to log them, you can have them ungrouped, and enable this checkbox. In this case, the Wakatime extension will log only activity from grouped tabs(for example from "My Company Name" group), and the activity from ungrouped tabs(your personal use) will be ignored.
Worth to mention:
Features were tested on Google Chrome, Firefox, Opera, Yandex Browser.
In Chrome and Firefox everything works out-of the box, as described above.
If you're using Opera, be aware that Opera has two types of groups:
You need to use the workspaces, not tab islands, because tab islands are anonimous(don't have names).
Also the "Log only grouped tabs activity" won't be available for you, because in Opera every tab is in a workspace(group).
If you're using Yandex browser
You'll have to go through some extra setup, as Yandex Browser doesn't support the default chrome's tab groups feature.
Instead it has something like Opera's workspaces. In Yandex Browser they called it "space". Also, unlike Opera, their API don't provide the space name. So you'll have to manually match the space id to a name. You'll be provided with instructions when you'll open the Options page.