Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 423815

Summary: Outline filter should be smarter
Product: [ECD] Orion Reporter: John Arthorne <john.arthorne>
Component: ClientAssignee: Elijah El-Haddad <elijahe>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: antonm, curtis.windatt.public, elijahe
Version: unspecified   
Target Milestone: 5.0 M2   
Hardware: PC   
OS: Windows 7   
Whiteboard:

Description John Arthorne CLA 2013-12-11 09:06:32 EST
5.0 M1

- I have a script that contains a "getTree" function.
- I type "get" or "getTree" in the filter box in the outline but nothing is found

Nothing is found because what the outline actually contains is:

  Project.prototype.getTree

It feels like the filter matching should be smarter here.. maybe assume implicit leading wildcard on the filter term as a starting point.
Comment 1 Elijah El-Haddad CLA 2014-01-02 12:32:24 EST
Further improvements can be made in addition to the issue described by the previous comment.

1) The filtered outline doesn't preserve its state if a top level node is collapsed and then expanded. In other words, if the user triggers a collapse/expand all of the expanded node's children are shown regardless of whether or not they match the filter.

2) The filtering should not be done immediately after each keypress. Rather a timeout should be set and reset if another key is pressed. This will improve the responsiveness of the filter input UI when the user is quickly typing or deleting several characters.

3) The input text is always case-sensitive. This shouldn't be the default. As is the case in the eclipse outline filter popup, the input filter text should be case insensitive if it is all lowercase. If the user deliberately inputs an uppercase letter it is safe to assume that they want a case sensitive filter and only then should the filtering be case sensitive.
Comment 2 Elijah El-Haddad CLA 2014-01-02 13:51:17 EST
- Assumed implicit leading wildcard on the filter term
- Maintained filter state across user triggered outline node collapse/expand
- Delayed filtering by 200ms to prevent multiple calls to filtering functions if the user is quickly adding or removing characters
- Made filter case-insensitive by default. The filter will only be case-sensitive if the user inputs an uppercase letter.
- Refactored filtering functions in /web/orion/outliner.js

https://github.com/elijahe/orion.client/commit/9db8fc0ae142838700c1b407ffb78d9e1ba1692c
Comment 3 Elijah El-Haddad CLA 2014-01-02 14:49:19 EST
(In reply to Elijah El-Haddad from comment #2)
> - Assumed implicit leading wildcard on the filter term
> - Maintained filter state across user triggered outline node collapse/expand
> - Delayed filtering by 200ms to prevent multiple calls to filtering
> functions if the user is quickly adding or removing characters
> - Made filter case-insensitive by default. The filter will only be
> case-sensitive if the user inputs an uppercase letter.
> - Refactored filtering functions in /web/orion/outliner.js
> 
> https://github.com/elijahe/orion.client/commit/
> 9db8fc0ae142838700c1b407ffb78d9e1ba1692c

Pushed by Anton: http://git.eclipse.org/c/orion/org.eclipse.orion.client.git/commit/?id=f091ec0e1c0c6e2abeec83457beb923911eabd30