Skip to content
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

Improvements to mappings and automate manual steps #196

Open
hbons opened this issue Oct 19, 2023 · 5 comments
Open

Improvements to mappings and automate manual steps #196

hbons opened this issue Oct 19, 2023 · 5 comments
Assignees
Labels
engineering Build setup

Comments

@hbons
Copy link
Member

hbons commented Oct 19, 2023

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

@hbons hbons added the engineering Build setup label Oct 19, 2023
@hbons hbons self-assigned this Oct 19, 2023
@hbons hbons changed the title Improvements to mappings and automise manual steps Improvements to mappings and automate manual steps Nov 29, 2023
@hbons
Copy link
Member Author

hbons commented Nov 29, 2023

Priorities:

  • 1️⃣ Automate build and publish content of dist to Releases
    • Version number increment or timestamp
    • Summary 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

@mrleemurray
Copy link

mrleemurray commented Nov 30, 2023

  • stretch goal: automate codicons.ts file generation in vscode repo

@hbons hbons mentioned this issue Feb 26, 2024
9 tasks
@hbons
Copy link
Member Author

hbons commented Mar 11, 2024

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

@hbons
Copy link
Member Author

hbons commented Mar 12, 2024

Separate issue for the mapping improvements: #239

@hbons
Copy link
Member Author

hbons commented Mar 12, 2024

Link #232, #234, #235, #236

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
engineering Build setup
Projects
None yet
Development

No branches or pull requests

2 participants