BrandonKirbyson / VSCode-Animations

A VSCode extension that adds animations to the editor
https://marketplace.visualstudio.com/items?itemName=BrandonKirbyson.vscode-animations
MIT License
200 stars 6 forks source link

Support for other CSS Injection Extensions #23

Closed 73 closed 1 year ago

73 commented 1 year ago

Hi,

you are coupling VSCode Animations pretty tight to Custom CSS and JS Loader. But it is not the only extension that supports injection of custom CSS and JS into VSCode. I use Apc Customize UI++ for its presets and then the Custom CSS and JS Loader, because it is required by VSCode Animations. So I have both extensions installed.

Since the two extensions somehow get in the way of each other, I have to configure the link to VSCode Animation's stylesheet to the Apc settings on every update. My settings look like this:

  "vscode_custom_css.imports": [
    "file:///Users/user/.vscode/extensions/brandonkirbyson.vscode-animations-1.0.14/dist/updateHandler.js"
  ],
  "apc.imports": [
    "/Users/user/.vscode/extensions/brandonkirbyson.vscode-animations-1.0.14/dist/updateHandler.js",
    "/Users/user/.files/vscode/custom.css"
  ],

It would be great if VSCode Animation would support Apc Customize U++ or drop the hard dependency to the Custom CSS and JS Loader. Thank you very much for your had work. I enjoy VSCode more because of your extension.

BrandonKirbyson commented 1 year ago

Ok I totally agree with this. I was already thinking about this since a few other people were asking and it just makes sense to not rely on one extension so much. Also Apc Customize UI++ works better for people on windows I think. Wish I could just make my own injection in this extension but that would conflict with ones people use so I won't.

Here is my idea on how to implement it, I make an enum setting:

image

(Default is Custom CSS and JS so people that already have this extension will be able to keep using it with no problems when this option gets added)

With this then I can change what the commands do, for example Animations: Install Animations would be able to work for both extension and it could auto install for both too. The way I would validate that the user has the extension they want installed would probably be similar to the install notification where it asks to install the extension.

image

Let me know what you think of this idea and thanks for helping make this extension better!

73 commented 1 year ago

I would be totally fine with that. But what means "other"? Will a link to js-File of VSCode Animations automatically updated if the extension is updated and I chose "other"?

BrandonKirbyson commented 1 year ago

Yeah actually maybe I won't have an other option. I was thinking in case I miss some obscure extension someone uses they could just do it themself but for now probably better to keep it 2 options and add more if requested.

BrandonKirbyson commented 1 year ago

Thanks so much for the idea, finally published the new version 2.0.0 that implements all this.

73 commented 1 year ago

@BrandonKirbyson thank you. I did have the auto-install option enabled when the update came but I works when manually configured. I noticed there was an inconsistency in the description of the settings:

image

This lead to following questions: If I set the lower setting to APC, will I get auto updates? If I activate auto-install, will it install Custom CSS despite me having APC already?

BrandonKirbyson commented 1 year ago

Ok thanks for pointing that out, I'll fix that soon.

Basically now install method will have it auto install to either Custom CSS or Apc and auto install only disabling the automatic popup when the extension is not installed. Does that makes sense?