Add an expand/collapse hover button in search results tree view - #4318
Add an expand/collapse hover button in search results tree view#4318elsazac wants to merge 2 commits into
Conversation
When hovering over a top-level project node in the tree layout, an option appears showing expand or collapse based on the node's current state. This is to individually expand or collapse tree parent items.
|
This pull request changes some projects for the first time in this development cycle. An additional commit containing all the necessary changes was pushed to the top of this PR's branch. To obtain these changes (for example if you want to push more changes) either fetch from your fork or apply the git patch. Git patchFurther information are available in Common Build Issues - Missing version increments. |
I like it from a functional point of view. But I am very unsure about the UI interaction. For me this feels very hidden and I also don't know another place in Eclipse where we have this "icon appears on hover". Why not simply adding the expand collapse icons to the view's toolbar. |
Expand All and Collapse All for the projects are already available in the toolbar, so adding the same icons again for each individual project could be confusing for users.Thats why separated it away from the toolbar. The action was specifically to allow users to fully expand just one project, rather than the entire tree. so felt it would be convenient to have it somewhere near the project itself. but I am open to suggestions if there’s a more better way to represent this within the existing view. |
|
@BeckerWdf Just wanted to check if you have any concerns with this approach, or if you think it would be better to move the action into the project’s context menu instead? |
iloveeclipse
left a comment
There was a problem hiding this comment.
I don't like two things, therefore -1 for merge:
- There are collapse/expand buttons on the left side of every tree element. The current PR adds more code only to replicate the functionality already available. It is more code to maintain with little added benefit for users.
- Main issue. If this should be considered a cool feature: for the IDE consistency, it should be available for all tree clients in the IDE without clients code change (but with possibility to opt-out) and it should be controlled by a dedicated IDE preference so that it can be switched on/off if needed.
I agree.. |
The new buttons actually expand the tree element fully, instead of only one level - which the existing buttons do? |
Correct, I've missed that the proposed "expand" button does more. My main issue is however is the consistency with the rest of the IDE. |
The search results view (File Search, Java Search, Git Search, etc.) in tree layout mode provides only two toolbar options called Expand All and Collapse All. This result in expand and collapse of entire tree at once. If one wants to expand or collapse fully, only a single project individually, it is not possible. This is really hard when there are lot of projects in workspace.
This PR adds an expand/collapse hover option to the search results tree view. when the user hovers over a top-level project node in the tree layout, a small button now appears immediately to the right of the project name. The button shows the expand icon if the project is collapsed, or the collapse icon if it is already expanded. clicking it fully expands or collapses that project. The button disappears automatically when the cursor moves away.
icon.mov