rionmonster / Glyphfriend

Glyphfriend is a Visual Studio Extension to add previews for various icon/glyph fonts to Visual Studio.
Other
156 stars 27 forks source link

Add Support for Library-based Toggles / Filtering #77

Closed rionmonster closed 7 years ago

rionmonster commented 7 years ago

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 :

Glyphfriend in Action

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 :

rionmonster commented 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:

  1. User opens a Glyphfriend-supported HTML flavored file.
  2. User right-clicks anywhere within the file to reveal the normal context menu.
  3. The context menu contains a Glyphfriend top level item that can be drilled into.
  4. Hovering over this will reveal a list of checkboxes, each with the appropraitely supported libraries
  5. Toggling one of these will update the list of glyphs that are served to the user.

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.