Improvements to mappings and automate manual steps
hbons opened this issue · 5 comments
Right now adding/changing icons in VS Code feels like it needs too many manual steps.
Issues:
icons.ttf
causes unresolvable conflicts and blocks having multiple PRs open in progress. It should probably not be kept in the git repo being a binary file.- Can't easily see what icons share a mapping in
mapping.json
- Need to manually add an arbitrary number to mapping.json` and its hex value to codicons.ts which is error prone
icons.ttf
needs to be manually committed to the main vscode repo
Possible improvements:
- Add CI to check for errors
- When a PR is merged or a commit made, CI can publish
dist/icons.*
to the Releases page. This way we keep the repo free of conflicts and can have multiple ongoing PRs open at the same time - Add icons.ttf to the gitignore so it doesn't get committed.
- Use JSON lists to group names in
mapping.json
. This way we can see which icon names map to the same icon, and we don't need to add numbers. This will also make the mappings much easier to edit. - Remove the manual numbering in the mapping.json. This can be autogenerated when the previous suggestion is implemented.
- Automatically create a PR to the vscode repo with the new
icons.ttf
- Automatically update vscode-docs
MAGIC LEVEL:
- Launch a web instance for each with the new icons for review.
We can ask Lee to help us with this.
cc @daviddossett
Priorities:
1️⃣ Automate build and publish content ofdist
to ReleasesVersion number increment or timestampSummary of commits/PRs- 1️⃣ Automatic PR to
microsoft/vscode
with codicons.ttf
stretch goal: automate codicons.ts file generation in vscode repo
-
2️⃣ Improve mapping.json
- Group icon aliases
Automate (hex) numbering
-
3️⃣ Automate updating of relevant
microsoft/vscode-docs
pages -
4️⃣
Github Pages site to browse icons
-
stretch goal: automate codicons.ts file generation in vscode repo
I've completed the following:
dist/
is now in.gitignore
- use
gh-pages.yml
to publish the website (putting back dist/) codicons.ttf
is uploaded as a build artefact for each build job- a draft Release gets made automatically when pushing a new annotated tag, including all commit messages since the previous release.
codicon.ttf
artefact is included in Releases
On the vscode side I've split up the list of icons into a library and a derived list. The library is a separate file that the codicons build generates with a new script: scripts/convert-to-ts.js
. I've made sure any mixed-in aliases got moved to the derived list. vscode merges these lists at runtime, so everything works as normal, but without the conflicts.
The only missing step is to automatically create a PR to microsoft/vscode
repo when a new commit happens on main. There seems to be an authentication issue here and we probably need to flip a setting or get a token from somewhere to make it work.
The rest of the ideas above are stretch goals. Having automated PRs to VS Code is the major time saver.
@mrleemurray would love your help with this last step. :)
cc @daviddossett