UI: Fix scrollbar highlighting outside of regions #105973

Merged
Harley Acheson merged 3 commits from guishe/blender:scrollbar-visibility-sidebar into main 2023-08-22 00:47:19 +02:00
Contributor

Scroll bars have an extended action zone that helps highlight
when they can be used as a slider.

However, this extended action zone can overlap other regions,
which can cause the bars to appear active, while the cursor is in
other regions.

To address this issue the scroll bar's action zone is no longer
extended over other regions.

Scroll bars have an extended action zone that helps highlight when they can be used as a slider. However, this extended action zone can overlap other regions, which can cause the bars to appear active, while the cursor is in other regions. To address this issue the scroll bar's action zone is no longer extended over other regions.
Author
Contributor

Here is an image showing the before/after.

image

Also here a video showing the before and after.
video

Here is an image showing the before/after. ![image](/attachments/d8365725-71ce-44ab-b510-8cb5bc70b05d) Also here a video showing the before and after. [video](/attachments/11ae5650-a785-45fa-934b-8a8ed25f101a)
Guillermo Venegas force-pushed scrollbar-visibility-sidebar from c5f1244fde to b8b82d8fbe 2023-03-22 22:46:46 +01:00 Compare
Guillermo Venegas reopened this pull request 2023-03-22 23:10:33 +01:00
Guillermo Venegas force-pushed scrollbar-visibility-sidebar from b8b82d8fbe to 88c82facc6 2023-03-22 23:27:49 +01:00 Compare
Guillermo Venegas force-pushed scrollbar-visibility-sidebar from 88c82facc6 to d93b53703f 2023-03-22 23:29:07 +01:00 Compare
Guillermo Venegas changed title from UI: Fix scrollbar showing on sidebar focus to UI: Fix scrollbar highlighting outside of regions 2023-03-22 23:30:10 +01:00
Guillermo Venegas force-pushed scrollbar-visibility-sidebar from d93b53703f to 1c99a9d5cf 2023-03-22 23:46:17 +01:00 Compare
Pablo Vazquez added this to the User Interface project 2023-03-23 00:40:51 +01:00
Pablo Vazquez added the
Module
User Interface
label 2023-03-23 00:41:10 +01:00
Member

I prefer this behavior too, but I don't think there will be consensus regarding it. I have proposed the same a very long time ago, but the idea was not accepted.

When the mouse approaches a scrollbar from a different area (normally when moving right to left), you are not liking that the scrollbar becomes wider and more active-looking before it even crosses into the area. But that is considered by some to be a feature and not a bug. Even the gradual nature of the changing scrollbar width, versus an instantaneous change from narrow to wide, is something that is wanted by some.

In the times when your intention is to interact with a scrollbar it does help the aiming for it with the current behavior. It does add extra movement if you are are intending to just transit over it. And it is weird when your are really intending to interact with something near the edge of a different area. But the instantaneous width change is more distracting in many of these cases.

Again, I agree with you as I am someone who prefers instantaneous feedback and doesn't mind abrupt changes. But am warning you that this might not be wanted.

I prefer this behavior too, but I don't think there will be consensus regarding it. I have proposed the same a very long time ago, but the idea was not accepted. When the mouse approaches a scrollbar from a different area (normally when moving right to left), you are not liking that the scrollbar becomes wider and more active-looking before it even crosses into the area. But that is considered by some to be a feature and not a bug. Even the gradual nature of the changing scrollbar width, versus an instantaneous change from narrow to wide, is something that is wanted by some. In the times when your intention is to interact with a scrollbar it does help the aiming for it with the current behavior. It does add extra movement if you are are intending to just transit over it. And it is weird when your are really intending to interact with something near the edge of a different area. But the instantaneous width change is more distracting in many of these cases. Again, I agree with you as I am someone who prefers instantaneous feedback and doesn't mind abrupt changes. But am warning you that this might not be wanted.
Author
Contributor

Ah, I did not know all that, thanks for the comment.

Now knowing that this is a behavior expected by users, the patch could be changed to add this proposed behavior depending on a user preference, with the previous behavior set as default.

Ah, I did not know all that, thanks for the comment. Now knowing that this is a behavior expected by users, the patch could be changed to add this proposed behavior depending on a user preference, with the previous behavior set as default.
Member

Ah, I did not know all that, thanks for the comment.

No worries.

Now knowing that this is a behavior expected by users, the patch could be changed to add this proposed behavior depending on a user preference, with the previous behavior set as default.

Adding new preferences is also a steep climb, as it should be. We always try to do the "right thing" without the user needing to choose something.

Personally I would leave this PR as it is. It is in the review queue and will be looked at eventually. Just don't take it personally if not accepted.

> Ah, I did not know all that, thanks for the comment. No worries. > Now knowing that this is a behavior expected by users, the patch could be changed to add this proposed behavior depending on a user preference, with the previous behavior set as default. Adding new preferences is also a steep climb, as it should be. We always try to do the "right thing" without the user needing to choose something. Personally I would leave this PR as it is. It is in the review queue and will be looked at eventually. Just don't take it personally if not accepted.
Guillermo Venegas force-pushed scrollbar-visibility-sidebar from 1c99a9d5cf to 753baece9f 2023-05-30 20:21:05 +02:00 Compare
Member

@guishe:

Earlier in this thread I mentioned that although I personally prefer the behavior proposed in this PR, the current behavior is by-design and was preferred by others. Mostly for the avoidance of sudden visual changes.

However, we just discussed this among the UI Module and well all agree that your proposed behavior is actually what we want. The current behavior can give the impression of influence at a time when the operation cannot proceed. As in you see the scrollbar getting bolder when you can't actually move the scrollbar. Having a more sudden transition when approaching from outside the region will also give better feedback of area crossing.

