UI: Add Preference to Instant Search in all Menus #112925
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
4 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender#112925
Loading…
Reference in New Issue
No description provided.
Delete Branch "Harley/blender:SearchMenus"
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?
Allow "type to search" in all menus. with a user Preference to turn
it off if not wanted.
This PR removes the menu option
SEARCH_ON_KEY_PRESS
and theSearchOnKeyPress
MenuTypeFlag
, replacing this with a user preference.U.menu_key_behavior
is of typeeUserpref_MenuKeyBehavior
, which contains USER_MENU_KEY_SEARCH and USER_MENU_KEY_ACCELERATOR - the former as default.This leaves in the "Type to search..." text shown in the status bar when opening a menu if this option is on.
We normally don't allow searching in menus that have names that end in "_context_menu", but this PR allows searching in context menus if we are doing a "single menu search".
Could we still exclude context menus for menu search (but not single-menu search)? I think the code should know whether it was called for a single menu or not. I think skipping context menus was only helpful for menu search which includes all the menus.
Also, just wanted to ping @JacquesLucke, since this is affecting feature he added originally. This PR is based on the discussions in the UI meeting today.
Great idea! Done.
Two unused variables:
Other than that and my simple inline comment, this worked well in testing and the code looks straightforward.
@ -4912,2 +4922,4 @@
/* menus */
prop = RNA_def_property(srna, "menu_key_behavior", PROP_ENUM, PROP_NONE);
The enum items array can be defined right here in this function, it doesn't have to be global:
This resolved an error for me:
Same, can't compile here (macOS):
@blender-bot build
Should work now. I'm also testing on the bots to make sure.
What is the reason for this preference? That seems quite radical (while not actually daring to commit to it, hence making it optional), and IMO the wrong approach to this.
What we discussed earlier and what I've reconfirmed with Pablo is that it mostly depends on the type of menu if accelerator keys make sense or not. For large menus, being able to search is very useful. For small menus not so much. For menus with a fixed set of items accelerator keys are useful (because they don't change), for dynamic menus where items change a lot they don't (because they change and don't work well for muscle memory). (Context menus are an example of the latter, accelerator keys don't make sense there. But they are also often not big so search may not be that useful either. This could go either way, although I'd vote for search personally)
To be clear, as far as I understand this patch, it adds a preferences option for this to either use accelerator keys, or search everywhere. Nothing in between (like what was agreed on and committed earlier). This honestly feels like week design, and we just give the user a choice instead of coming up with something proper.
To be clear, I can't find a rationale for this design solution neither here nor in the latest meeting notes. To me they read: "this is how it should probably behave; so let's do something totally different".
@ -320,3 +322,4 @@
class USERPREF_PT_interface_menus_mouse_over(InterfacePanel, CenterAlignMixIn, Panel):
bl_label = "Open on Mouse Over"
bl_parent_id = "USERPREF_PT_interface_menus"
bl_options = {'DEFAULT_CLOSED'}
Why is this changed?
@ -342,6 +345,7 @@ class USERPREF_PT_interface_menus_mouse_over(InterfacePanel, CenterAlignMixIn, P
class USERPREF_PT_interface_menus_pie(InterfacePanel, CenterAlignMixIn, Panel):
bl_label = "Pie Menus"
bl_parent_id = "USERPREF_PT_interface_menus"
bl_options = {'DEFAULT_CLOSED'}
Why is this changed?
@ -463,3 +465,3 @@
};
for (int i = 0; i < ARRAY_SIZE(idname_array); i++) {
MenuType *mt = WM_menutype_find(idname_array[i], false);
MenuType *mt = (idname_array[i]) ? WM_menutype_find(idname_array[i], false) : nullptr;
Don't hide this logic inside a variable initialization. Make it explicit (above this line):
@ -472,2 +474,2 @@
{
/* Exclude context menus because:
if (!single_menu_idname) {
/* Exclude context menus (when not single menu search) because:
"Single menu search" is an invented term that doesn't really add much. Just say "when not searching in a single menu only".
I'm not certain what you mean by this. This PR makes "type to search" the default, with the preference being used to turn it off if unwanted.
This PR is just an implementation of what the UI Module discussed and agreed upon in the meeting yesterday attended by Dalai Felinto, Hans Goudey, Leon Schittek, Pablo Vazquez, Thomas Dinges, and me. We found that having anything "in between" is inconsistent and confusing.
It is a bit weird to have different behavior for large and small menus, especially since they could be side-by-side. For example, In current master go to the 3DView object mode menu. Open the "Select" menu and press "a" and you will select all objects. Now open the "Add" menu, press "a" and it will start a search. This inconsistency is difficult to convey to users. It was felt that going "all in" would make all dropdown and context menus behave in the same manner all the time without any need for a "type to search..." hint anywhere.
But at the end of the day this PR is just what was discussed and wanted. This can now be compiled and tested to confirm that this a solution. If too " radical" it can be rejected.
This isn't my design but what we agreed to in the UI Module meeting.
I had changed the parent "Menus" panel to be open by default in order to better show this new option. Having its children open by default too added a lot of exposed content in the initial view of Preferences.
I assumed that your comment was not rhetorical and so undid those changes. This PR now keeps the "Menus" panel closed by default with its children open inside of it.
995ed60f33
to4a01c270d2
UI: Add Preference to Instant Search in all Menusto UI: Add Preference to Instant Search in all MenusClosing. We settled on #113299
Pull request closed