Skip to content

Discussion: An easier filtering UI #153

@stamminator

Description

@stamminator

I love the idea behind custom filters in CodeNav, especially how it hooks into Roslyn and allows fine-tuned customization. However, I do find it very difficult to use. While the Filtering page on the wiki does help, it reveals some usability and logic issues.

  1. Visible and HideIfEmpty contradict each other. Needing to have Visible=true in order for HideIfEmpty=true to work doesn't make sense, and a typical user would never figure out how to get that working without brute force trial-and-error or carefully following the wiki.
  2. The UI allows the user to configure definitionally invalid filters. For example, the UI gave me no indication what Ignore does or that it applies to only regions and namespaces. If I select, for example, Kind = Class, the Ignore checkbox is still selectable even though it doesn't apply. Similarly, if I select Access = Public, I can still select Kind = Region even though regions have no concept of access.

I'd like to propose some modifications to the UI that improve things. This is a very rough concept I threw together in Excel just to illustrate a few ideas.

Image
  • Certain properties could reactively become disabled if a selection of another property of that same filter record makes it non-applicable. For example, Access is disabled when Namespace, Region, or anything to which access doesn't apply is selected.
  • The Modification property defines what display characteristic is being changed. Perhaps it could be a dropdown, which would allow adding new types of modifications. The individual options that populate this dropdown could be dynamically disabled based on other selections. For example, selecting a Kind other than Region or Namespace would make the Ignored option unselectable.
  • In similar fashion, if you decide that you want to support more conditions other than "Is Empty", you could replace that column with something like a Condition column, where the user could select other options besides just "Is Empty". At that point, both the matching conditions and the modifications would be highly extensible.
  • I'd love to be able to make empty regions appear as half transparent so I can see at a glance that the region exist, but is empty. A design such as this would support that.

Since bookmarks also control some styling and are manually assigned rather than rule-based, one way to prevent them from clashing could be to make sure that Filter Rules and Bookmarks don't touch the same properties. Here is an admittedly ugly concept for how bookmarks could add a physical bookmark icon (just like regular VS bookmarks do) and control something like border color, leaving background color to be controlled by Filter Rules.

Image

These are obviously just concepts, and I haven't thought through the technical implementation, but I just thought I'd share some ideas.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions