UI: Search All Menus with Space Bar #113299

Merged
Harley Acheson merged 7 commits from Harley/blender:SpacebarSearch into blender-v4.0-release 2023-10-09 16:56:25 +02:00
Member

Allow initiating the search of any named menu by pressing space bar.


This seems like a simpler, and less invasive, alternative to #112925 since this does not remove the use of accelerators.

This PR removes the menu option SEARCH_ON_KEY_PRESS and the SearchOnKeyPress MenuTypeFlag, allowing search for all named menus by pressing spacebar while the menu is open. By "named" I mean that the menu has a name, like "VIEW3D_MT_object_context_menu" for example. So this works on pulldown menus in the Top Bar and elsewhere, context menus, "Add" menus, etc. This also works in the File / Open Recent list if you press spacebar while that menu is open.

This shows "Press spacebar to search..." in the status bar, but otherwise there is no other indication of this feature. The thought is that this is likely to become known over time since it applies to all menus.

Note that this doesn't work for unnamed menus and those that are enum lists. So not from the Editor selection menu or Mode Menu. It works for "Frame Rate" but not for "File Format". It works great for the "Add Modifiers" menu.

Allow initiating the search of any named menu by pressing space bar. --- This seems like a simpler, and less invasive, alternative to #112925 since this does not remove the use of accelerators. This PR removes the menu option SEARCH_ON_KEY_PRESS and the SearchOnKeyPress MenuTypeFlag, allowing search for all named menus by pressing spacebar while the menu is open. By "named" I mean that the menu has a name, like "VIEW3D_MT_object_context_menu" for example. So this works on pulldown menus in the Top Bar and elsewhere, context menus, "Add" menus, etc. This also works in the File / Open Recent list if you press spacebar while that menu is open. This shows "Press spacebar to search..." in the status bar, but otherwise there is no other indication of this feature. The thought is that this is likely to become known over time since it applies to all menus. Note that this doesn't work for unnamed menus and those that are enum lists. So not from the Editor selection menu or Mode Menu. It works for "Frame Rate" but not for "File Format". It works great for the "Add Modifiers" menu.
Harley Acheson added 1 commit 2023-10-05 19:29:57 +02:00
a03956ac41 UI: Search All Menus with Space Bar
Allow initiating the search of any named menu by pressing space bar.
Harley Acheson added this to the User Interface project 2023-10-05 19:30:07 +02:00
Harley Acheson requested review from Pablo Vazquez 2023-10-05 19:30:16 +02:00
Harley Acheson added 1 commit 2023-10-05 19:34:25 +02:00
Harley Acheson added 1 commit 2023-10-05 19:48:06 +02:00
Harley Acheson requested review from Julian Eisel 2023-10-06 03:13:49 +02:00
Harley Acheson requested review from Dalai Felinto 2023-10-06 03:14:27 +02:00

I think for this to work, the search should take into consideration which menu is under the mouse (where the active item is), not which (sub-) menu is open.

Right now:

  1. I open a menu.
  2. I look around trying to find what I want.
  3. Meanwhile Blender promptly opens a sub-menu based on where I left my mouse idle.
  4. Now I press SPACEBAR and only that random sub-menu is open.

That means if I happened to mouse over an enum, I can't even use SPACEBAR (since anonymous menus are not supported):
image

Even worse is for menus that have mostly sub-menus (e.g., Geometry Nodes add). There I need to mouse the mouse to the "Title" of the menu in order to get search to search all sub-menus.

I think for this to work, the search should take into consideration which menu is under the mouse (where the active item is), not which (sub-) menu is open. Right now: 1. I open a menu. 2. I look around trying to find what I want. 3. Meanwhile Blender promptly opens a sub-menu based on where I left my mouse idle. 4. Now I press SPACEBAR and only that random sub-menu is open. That means if I happened to mouse over an enum, I can't even use SPACEBAR (since anonymous menus are not supported): ![image](/attachments/f9f95b80-bd35-40d8-b151-c23872d26a55) Even worse is for menus that have mostly sub-menus (e.g., Geometry Nodes add). There I need to mouse the mouse to the "Title" of the menu in order to get search to search all sub-menus.
Dalai Felinto requested changes 2023-10-06 10:40:57 +02:00
Dalai Felinto left a comment
Owner

