It made most sense as another temporary "View" modification tied to Filters, so I added it to the panel formerly known as "Filters" but is now called "Views".
To Test
Quit and restart the server.
Select a node
Click on "Views" panel
Click on the "Focus" tab
The graph should show your selected node and one degree of separation from that node
Use the stepper buttons to move the range up and down.
You should be able to increase it to any number
You should not be able to able to decrease it below 1
You should be able to use backspace to delete the range value and type in a new value
If you type in a 0 or negative value, the input field will remain blank
Try different range values to make sure the selection range is correct.
Open the Nodes Table => The nodes listed in the table should match the visible nodes, any nodes not graph should be removed.
Open the Edges Table => The edges should match
Clicking "Clear Filters" should restore all the nodes
There may very well be some algorithm issues with the way I'm crawling the network, so please verify that it does what you expect.
There may also be some weird interim states if you're going back and forth between the tables and the filters.
I've also attached a sample project for testing. Just unzip and put it in netcreate-2023/build/runtimefocus.zip
Focus always removes. The Hiding functionality is, well, hidden at the moment pending in decisions in #263
Right now the View/filter features work independently of each other. I think if we wanted to combine them we might want to rethink the interface. So it isn't easy to have Highlight/Collapse and Focus on at the same time from a UI-perspective. The filter logic however is quite capable of handling that. So if we can figure out a good UI solution we should be able to implement that relatively easily.
NOTE: Merge #264 First!
This is a rough first pass at the focus feature.
It made most sense as another temporary "View" modification tied to Filters, so I added it to the panel formerly known as "Filters" but is now called "Views".
To Test
There may very well be some algorithm issues with the way I'm crawling the network, so please verify that it does what you expect. There may also be some weird interim states if you're going back and forth between the tables and the filters.
I've also attached a sample project for testing. Just unzip and put it in
netcreate-2023/build/runtime
focus.zip