Closed rionmonster closed 7 years ago
Just to follow-up this train of thought, another probably less invasive approach would be to implement a context menu within HTML pages that would function as follows:
If possible, we could persist these values so that if a given user only wanted support for Bootstrap, they could toggle off the others and then use it as expected. The hope being that these values would be persisted at the user-level.
The libraries themselves could be automatically populated by using the names of the folders during the serialization process. A separate list would be serialized and then imported, similar to the extensions and deserialized at run-time.
Since the latest release, one of the potential issues is that the default autocompletion list simply gets filled up when the Intellisense is first kicked in, which can be overwhelming as it consists of thousands of items :
What's the Problem?
Although this is the expected behavior and intended, it simply may be too many items to appear at once, especially if the user only really needs to use one of the supported libraries like Font Awesome or Bootstrap.
There likely needs to be some type of mechanism in place for trimming this down, either through a manual (i.e. menu / option settings) or automatic process.
Initially, a few approaches come to mind, which may be decent options :
Add Library Menu Toggles - Consider adding a settings area for Glyphfriend within the options area of Visual Studio, which would allow the user to opt out of certain libraries via checkboxes. This would occur within the package when the glyphs are deserialized, and it would just filter out those within any disabled libraries.
Take Advantage of Visual Studio 2017's Intellisense Filtering - The new Intellisense Filtering feature found in Visual Studio 2017 could be an easily approachable way of filtering out specific libraries based on the user's preference. It would display a default icon for each of the available libraries (or perhaps just a single Glyphfriend icon) and by selecting that the user could see all of those classes. This feature would be for Visual Studio 2017 only
Consider "Fuzzy" Library Matching - Consider implementing a system that would check if a solution or project was loaded, use a series of expressions to check if certain libraries were present (i.e. bootstrap.css, font-awesome.css, etc.) and only enable those libraries. This is very similar to an earlier approach used by Glyphfriend, however it was limited by several factors (i.e. files that were re-named, CDN referenced files, and files that did not have projects / solutions).