This is good news. Unfortunately, although we want the result that this PR gave, you will find that this particular solution no longer applies. This is because we no longer test against the rect of the scroller action zones, but instead use the region's scroller verts. This way they are properly positioned and sized when 2D scaled - #108295

So basically we do want this result but you have a think of a different way to do it. If you are unsure, I can investigate and point you toward a solution within a day or two.

@guishe: Earlier in this thread I mentioned that although I personally prefer the behavior proposed in this PR, the current behavior is by-design and was preferred by others. Mostly for the avoidance of sudden visual changes. However, we just discussed this among the UI Module and well all agree that your proposed behavior is actually what we want. The current behavior can give the impression of influence at a time when the operation cannot proceed. As in you see the scrollbar getting bolder when you can't actually move the scrollbar. Having a more sudden transition when approaching from outside the region will also give better feedback of area crossing. This is good news. Unfortunately, although we want the result that this PR gave, you will find that this particular solution no longer applies. This is because we no longer test against the rect of the scroller action zones, but instead use the region's scroller verts. This way they are properly positioned and sized when 2D scaled - #108295 So basically we do want this result but you have a think of a different way to do it. If you are unsure, I can investigate and point you toward a solution within a day or two.
Author
Contributor

Thanks for letting me know, I'll take a look at the changes that have happened to the code since then!

Thanks for letting me know, I'll take a look at the changes that have happened to the code since then!
Guillermo Venegas force-pushed scrollbar-visibility-sidebar from 753baece9f to 5741a5d433 2023-08-16 02:19:41 +02:00 Compare
Guillermo Venegas added 1 commit 2023-08-16 02:20:06 +02:00
Guillermo Venegas added 1 commit 2023-08-16 02:26:43 +02:00
Author
Contributor

I also included for the horizontal scroll bars, I can reverse it if necessary

I also included for the horizontal scroll bars, I can reverse it if necessary <video src="/attachments/1d791085-4d24-4a61-94ae-b514172bd73c" title="2023-08-15 18-27-42.mp4" controls></video>
Member

@guishe thank you for the patience and working on this! Such a nice improvement.

@guishe thank you for the patience and working on this! Such a nice improvement.
Member

Yes, this is the exact behavior we decided upon. Basically for the following three reasons:

  • We don't want to show change to the scrollbars where they can't be used
  • It shows a directionality hint; which side of the scroller it is influencing
  • Increased feedback for the crossing of regions

I also included for the horizontal scroll bars, I can reverse it if necessary

We definitely want this for both horizontal and vertical scrollbars.

Some of the tests for is_vertical and is_horizontal look unnecessary. Do we ever get a scroller that is on the right edge but is not vertical, or on the bottom and not horizontal? Or do these get out of sync or we don't set one or the other?

Unrelated to this patch (and a problem for a while), but related to scrolling, we should look at the user experience on the right side of tool bars. When a scrollbar is needed for those they take up the same position as the zone for dragging it wider and narrower. There are times when it is difficult to move the scroller because it wants to drag left/right instead. Again, not a problem introduced in this PR and not something I broke recently.

Yes, this is the exact behavior we decided upon. Basically for the following three reasons: * We don't want to show change to the scrollbars where they can't be used * It shows a directionality hint; which side of the scroller it is influencing * Increased feedback for the crossing of regions > I also included for the horizontal scroll bars, I can reverse it if necessary We definitely want this for both horizontal and vertical scrollbars. Some of the tests for is_vertical and is_horizontal look unnecessary. Do we ever get a scroller that is on the right edge but is not vertical, or on the bottom and not horizontal? Or do these get out of sync or we don't set one or the other? Unrelated to this patch (and a problem for a while), but related to scrolling, we should look at the user experience on the right side of tool bars. When a scrollbar is needed for those they take up the same position as the zone for dragging it wider and narrower. There are times when it is difficult to move the scroller because it wants to drag left/right instead. Again, not a problem introduced in this PR and not something I broke recently.
Harley Acheson requested review from Harley Acheson 2023-08-17 01:26:16 +02:00
Author
Contributor

Some of the tests for is_vertical and is_horizontal look unnecessary.

Some regions can have 2 scrollbars (like main in outliner), az->region->v2d.scroll tags where are the vertical and horizontal at the same time, its needed, action zones for scrollers only knows its orientations

Checking if AZEdge edge; can be used (cannot, is a union between AZEdge and AZScrollDirection)

>Some of the tests for is_vertical and is_horizontal look unnecessary. Some regions can have 2 scrollbars (like main in outliner), `az->region->v2d.scroll` tags where are the vertical and horizontal at the same time, its needed, action zones for scrollers only knows its orientations Checking if `AZEdge edge;` can be used (cannot, is a union between AZEdge and AZScrollDirection)
Guillermo Venegas added 1 commit 2023-08-17 05:16:45 +02:00
Author
Contributor

Updated the logic of the tests, the scrollbar az to be able to be at the top, first it should be a horizontal scrollbar az, etc.

Updated the logic of the tests, the scrollbar `az` to be able to be at the top, first it should be a horizontal scrollbar az, etc.
Harley Acheson approved these changes 2023-08-22 00:45:25 +02:00
Harley Acheson left a comment
Member

Awesome!

Awesome!
Harley Acheson merged commit 4f6785774a into main 2023-08-22 00:47:19 +02:00
Guillermo Venegas deleted branch scrollbar-visibility-sidebar 2023-08-22 03:32:06 +02:00
Sign in to join this conversation.
No reviewers
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
3 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#105973
No description provided.