Tuesday, October 6, 2015

gui design - Logical Operator Icons


I'm building a WPF UI for configuring some complex business rules; each rule can have many conditions, so I figured I would include a drop-down list of logical operators so that the user could have the flexibility required by the business case.


Basically a rule has a logic and a behavior, and under each rule, each condition also has a logic:




  • Rules' behavior is one of the following:



    • RuleConditionsMustPass: this means a rule is said to pass when the logical operations of all conditions under it evaluate to true.


    • RuleConditionsMustFail: this means a rule is said to pass when the logical operations of all conditions under it evaluate to false.




  • Rules' logic can be one of the following:



    • And: all rules with an "And" logic must pass.

    • Or: among all rules with an "Or" logic, at least one must pass.

    • Xor: among all rules with an "Xor" logic, only one must pass.





  • Similarly, conditions' logic works the same way: given a "RuleConditionsMustPass" behavior, the rule will pass if all "And" conditions pass and if among all "Or" conditions at least one passes and among all "Xor" conditions only one passes.




What I'm wondering, is whether the icons I've chosen for each logical operator make any sense from a UX point of view, and if using a TreeView for this rule configuration feature is the best approach:


enter image description here


Clicking the green "+" button here would add a condition under that rule; clicking the red "-" button would delete that rule. I realize the ComboBox.ItemTemplate is a bit off here, when I'm done with it I'll make sure all items in the dropdown have the same width, and I won't be using the enum names in the directly in the UI.



Answer



The icons are alright, but I would consider the terminology in general.




  • OR - Same as "match any of the following rules"?

  • AND - Same as "match all of the following rules"?

  • XOR - Same as "match one of the following rules"? At least if there are only 2 options to pick from... If there are more than 2 it gets more complicated.


Maybe it's enough just to have Match all / match one / match any / match none to cover all options, together with the possibility to nest rules.




Example (Itunes Smart Playlists):


Logical operator flow


No comments:

Post a Comment

technique - How credible is wikipedia?

I understand that this question relates more to wikipedia than it does writing but... If I was going to use wikipedia for a source for a res...