The collapsed nodes are at least as large as the uncollapsed node. This should fix T63079.
William Reynish (billreynish) Brecht Van Lommel (brecht) Jacques Lucke (JacquesLucke)
- Maniphest Tasks
- T63079: Collapsed nodes should not shrink
- rBSf54db0fa057e: UI: Collapsed nodes have the same width as uncollapsed nodes
rBf54db0fa057e: UI: Collapsed nodes have the same width as uncollapsed nodes
Just changing it for display will break the resizing operator, it will not match.
I think miniwidth could be eliminated entirely, it's not clear to me why collapsed nodes should have a different width.
What is the expected behavior for resizing? I assume it should be possible to resize both in open and collapsed state and the size should remain consistent except for when the open state is too small for the circular arrangement in collapsed state. Then the node in collapsed state may be larger (the minimum width necessary to draw both circular sides without overlap).
To me it seems to work well - it does pretty much exactly what I'd expect - the nodes keep the correct width when you collapse them:
If you elongate a node and then collapse, the collapsed state still inherits the new width, which I think is correct:
And it seems to work well with 'mega-nodes' too:
So I would just say, from a functionality perspective it works great!
Only some minor issues. After those small cleanups, the patch looks good to me.
I'd prefer to slowly move away from declaring all variables at the top. Better try to minimize the vertical scope of a variable.
minor indentation issue (use spaces for "extra" indentation).
Indentation is still not fixed:
However, I'll fix it before I merge it.
I found another minor issue, but that does not seem worth the hassle for now.
Is the value clamping of minwidth of practical relevance, e.g. doing lots of collapses shrinks the node?
I recommend you to set "editor.renderWhitespace": "all" in vs code. That makes it easier to see these issues.
Yes I should've done that. Thanks for the tip.