Add a NOT filter
A NOT filter would be nice to have - even better, a small icon on the left of any filter (such as !) to toggle on / off a NOT filter - reversing the current filter.
Blueprint information
- Status:
- Complete
- Approver:
- Mathieu Bastian
- Priority:
- Medium
- Drafter:
- Mathieu Bastian
- Direction:
- Needs approval
- Assignee:
- Mathieu Bastian
- Definition:
- Approved
- Series goal:
- Accepted for 0.7
- Implementation:
- Implemented
- Milestone target:
- 0.7beta
- Started by
- Mathieu Bastian
- Completed by
- Mathieu Bastian
Related branches
Related bugs
Sprints
Whiteboard
A NOT Operator is preferable than a NOT button for each filter because the API doesn't have to be changed that way and its more generic. Indeed a NOT operator would allow to do NOT on the whole filter tree instead only on a single filter.
NodeFilter and EdgeFilter have individual evaluate functions, ComplexFilter returns a Graph.
If we have
NOT(NodeFilter) or NOT(EdgeFilter) we just do not on the result of evaluate, it's easy.
If we have any other configuration like NOT(ComplexFilter) or NOT(NodeFilter(
To do that it should compare the complete graph (main view) with the input graph and add/remove nodes/edges. For that use case we need to have two filters: NOT for Nodes and NOT for Edges, as NOT on both doesn't really make sense.