Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

grc: implement search for blocks in flow graph #7211

Closed
wants to merge 1 commit into from

Conversation

ZakyHermawan
Copy link
Contributor

Description

it is getting harder to search for blocks in flowgraph once the flow graph getting bigger,
this PR will Implement quick search for blocks in flowgraph,
matched block will be set as selected, just like when you click or block some blocks in flowgraph

search shortcut: Ctrl+g
a window will pop to ask user to input the block they want to search
you can press enter or click the ok button to begin search

the searching process is done by using simple substring matching with each block.name in flow graph

Related Issue

Fixes #5983

Which blocks/areas does this affect?

grc/gui/Actions.py: add a new action to search for blocks in flow graph with gtk
grc/gui/Application.py: select all searched blocks
grc/gui/Dialogs.py: make a new EntryDialog class to take user input for block search
grc/gui_qt/components/window.py: register action for block search in flowgraph

Testing Done

UI Test on gtk and qt gui

Checklist

Signed-off-by: ZakyHermawan <zaky.hermawan9615@gmail.com>
@willcode
Copy link
Member

Would you add a screenshot?

@willcode willcode added New Feature GRC Backport-3.10 Should be backported to 3.10 GRC-Qt labels Mar 25, 2024
@ZakyHermawan
Copy link
Contributor Author

@willcode here's the screenshot of the UI testing

with qt gui:
image

image

with gtk:
image

image

@willcode
Copy link
Member

Ok, interesting. Let's get some opinions on whether this would be used by other people. We don't have many modal dialogs, so I'm also not sure whether a search field or a dialog is a better choice.

@willcode willcode marked this pull request as draft March 26, 2024 18:04
@ArlinJae
Copy link

GNU Radio user here, would 100% use this

@willcode
Copy link
Member

@haakov @dl1ksv @marcusmueller @mormj I could use some opinions on this. It may just be my lack of imagination, but I can't imagine knowing there's a certain block somewhere, not being able to find it on a well organized flowgraph, and having this be useful.

@dl1ksv
Copy link
Contributor

dl1ksv commented May 22, 2024

In my opinion, the examples are not a proof, that you need a search function to find a special block.
So I looked for a more complex example in gnuradio.
example_corr_est

But even here I'm in doubt if a search function will bring a real advantage.
May be the fg would be clearer if the the different block types ( filter, math ) would have different colors.

Another solution could be an additional tree list containing the used blocks. Just like the already existing list of available blocks. And clicking a block in the used blocks list could lead to the block in the fg.

But if you implement a search function , don't use a modal dialog, but use an entry in the menu bar.

@willcode
Copy link
Member

I kind of like the idea of an additional panel showing the blocks by both type and name, though name is usually something ugly like blah_source_0_0. This could, perhaps, be combined with the variable editor so we don't need a new panel.

I'm going to close this PR. I don't see us going this route. Thanks for thinking up new functionality. If you think of a way to combine the variable editor and a block listing in an easy-to-read way, I'd be interested.

@willcode willcode closed this May 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

grc: search for blocks in flowgraph
4 participants