Skip to content

Add an expand/collapse hover button in search results tree view - #4318

Open
elsazac wants to merge 2 commits into
eclipse-platform:masterfrom
elsazac:expandcollapsehover
Open

Add an expand/collapse hover button in search results tree view#4318
elsazac wants to merge 2 commits into
eclipse-platform:masterfrom
elsazac:expandcollapsehover

Conversation

@elsazac

@elsazac elsazac commented Aug 31, 2026

Copy link
Copy Markdown
Member

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

elsazac and others added 2 commits August 31, 2026 22:51
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.
@eclipse-platform-bot

Copy link
Copy Markdown
Contributor

This pull request changes some projects for the first time in this development cycle.
Therefore the following files need a version increment:

bundles/org.eclipse.search/META-INF/MANIFEST.MF

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 patch
From b57e5feb348f55f8e8639fb4fe002dad427e8cc1 Mon Sep 17 00:00:00 2001
From: Eclipse Platform Bot <platform-bot@eclipse.org>
Date: Mon, 31 Aug 2026 20:00:07 +0000
Subject: [PATCH] Version bump(s) for 4.42 stream


diff --git a/bundles/org.eclipse.search/META-INF/MANIFEST.MF b/bundles/org.eclipse.search/META-INF/MANIFEST.MF
index 726e86f7ca..969c9033d3 100644
--- a/bundles/org.eclipse.search/META-INF/MANIFEST.MF
+++ b/bundles/org.eclipse.search/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
 Bundle-Name: %pluginName
 Bundle-SymbolicName: org.eclipse.search; singleton:=true
-Bundle-Version: 3.19.0.qualifier
+Bundle-Version: 3.19.100.qualifier
 Bundle-Activator: org.eclipse.search.internal.ui.SearchPlugin
 Bundle-ActivationPolicy: lazy
 Bundle-Vendor: %providerName
-- 
2.55.0

Further information are available in Common Build Issues - Missing version increments.

@github-actions

Copy link
Copy Markdown
Contributor

Test Results

   858 files  ±  0     858 suites  ±0   39m 32s ⏱️ - 10m 54s
 8 210 tests ±  0   7 967 ✅ ± 0  243 💤 ± 0  0 ❌ ±0 
20 401 runs   - 131  19 772 ✅  - 98  629 💤  - 33  0 ❌ ±0 

Results for commit ff39558. ± Comparison against base commit c0e3550.

@BeckerWdf

Copy link
Copy Markdown
Member

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.

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.

@elsazac

elsazac commented Sep 1, 2026

Copy link
Copy Markdown
Member Author

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.

@elsazac

elsazac commented Sep 2, 2026

Copy link
Copy Markdown
Member Author

@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 iloveeclipse left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't like two things, therefore -1 for merge:

  1. 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.
  2. 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.

@BeckerWdf

Copy link
Copy Markdown
Member

I don't like two things, therefore -1 for merge:

  1. 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.
  2. 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..

@trancexpress

Copy link
Copy Markdown
Contributor

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.

The new buttons actually expand the tree element fully, instead of only one level - which the existing buttons do?

@iloveeclipse

Copy link
Copy Markdown
Member

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants