bricaud / graphexp

Interactive visualization of the Gremlin graph database with D3.js
Apache License 2.0
783 stars 216 forks source link

Add more options to filter #21

Closed Erly closed 6 years ago

Erly commented 6 years ago

Add the option to filter by label, limit the results and allow to make a textContains() search for those fields that use a mixed index. I used a dropdown in the html and a switch in the JS so in the future other search types like gt, lt, gte, lte... can be implemented.

Also limited the max-width of the right_bar because if a field value is too big (like a description) it takes the whole screen and doesn't let you interact with the graph anymore. This is just a simple workaround, I'll try to make a better fix in another PR (that also addresses the problem with the height overflowing) because I don't think using a percent is the best approach.

Erly commented 6 years ago

I just saw #20 which will have conflicts with this PR :man_facepalming: I'll fix them once the other one is approved

bricaud commented 6 years ago

Thanks @Erly . I have just approved #20 . (I did not have time to check if everything was fine, I hope so).

Erly commented 6 years ago

For what I've seen it works fine. I've tried to use the css grid that was introduced in #20 but it's the first time I've used something like that so I'm sure the design can be improved :sweat_smile:

bricaud commented 6 years ago

Looks good. I will test if it works with different versions of gremlins and add some info about it in the readme. Also "textContains" is a keyword recognized by Janusgraph but not by all the graphDBs, so I have to warn the users about that. Thanks a lot for your contribution!

Erly commented 6 years ago

Oops, I thought it was a keyword supported by all the GraphDBs that support Gremlin. I guess it would be possible to change it for filter but I don't know if it would be the same performance-wise, I'm still pretty new to graphs

bricaud commented 6 years ago

Merged. Thank for the contribution. We can not change the textContains with a filter command. I had a look a while ago and search for partial matches depends on the graph database and not on Gremlin. Anyway, JanusGraph seems to become the standard now. So I will leave it like this. The top bar looks a bit complex now with all the boxes. If you have some ideas how to simplify it, feel free to send a PR.

Erly commented 6 years ago

Yeah, I totally agree about the top bar. I'll take a look when I have some free time to see if I can do something about it.