-
-
Notifications
You must be signed in to change notification settings - Fork 602
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
Angular/NestJS Icons within a Nx Monorepo #2233
Comments
@lucas-labs as you already know the code structure a bit, do you have any idea of how we could solve the issue that we can always only select one icon pack at once? Initially, icon packs were introduced to avoid conflicts for some file icons. E.g. Right now, I only see the possibility of having either a generic icon, that covers both frameworks (as shown in #808) or choosing one of the frameworks as main framework and change the selected icon pack from time to time. |
Or give the ability to specify a "root directory" that uses the angular pack/nest pack. For ex you can say "if encountering folder "angular frontend" (configurable per project)" then assume the angular pack is on for any of the file associations inside it |
Hi, @PKief, the issue is that when the pack is not active, then the Since that info isn't available, then the icon definition is being created as if it was a normal icon, which is wrong. Only thing I can think of is modifying the I performed a quick test and yeah, it's working. The only caveat is that it would loop over the entire list of icons (again), adding a little bit of a performance overhead. Although, it would only happen when the user's config is updated, I don't know if I'm happy with that... but I'm kind of a performance freak, so it might be ok haha |
Yeah, iterating the whole list of icons might not be good regarding the performance. I'm not pretty sure if we should do that as this is rather an edge case than a common use case. As the list of icons will be growing over time, we should be careful about such iterations. |
Yeah I thought VSCode was using a visitor design pattern but instead it only takes the filename and possibly the parent and assigns a class to it, so while this would work for immediate children, other children would not get affected. Another idea comes to mind, since settings can be per workspace/project, wouldn't it work if, in the context of a monorepo, the user decides to open each subproject (for example, one project is angular themed and the other is nest themed) and assign a different pack? |
I'm not a fan either, mainly because there are a few iterations over the lists already happening. E.g.: I'll see if there's an elegant way to take advantage of one of those iterations and reuse them to solve the issue there. But that would probably be next week. In the meantime, since both |
Describe the bug
A clear and concise description of what the bug is.
To Reproduce
Steps to reproduce the behavior:
npx create-nx-workspace@latest --preset=empty
npx nx add @nx/angular
.npx nx add @nx/nest
.Expected behavior
Have the NestJS icons only appear for the NestJS files and the Angular icons only appear for the Angular files, regardless of the near identical naming convention.
Computer information (please complete the following information):
The text was updated successfully, but these errors were encountered: