Skip to content

Conversation

@timothyqiu
Copy link
Member

@timothyqiu timothyqiu commented Nov 3, 2025

The current placeholder is too long for regular usage.

It was introduced to enhance the discoverability of the filtering syntax. But nowadays, the filter options are available in the related menus. It's no longer necessary to use this placeholder I think.

Before After
placeholder-before placeholder-after

The syntax is already mentioned in the LineEdit's tooltip. It is now also added to the tooltip of the related menu items:

tooltip

Options in the context menu:

  • The "Filters" text is removed from the separator. It's redundant, already in "Filter by Type" & "Filter by Group".
  • Icons are removed. Together with the checkbox above, they create confusing empty spaces.
Before After
context-menu-before context-menu-after

Options in the three-dots menu:

  • The "Filters" text is removed from the separator. The reason is the same as above.
  • Moved to the end of the menu, the same place as the context menu.
Before After
dots-menu-before dots-menu-after

There is also a filters popup menu for middle mouse button click in the LineEdit. This PR makes it created on demand.

@passivestar
Copy link
Contributor

I agree because I think search needs to be improved with more filter types and complex expressions to be more useful for large projects (i.e see this and this). Teaching all of the new syntax via placeholder text won't be possible, it will need to be made discoverable by other means

@AThousandShips AThousandShips added this to the 4.x milestone Nov 3, 2025
@KoBeWi
Copy link
Member

KoBeWi commented Nov 3, 2025

The menu options don't mention shorthands (t: g:). Maybe they could be in the tooltip?

@timothyqiu timothyqiu changed the title Simplify Scene dock Filter Nodes placeholder Scene Dock: Simplify Filter Nodes related UI Nov 4, 2025
@timothyqiu
Copy link
Member Author

timothyqiu commented Nov 4, 2025

Updated. The shorthand is now mentioned in the menu item's tooltip. See OP.

@KoBeWi
Copy link
Member

KoBeWi commented Nov 6, 2025

Placeholder part is actually covered by #107942

void _filter_gui_input(const Ref<InputEvent> &p_event);
void _filter_option_selected(int option);
void _append_filter_options_to(PopupMenu *p_menu, bool p_include_separator = true);
void _append_filter_options_to(PopupMenu *p_menu, bool p_include_separator);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tbh the separator argument can be removed and just check whether the menu already has items.

Comment on lines 4022 to 4024
void SceneTreeDock::_update_tree_menu() {
PopupMenu *tree_menu = button_tree_menu->get_popup();
tree_menu->clear();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just realized that this menu doesn't need to be re-created every time. Only needs to update the checkboxes.
You could change it, but idk if it's within scope of this PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants