wakatime / vscode-wakatime

Visual Studio Code plugin for automatic time tracking and metrics generated from your programming activity.
https://wakatime.com/vs-code
BSD 3-Clause "New" or "Revised" License
1.2k stars 133 forks source link

multiple status bar items with same id in DOM #355

Closed geoffolson closed 1 year ago

geoffolson commented 1 year ago

https://github.com/wakatime/vscode-wakatime/blob/c586fff6fbcada02b298516a879c5b9561e60b56/src/wakatime.ts#L123

Using createStatusBarItem method multiple times without passing a unique identifier generates multiple elements with the same id in the DOM. For the most part this has no side-effect, but can be an issue when using customized themes.

Screenshot 2023-06-05 at 11 06 10 PM

In this example there are two extra chevrons showing with a powerline theme

Screenshot 2023-06-05 at 11 05 21 PM

Using createStatusBarItem with a unique id would allow users to individually toggle on and off items when they right click the status bar as well. Currently can only toggle on and off all three items simultaneously with right clicking. Screenshot 2023-06-05 at 11 16 16 PM

alanhamlett commented 1 year ago

Fixed with 0f13598fc25465265daa75d9d784596cc0e819a5 and released in v24.0.11.