UI: Add elbow in hierarchy line and change padding a bit #116200
No reviewers
Labels
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
8 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender#116200
Loading…
Reference in New Issue
No description provided.
Delete Branch "dr.sybren/blender:gui/tree-view-tweaks"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Two small alterations to the layout of Tree View components.
The bone collection hierarchy is
an upcoming feature, see #115945currently inmain
and will be included in 4.1. The bone collection tree can be found in the Armature properties panel.What do you think about extending the elbow down just a bit, to the bottom of the last row? Otherwise I get this sense that it is pointing at the last item and it then looks more special than its siblings before it.
Or... maybe the line could contain all the children? It then separates them from the parent a bit.
To me this looks like it's pointing at the last child item, and that there is something special about that item.
I don't remember seeing this kind of elbow in other user interface toolkits.
I found something similar in this GitHub design which is more rounded and lower.
https://user-images.githubusercontent.com/2313998/187719332-3ef9aa9e-476f-4e5a-93fa-5fbd203ece4a.png
But actually looking on the website I see just straight lines. Personally I find only the straight lines clear enough.
I find our indentation rules to be odd with us not indenting children consistently.
In the following "r0_child1" is a clearly a child of "root_0" and it is indented from its parent.
But what is with "r0c1_child0" (highlighted with yellow arrow)? It is child of "r0_child1" above it, yet it is not indented. If we add something into that will it then move to the right? So odd to show parents and children at same indentation level, especially when we do
use indentation.
@Harley wrote:
That works for me too. That's actually what I implemented earlier, but @nathanvegdahl and @JulianEisel weren't big fans.
Yeah, but it's indented because it has children of its own. Not because it is a child itself.
This confusion is indeed the main reason why we tried to improve the situation.
@brecht wrote:
For me, the current situation of the tree view is super confusing. The biggest issue IMO is the inconsistent indentation of the text that Harley described. Having a bit of a corner at the bottom of the hierarchy line also helped me to get things visually clearer.
I find that if there is proper indentation and a change of spacing then I don't feel the need for the top elbow, and the relationship line can even be reduced in color impact.
Looks good to me, Harley!
@brecht @JulianEisel what do you think of Harley's proposal? I think it looks good, and I'd be happy if we can land his changes.
I still find that the elbow gets in the way more than it helps. At a glance feels like it's pointing at the last item.
I can't really disagree with that.
I think the biggest problem is the indentation and this line is being used to make up for it.
I would advocate to take inspiration from the Outliner. After all, it is the OG tree view.
One of the main reasons I wanted to give feedback on the new nested bone collections UI is the fact that parent and child are at the same indentation level. This is visually super confusing. It doesn't matter much for a UI like the spreadsheet editor where there's only ever one level of nesting, but look at the Outliner. There is always space reserved on the left for a drop-down icon, even if the element has no children yet. When it gets children, its indentation doesn't change.
I agree with Brecht that the elbow is misleading. And like Harley said, once the indentation is correct, the elbows are no longer needed.
This seems to be rather subjective, then. The straight line currently in
main
to me feels like it's pointing to the next sibling, but only if the current item has any children. To me the elbow reads as "children end here", also at a glance. Not sure what's misleading about that.That's definitely true, the indentation is what really got me confused. I still don't quite like the lack of consistency between indentation of siblings with and without children. For me the line + elbow helps, but if that's not going to get approved, we need a better way to indent things.
In file browser softwares that have indent indicators other than just empty space, they usually have an elbow at the center of every entry, not just the bottom of the last one. That might feel more familiar, if nothing else. But most modern software seems to just use empty space. (Nautilus, Finder, Explorer)
This is of course subjective and I don't want to nitpicky about this stuff too much. But the elbow is a non-standard UI design, other UI toolkits seem to do fine without it, and I guess that's the objective reasoning.
In some cases it makes sense to deviate from standards, but it comes at a cost, and I don't see the justification here.
I personally don't need a big change in indentation for it to look a lot better:
@brecht The elbow was, as Harley also pointed out, more of an attempt at a workaround for the confusion caused by the inconsistent indentation. I chose to only use a horizontal line for the last child (instead of drawing one for each child, which is way more common) in order to keep things visually cleaner, and stay closer to the just-the-vertical-line design currently in
main
. If we want to avoid the elbow here, that's fine by me, but IMO we should then actually solve the underlying problem that I tried to solve with that elbow.@Harley Although it looks better, that wouldn't solve the issue of the big indentation difference of the labels, depending on whether the node has any children or not.
I see both the pros and the cons for the elbow approach. For some reason the treeview in Geometry nodes is less confusing for me than it is in the Bone Collections. Maybe because the 'sections' are more naturally defined there. Have you considered using the Collections icon inside Bone Collections as well? The 'storage box' icon makes it easier for me to see at a glance where a new collection starts.
Sorry, but taking a closer look at this area of code, I keep finding problems that make any solution a bit more complicated. For example with current main, using 2D zooming the relationship lines go out of horizontal alignment with the disclosure triangles. And the width of the lines stay the same as well and get too thin:
This impacts your PR in that the "elbows" have lengths that are incorrectly sized with local zooming.
I think the following fixes most of the problems I am seeing:
In a nutshell, the local zoom "aspect" is calculated from the region. It is used for line width calculation and is passed to the line drawing routine so everything stays aligned when you zoom. Your elbow is made a little smaller and is a bit lower to look less like it is pointing at the last item. The lines drawn with GPU_PRIM_LINE_STRIP rather than GPU_PRIM_LINES to avoid one position.
The current code is using the dashed line shader for some reason, even though it is set to "undashed" and uses a single color. So the above replaces it with GPU_SHADER_3D_UNIFORM_COLOR. The line color is made just a bit less bright. And the children are indented a bit from their parents. The result looks like this:
Thanks @Harley that looks a lot better indeed.
There is still an issue with root nodes without children and without icon. They crawl up too close to the left edge.
It isn't clear to me where that childless root element should go. I tried it aligned to the text of the items with children and it looked weird there. Looked a bit better aligned nicer to the downward arrow, but still a bit awkward. Is there a position that looks best for you?
I was playing with this in the Spreadsheet editor, but it might be different from that in your capture. Is there an easy way for me to view that "Bone Collections" list?
@dr.sybren
The attached is everything from the above but also moves over the childless root item:
dd4263d640
toc231d7cb35
Thanks @Harley ! I've updated the PR with your diff, and updated the screenshots in the description.
To further improve this I agree with Demeter that indentation should use same logic as Outliner, meaning items should always have space on the left that may or may not be occupied by collapse icon. Because while this looks good on given two examples in the screenshots, on different "setups" it looks weird and we need to think about every possible scenario
This is what it will look like with collection with children collapsed (ignore the wrong-facing icon).
Its unclear why two items that are in the same line of hierarchy, they're siblings, have different indentation?
This is how Outliner does it, it always leaves space for hierarchy, whether object has it or not
This looks much cleaner and easier to reach in my opinion. Current indentation logic is very hard to read in Asset Browser, because names aren't lined up and you need to keep moving your eyes left and right to read names if you're reading in order
To demonstrate better way this is how I think it should be drawn:
This would be quite a different pull request, though. My goal was to have some simpler improvements that take away the immediate pain points.
I agree that this is something to improve. However, I'd be quite happy if this PR could be accepted & landed, and then later someone could look into improving things even further. I'm not a member of the UI module, though, so I'll leave that decision to @Harley and @JulianEisel .
@JulianEisel @pablovazquez
Do you guys mind weighing in here? I think they are really hoping for a change in this release and this might have risk of stalling.
I am personally neutral on the elbow itself and don't mind it there or not. I don't think it causes harm and I can see how it might help some users.
But I do quite like the changes to indentation in how it helps group children better.
One outstanding issue is the indentation of childless root elements. I think most people are preferring that they indent so that their names are aligned with items that do have children. Seems fine to me and we could do this all at once.
Yup, we are.
Just a note: this is for all childless elements, not just roots.
Could the fixes for zooming be split off? This should be fixed either way, independent of this. It's hard to tell which parts fix the zooming and which parts implement the proposed design change.
The "elbow" was meant to mitigate visual issues with the hierarchy, because we couldn't agree on the best solution for the indentation. It would be good to see a proposal for the indentation as well, maybe we can address it that way still.
@jenkm didn't you have a proposal for this once?
I just did so with #117420. If we approve that then I can then update this PR to remove conflicts.
You're using a very, very large collapse-icon.
The main element is the label. First, just place the labels with indents, this should already work and show the hierarchy.
The collapse chevron is a secondary element, its visual impact should not exceed that of the label. Adding chevrons should not affect the readability of the tree and hierarchy, it is an additional element. Adding a chevron should not change the label's indentation.
You should see the label first, not the bold icon.
If you use the icon+label, the chevron can be larger, due to the icon, which is relatively large. The Outliner is quite balanced in this regard.
Also, in addition to the size, look at the color of the chevron and the label, the label should be brighter for more impact.
Chevron does not mean another level of hierarchy or a new group, the chevron may or may not be there, you should clearly see the indentation and the chevron should not interfere with that.
The chevron can take up less space in width, the vertical hierarchy lines will be closer to each other, and the indent size will be reduced. I think you can do it in half the width.
With smaller chevrons, no more elbow, and consistent label indentation, the bone collection tree could look something like this:
@dr.sybren - I updated this PR to remove conflicts with new changes to main that I pushed that sizes and positions the hierarchy lines correctly as the region is zoomed - #117420. So it should now only contain the changes related to line drawing and indentation. If you prefer that I should not have altered your PR, just let me know.
Nope, this is absolutely fine, and I appreciate the help!
@jenkm I've edited your comment to put the images side by side. If you don't like me doing that kind of stuff, please let me know.
As there is no description of your changes, this is what I think you did:
Let me know if I missed anything.
I like all of those changes, so thanks! For me it becomes clearer that the elbows are actually a good idea. The currently-in-main straight lines always feel like "pointing down" to elements that may not be directly related (f.e. "Arm.L (Tweak)" has a line pointing to Arm.R"). The little elbow at the bottom say more "this is grouped together", and demarking a clear end of that group. With the rounded elbows of @jenkm this is even stronger.
This looks quite good to me, but I guess we'd need to see it in practice to look at the different possible cases that can cause confusion. @Harley do you think you could work on this? Seems like the animation module really wants to get this in for the 4.1 release.
Yes, will just post my own PR for this, rather than updating Sybren's, using this last capture as design.
Harley Acheson referenced this pull request2024-01-30 00:52:58 +01:00
This was superseded by #117654.
Pull request closed