Requesting changes ...

Requesting changes ...
Pablo Vazquez reviewed 2023-10-06 11:56:47 +02:00
@ -565,10 +564,6 @@ class NODE_MT_context_menu(Menu):
layout.separator()
layout.operator("node.find_node", text="Find...", icon='VIEWZOOM')
Member

Any reason for removing this? Find is different than Search.
Search adds new nodes while Find looks up the tree for matching node names (or custom labels even).

Any reason for removing this? `Find` is different than `Search`. `Search` adds new nodes while `Find` looks up the tree for matching node names (or custom labels even).
Harley marked this conversation as resolved
Member

To make the text in the status bar more prominent and at the same time consistent with the rest, the text could include the space bar icon and Press to search in menu or simply a description of the operator, like Search in Menu.

Status bar

Maybe now is also a good time to add a help text mentioning accelerator keys? Press the underlined key to trigger item or something along those lines.

To make the text in the status bar more prominent and at the same time consistent with the rest, the text could include the space bar icon and `Press to search in menu` or simply a description of the operator, like `Search in Menu`. ![Status bar](/attachments/607cde8b-4ec0-47a6-ac72-20a3c39c0302) Maybe now is also a good time to add a help text mentioning accelerator keys? `Press the underlined key to trigger item` or something along those lines.
2.1 KiB
Harley Acheson added 1 commit 2023-10-06 17:53:02 +02:00
Harley Acheson added 1 commit 2023-10-06 17:55:34 +02:00
buildbot/vexp-code-patch-coordinator Build done. Details
e9c3c08c6c
Accidental whitespace removal
Author
Member

@dfelinto - search should take into consideration which menu is under the mouse

It does exactly that now.

@pablovazquez Any reason for removing this?

Sorry, I put that back in. I only removed it by misunderstanding your comment about "No menu entry to indicate/trigger search". This was the only existing thing I could find. I realize now you were talking of some of our proposals to add such items, not about existing items,

the text could include the space bar icon

Unfortunately this type of status text can only contain text. The kind that shows icons is something that is generated from keymap data and we can't create that explicitly. Interestingly I did once propose being able to use our icons within ordinary text strings, but there was some limitations with it. https://archive.blender.org/developer/D8993

Maybe now is also a good time to add a help text mentioning accelerator keys? Press the underlined key to trigger item or something along those lines.

I didn't do this (yet), mainly because I couldn't think of text I liked there and wanted to update this PR. Some text I tried also seemed to give an impression that the second sentence relates to the first. Like there are two steps to searching:

"Press spacebar to search. Press underlined letters to activate items."

> @dfelinto - search should take into consideration which menu is under the mouse It does exactly that now. > @pablovazquez Any reason for removing this? Sorry, I put that back in. I only removed it by misunderstanding your comment about "No menu entry to indicate/trigger search". This was the only existing thing I could find. I realize now you were talking of some of our proposals to add such items, not about existing items, > the text could include the space bar icon Unfortunately this type of status text can only contain text. The kind that shows icons is something that is generated from keymap data and we can't create that explicitly. Interestingly I did once propose being able to use our icons within ordinary text strings, but there was some limitations with it. https://archive.blender.org/developer/D8993 > Maybe now is also a good time to add a help text mentioning accelerator keys? Press the underlined key to trigger item or something along those lines. I didn't do this (yet), mainly because I couldn't think of text I liked there and wanted to update this PR. Some text I tried also seemed to give an impression that the second sentence relates to the first. Like there are two steps to searching: "Press spacebar to search. Press underlined letters to activate items."

@blender-bot package

@blender-bot package
Member

Package build started. Download here when ready.

