Skip to content

Collection module: Separate expanding/collapsing from selecting#20284

Open
deekayhd wants to merge 3 commits intodarktable-org:masterfrom
deekayhd:collection_expand
Open

Collection module: Separate expanding/collapsing from selecting#20284
deekayhd wants to merge 3 commits intodarktable-org:masterfrom
deekayhd:collection_expand

Conversation

@deekayhd
Copy link
Contributor

@deekayhd deekayhd commented Feb 6, 2026

This is a proposal for issue #19452.
In the collection module, clicking on a row both selects all images in the clicked hierarchy branch and expands/collapses the hierarchy tree. As a consequence, when navigating to a row deep down in the hierarchy, all images in the hierarchy above are unnecessarily loaded to the light table, especially when the setting "use single click in the collections module" is active. The expected behavior is that expanding and selecting are separated: Clicking the expander triangle only expands/collapses the level, and clicking on the row text only selects the images.

The idea in this fix is to determine from the click position, if the click was on the expander or anywhere else in the row.
Due to the indentation of lower hierarchy levels, the expander area in a row is not fixed. Thus, the indentation is calculated from the hierarchy depth and the basic indentation.

The behavior changes as follows:

  • Expanding/collapsing only happens when clicking on the expander triangle
  • Images are only selected for display when clicking on the row text.
  • clicking left of the expander does no longer select or expand/collapse.

For the calculation of the indentation I assume a hard-coded expander width in pixels. I do not know if this value could be determined at runtime, as it may be changed by css customization.

closes #19452

@wpferguson
Copy link
Member

So IIUC we're trying to make single click work like double click? And again IIUC we're "guessing" where the widgets are going to be and we're not even sure that it will survive a CSS modification?

My thoughts

  • There is single click and double click for a reason because they solve separate problems. Single click works well in level hierarchies and double click works in nested hierarchies.
  • darktable runs on 3 different operating systems, with 5 different windowing systems and countless window managers. I'm pretty sure trying to calculate (guess?) where the widgets are isn't going to work well. We have enough issues getting one widget to work the same across all the combinations.

@deekayhd
Copy link
Contributor Author

deekayhd commented Feb 6, 2026

So IIUC we're trying to make single click work like double click?

I would say we are tying to make the widget work like it is expected by a user to work (compared to other software).

And again IIUC we're "guessing" where the widgets are going to be

The basic indentation can be read from the GTK framework. My understanding is that the size of the separator has a fixed value in the framework, as well, but it is not exposed directly. And yes, it seems that it can be changed by css. This is also the critical point I see.
My hope is that some core developer experienced with GTK may comment and maybe provide some input if this is feasible. Unfortunately, I do not know who of the developers this would be. I could not find anybody in your RFC #20197 .

  • There is single click and double click for a reason because they solve separate problems

Sure, there probably are good reasons why it was implemented as it is, but unfortunately, there is no explanation I could find.

  • Single click works well in level hierarchies and double click works in nested hierarchies.

Could you please explain what you mean by level and nested hierarchies?

  • darktable runs on 3 different operating systems, with 5 different windowing systems and countless window managers

Agreed, this is critical. And I think that the fix only works and should be merged if the relevant parameters can somehow be derived from the framework. Again, I am hoping for input.
Maybe, with GTK4 this is irrelevant, anyway?

Who would be an expert for GTK among the core developers?

@wpferguson
Copy link
Member

Could you please explain what you mean by level and nested hierarchies?

Single folder imports versus recursive imports.

widget work like it is expected by a user to work

So, maybe it's a documentation problem? Use the proper click sequence based on your filmroll organization?

@deekayhd
Copy link
Contributor Author

deekayhd commented Feb 6, 2026

So, maybe it's a documentation problem? Use the proper click sequence based on your filmroll organization?

Maybe, but you can still run into the issue, if you use not only film rolls with single folder import, but additionally also other parameters, like folders, hierarchical tags, etc. for the selection of collections.

@wpferguson
Copy link
Member

but you can still run into the issue

I suppose that could be true. I've been using it for a lot of years and haven't had any problems.

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.

Clicking on directory name vs. expander in collection panel should have different effects

2 participants