File Browser: Make full file name label draggable #104830

Closed
Julian Eisel wants to merge 8 commits from JulianEisel:temp-file-browser-full-label-drag into main

When changing the target branch, be careful to rebase the branch in your fork to match. See documentation.
Member

Previously only the icon of a file could be dragged in the list display
modes, the name label would invoke box select. This made dragging quite
finicky. I've seen this cause quite some frustration, especially when
the file browser is used as a regular editor to drag data from into
other editors.

Instead follow the Outliner (and some other file browsers like the macOS
one): Dragging on empty space invokes box select, dragging on the name
or icon invokes drag & drop of the item.

Note that 1e9564864c and 6da512f0bc were needed to prepare this change.

Previously only the icon of a file could be dragged in the list display modes, the name label would invoke box select. This made dragging quite finicky. I've seen this cause quite some frustration, especially when the file browser is used as a regular editor to drag data from into other editors. Instead follow the Outliner (and some other file browsers like the macOS one): Dragging on empty space invokes box select, dragging on the name or icon invokes drag & drop of the item. Note that 1e9564864c and 6da512f0bc were needed to prepare this change.
Julian Eisel added the
Module
User Interface
label 2023-02-16 17:23:04 +01:00
Julian Eisel added 1 commit 2023-02-16 17:23:16 +01:00
735ac5a8e7 File Browser: Expand draggable area to full file name
Previously only the icon of a file could be dragged in the list display
modes, the name label would invoke box select. This made dragging quite
finicky. I've seen this cause quite some frustration, especially when
the file browser is used as a regular editor to drag data from into
other editors.

Instead follow the Outliner (and some other file browsers like the macOS
one): Dragging on empty space invokes box select, dragging on the name
or icon invokes drag & drop of the item.

Note that 1e9564864c and 6da512f0bc were needed to prepare this change.
Julian Eisel changed title from File Browser: Expand draggable area to full file name to File Browser: Make full file name label draggable 2023-02-16 17:23:48 +01:00
Julian Eisel requested review from Pablo Vazquez 2023-02-16 17:24:13 +01:00
Julian Eisel requested review from Dalai Felinto 2023-02-16 17:24:25 +01:00
Pablo Vazquez approved these changes 2023-02-16 17:31:18 +01:00
Pablo Vazquez left a comment
Member

Functionality wise: +1!

This always felt so confusing. This is the expected behavior, although I personally always used B to box select anyway.

Thank you for working on it!

Functionality wise: +1! This always felt so confusing. This is the expected behavior, although I personally always used `B` to box select anyway. Thank you for working on it!

I built it here, and I'm still trying to wrap my head around this.

Right now there is a related issue that makes this patch very annoying. Basically if you cancel the dragging it closes the entire File Dialog window. Now that it will be more easy to "drag" the items this will happen very often, and I can foresee a lot of frustration.

I do wonder if we should allow dragging at all when in pop-up mode.


Also this patch introduced a bug (see video). Sometimes it forbid me from dragging images when I have Vertical List as the display mode.

I built it here, and I'm still trying to wrap my head around this. Right now there is a related issue that makes this patch *very* annoying. Basically if you cancel the dragging it closes the entire File Dialog window. Now that it will be more easy to "drag" the items this will happen very often, and I can foresee a lot of frustration. I do wonder if we should allow dragging at all when in pop-up mode. ---- Also this patch introduced a bug (see video). Sometimes it forbid me from dragging images when I have Vertical List as the display mode.
Author
Member

Right now there is a related issue that makes this patch very annoying. Basically if you cancel the dragging it closes the entire File Dialog window. Now that it will be more easy to "drag" the items this will happen very often, and I can foresee a lot of frustration.

Escape and right-click should just properly cancel, this wasn't implemented well. Submitted #104838.

I do wonder if we should allow dragging at all when in pop-up mode.

Yeah definitely. I think it's useful to be able to just quickly drag an image or so into the 3D view while browsing for something different. Or even to take a .blend while in a open/save dialog, and drag it into the main window to get the choice to link/append from that file.
At least I don't see much of a point in forbidding it, plus not being able to drag like usually can be confusing (or hide the fact that you can do it in another context even).


Also this patch introduced a bug (see video). Sometimes it forbid me from dragging images when I have Vertical List as the display mode.

Weird, I'll have to look into that.