Package build started. [Download here](https://builder.blender.org/download/patch/PR113299) when ready.
Harley Acheson added 1 commit 2023-10-06 22:22:01 +02:00
Harley Acheson added 1 commit 2023-10-06 22:24:01 +02:00
Author
Member

@dfelinto - search should take into consideration which menu is under the mouse

I just made a small adjustment to this. Hard to explain in words, but simple in practice. The last change could be described as "search the parent if a child menu is open but not active". This PR now alters that to add an "or if the child is not searchable".

In a nutshell this menu searching feature works on menus that have names and therefore can be individually identified and found. Enum menus can't be individually searched, but their items can be seen when searching a parent. So when hovering over a child enum menu, search the parent.

In case I have not explained this well, in the earlier version of this PR you could open the 3D Viewport "Object" menu, then open "Set Origin". That submenu cannot be individually searched, so nothing would happen. With this PR now, pressing spacebar will search the parent menu and therefore you can still search for, and select from, the items on the submenu.

> @dfelinto - search should take into consideration which menu is under the mouse I just made a small adjustment to this. Hard to explain in words, but simple in practice. The last change could be described as "search the parent if a child menu is open but not active". This PR now alters that to add an "or if the child is not searchable". In a nutshell this menu searching feature works on menus that have names and therefore can be individually identified and found. Enum menus can't be _individually_ searched, but their items can be seen when searching a parent. So when hovering over a child **enum** menu, search the parent. In case I have not explained this well, in the earlier version of this PR you could open the 3D Viewport "Object" menu, then open "Set Origin". That submenu cannot be individually searched, so nothing would happen. With this PR now, pressing spacebar will search the parent menu and therefore you can still search for, and select from, the items on the submenu.
Member

In a nutshell this menu searching feature works on menus that have names and therefore can be individually identified and found. Enum menus can't be individually searched, but their items can be seen when searching a parent. So when hovering over a child enum menu, search the parent.

I think this is a good compromise, a bit inconsistent because from the user's point of view there's no visible difference between a menu like Transform and an enum like Set Origin or Editor dropdown. But usable nonetheless for the time being and miles better than what we have in main.

Thanks for working on it! From my side I think with this last commit this feature is ready to go.

> In a nutshell this menu searching feature works on menus that have names and therefore can be individually identified and found. Enum menus can't be _individually_ searched, but their items can be seen when searching a parent. So when hovering over a child **enum** menu, search the parent. I think this is a good compromise, a bit inconsistent because from the user's point of view there's no visible difference between a menu like `Transform` and an enum like `Set Origin` or `Editor` dropdown. But usable nonetheless for the time being and miles better than what we have in main. Thanks for working on it! From my side I think with this last commit this feature is ready to go.
Pablo Vazquez added the
Module
User Interface
label 2023-10-07 15:34:22 +02:00
Pablo Vazquez approved these changes 2023-10-07 15:34:38 +02:00
Dalai Felinto approved these changes 2023-10-08 14:17:50 +02:00
First-time contributor

Is there any concern that because the spacebar is a default hotkey for "play animation" - and relatively easy to even hit by accident, that a user is going to misplace their cursor when attempting to search? This can cause large problems, when dealing with frame-specific edits.

Is there any concern that because the spacebar is a default hotkey for "play animation" - and relatively easy to even hit by accident, that a user is going to misplace their cursor when attempting to search? This can cause large problems, when dealing with frame-specific edits.
Harley Acheson merged commit 35d3d52508 into blender-v4.0-release 2023-10-09 16:56:25 +02:00
Harley Acheson deleted branch SpacebarSearch 2023-10-09 16:56:27 +02:00
First-time contributor

Why is the above concern about Spacebar being used for animation playback not being addressed? There’s nothing in this PR or on dev talk about how this shortcut interacts with that functionality, is this just an oversight? This needs to be addressed, ASAP.

Why is the above concern about Spacebar being used for animation playback not being addressed? There’s nothing in this PR or on dev talk about how this shortcut interacts with that functionality, is this just an oversight? This needs to be addressed, ASAP.
Member

Hiding the ubiquitous search function under spacebar instead of typing right away is horrible. Multiply this by 100s of times a day.

Hiding the ubiquitous search function under spacebar instead of typing right away is horrible. Multiply this by 100s of times a day.
Member

This change is still pretty confusing... we already have confused people reporting it like #113528 :/

This change is still pretty confusing... we already have confused people reporting it like #113528 :/
Contributor
  1. Having to press two unique keys to start searching is UX nightmare.
  2. The industry standard for search in most of content creation software is Tab key, so of course in Blender it will be Spacebar. 😠
1. Having to press two unique keys to start searching is UX nightmare. 2. The industry standard for search in most of content creation software is Tab key, so of course in Blender it will be Spacebar. 😠
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
9 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#113299
No description provided.