-
-
Notifications
You must be signed in to change notification settings - Fork 489
Document 3rd party theme installation in "Advanced Usage" #2024
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
Arduino IDE comes with a selection of officially maintained and supported built-in themes: - Light - Dark - High Contrast Although these three should be sufficient for most users, some users may have other requirements or preferences for the Arduino IDE UI theming. Fortunately, because it is built on the Eclipse Theia IDE framework, Arduino IDE supports VS Code theme extensions. This makes a large variety of 3rd party themes available to the user, and even the ability to create custom themes. Instructions for installing VS Code theme extensions are here added to the "Advanced Usage" document hosted in the repository.
The documentation should contain that the VSIX should be renamed to ZIP and extracted into the plugins
folder.
Although using the VSIX also works, unzipping it is more efficient as Theia needs to extract the VSIX every time to a temporary folder and resolve it when loading the VSIXs. This will cause IDE2 to start slower.
Here is the log when a VSIX is read and not an extracted VSIX:
2023年04月20日T08:39:18.574Z root INFO [akamud.vscode-theme-onedark-2.3.0.vsix]: trying to decompress into "/private/var/folders/z1/xkw1yh5n7rz4n8djprp1mdn80000gn/T/vscode-unpacked/akamud.vscode-theme-onedark-2.3.0.vsix"...
2023年04月20日T08:39:18.927Z root INFO [akamud.vscode-theme-onedark-2.3.0.vsix]: decompressed
We must decide whether to provide more straightforward steps or a faster IDE2 start. I am OK with both.
Update:
Here is the Theia (1.31.1) code that does the extraction: https://github.com/eclipse-theia/theia/blob/v1.31.1/packages/plugin-ext-vscode/src/node/plugin-vscode-file-handler.ts#L52
I actually only discovered that installation of the .vsix
file was possible today (the support for this installation method was introduced starting from 2.0.4).
From my experience providing support to the Arduino community, I have learned that there is an unfortunate lack of fluency in working directly with file systems. The .vsix
approach to installation is significantly more user friendly than the alternative manual unzip approach:
- Unzipping a file that doesn't have a
.zip
file extension is somewhat difficult. - Installing a folder is more difficult than a file because the user must avoid the addition of an extra parent folder in the installation structure, or the loss of the essential extension folder.
So I do think it is worth adding some startup overhead in exchange for getting a more user friendly installation. But it does depend on how much overhead we are talking about.
I see that decompression is skipped if the extracted extension is already present in the temporary folder:
2023年04月20日T16:01:18.510Z root INFO [21BlueDolphins.bluedolphin-0.4.0.vsix]: trying to decompress into "c:\Users\per\AppData\Local\Temp\vscode-unpacked21円BlueDolphins.bluedolphin-0.4.0.vsix"...
2023年04月20日T16:01:18.510Z root INFO [ftsamoyed.theme-pink-cat-boo-1.3.0.vsix]: trying to decompress into "c:\Users\per\AppData\Local\Temp\vscode-unpacked\ftsamoyed.theme-pink-cat-boo-1.3.0.vsix"...
2023年04月20日T16:01:18.510Z root INFO [johv.parchment-light-1.8.0.vsix]: trying to decompress into "c:\Users\per\AppData\Local\Temp\vscode-unpacked\johv.parchment-light-1.8.0.vsix"...
2023年04月20日T16:01:18.510Z root INFO [21BlueDolphins.bluedolphin-0.4.0.vsix]: already found
2023年04月20日T16:01:18.510Z root INFO [ftsamoyed.theme-pink-cat-boo-1.3.0.vsix]: already found
2023年04月20日T16:01:18.512Z root INFO [johv.parchment-light-1.8.0.vsix]: already found
Although the decompression may have to be repeated periodically after the operating system clears the temporary folder (which is never done automatically on Windows), it seems this will significantly mitigate any overhead on the IDE startup.
Due to the asynchronous nature of the processes, I'm not sure how to determine the exact overhead from the use of .vsix
files in the installation, but my crude experiments on a very low spec machine with three .vsix
themes installed (I don't expect the average user to have even that many installed) seem to indicate that, even when a decompression operation is required, the overhead is not significant.
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 verified the steps, and all works. Thank you!
I do think it is worth adding some startup overhead in exchange for getting a more user friendly installation.
Thank you for the explanation. I wanted to make sure we are all aware of it.
Motivation
Arduino IDE comes with a selection of officially maintained and supported built-in themes:
Although these three should be sufficient for most users, some users may have other requirements or preferences for the Arduino IDE UI theming.
Change description
Fortunately, because it is built on the Eclipse Theia IDE framework, Arduino IDE supports VS Code theme extensions. This makes a large variety of 3rd party themes available to the user, and even the ability to create custom themes.
Instructions for installing VS Code theme extensions are here added to the "Advanced Usage" document hosted in the repository.
Other information
Preview the rendered content here:
https://github.com/per1234/arduino-ide/blob/theme-installation-instructions/docs/advanced-usage.md#3rd-party-themes
Related
Reviewer checklist