> Right now there is a related issue that makes this patch *very* annoying. Basically if you cancel the dragging it closes the entire File Dialog window. Now that it will be more easy to "drag" the items this will happen very often, and I can foresee a lot of frustration. Escape and right-click should just properly cancel, this wasn't implemented well. Submitted #104838. > I do wonder if we should allow dragging at all when in pop-up mode. Yeah definitely. I think it's useful to be able to just quickly drag an image or so into the 3D view while browsing for something different. Or even to take a .blend while in a open/save dialog, and drag it into the main window to get the choice to link/append from that file. At least I don't see much of a point in forbidding it, plus not being able to drag like usually can be confusing (or hide the fact that you can do it in another context even). > ---- > > Also this patch introduced a bug (see video). Sometimes it forbid me from dragging images when I have Vertical List as the display mode. Weird, I'll have to look into that.
Author
Member

Also this patch introduced a bug (see video). Sometimes it forbid me from dragging images when I have Vertical List as the display mode.

Ah gosh, I know what this is caused by. The dropping handlers determine the type of dragged data based on the icon (yes seriously). Since this patch uses empty buttons to invoke dragging, this breaks.

I had a patch to fix this but don't know the D number, not sure how to get that back right now.

> Also this patch introduced a bug (see video). Sometimes it forbid me from dragging images when I have Vertical List as the display mode. Ah gosh, I know what this is caused by. The dropping handlers [determine the type of dragged data based on the icon](https://projects.blender.org/blender/blender/src/branch/main/source/blender/editors/space_sequencer/sequencer_drag_drop.c#L98) (yes seriously). Since this patch uses empty buttons to invoke dragging, this breaks. I had a patch to fix this but don't know the D number, not sure how to get that back right now.
Brecht Van Lommel added this to the User Interface project 2023-02-20 10:38:00 +01:00
Julian Eisel added 3 commits 2023-02-27 16:53:11 +01:00
Author
Member
Two changes are in `main` now: - [d58e422ac36f: UI: Properly cancel dragging on escape or right-click](https://projects.blender.org/blender/blender/commit/d58e422ac36f1d151248890ca535c85b7ba39e2c) - [17e92711d3bd: UI: Refactor path dropping so logic doesn't depend on icons](https://projects.blender.org/blender/blender/commit/17e92711d3bdf8b587bd484977f2ca1eca4116f8) This should address the mentioned issues.

I still get the box select when my drag starts right in the space between the two lines:

image

Can we use the same margin that the mouse over highlight uses? For the mouse over highlight there is no ambiguity - there is always one line selected, even if the mouse is in the middle of two lines.

I still get the box select when my drag starts right in the space between the two lines: ![image](/attachments/c8c6d07f-8c62-495f-8dd0-b13d5c40ed40) Can we use the same margin that the mouse over highlight uses? For the mouse over highlight there is no ambiguity - there is always one line selected, even if the mouse is in the middle of two lines.
1.5 MiB
Author
Member

Yeah I've been a bit torn on this. It is quite useful if you want to box select, macOS does the same. However there it feels more expected for whatever reason, and from own testing I agree it gets more in the way probably.

Yeah I've been a bit torn on this. It is quite useful if you want to box select, macOS does the same. However there it feels more expected for whatever reason, and from own testing I agree it gets more in the way probably.
Member

Indeed it gets more in the way. Most users already know that they can border select with B anyway, or Shift+Click for range selection.

Indeed it gets more in the way. Most users already know that they can border select with `B` anyway, or Shift+Click for range selection.

Can this be merged as it is, and have the margin issue dealt with later?

Can this be merged as it is, and have the margin issue dealt with later?
Julian Eisel added 4 commits 2023-03-15 15:57:48 +01:00
Author
Member

I still get the box select when my drag starts right in the space between the two lines:

Can we use the same margin that the mouse over highlight uses? For the mouse over highlight there is no ambiguity - there is always one line selected, even if the mouse is in the middle of two lines.

This is now changed, we always use the full row height for dragging. The dragging hitbox also matches the highlighting exactly now, so whatever is highlighted will match the dragging.

> I still get the box select when my drag starts right in the space between the two lines: > > Can we use the same margin that the mouse over highlight uses? For the mouse over highlight there is no ambiguity - there is always one line selected, even if the mouse is in the middle of two lines. This is now changed, we always use the full row height for dragging. The dragging hitbox also matches the highlighting exactly now, so whatever is highlighted will match the dragging.
Author
Member

Committed with c3dfe1e204.

Committed with c3dfe1e204.
Julian Eisel closed this pull request 2023-03-15 16:11:57 +01:00
Julian Eisel deleted branch temp-file-browser-full-label-drag 2023-03-15 16:12:15 +01:00

Pull request closed

Sign in to join this conversation.
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
4 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#104830
No description provided.