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

Relationship Graphs #357

Open
cybershambles opened this issue Jun 20, 2017 · 15 comments
Open

Relationship Graphs #357

cybershambles opened this issue Jun 20, 2017 · 15 comments

Comments

@cybershambles
Copy link

Imagine I Added person X, added person Y, added Child Z.... I'd love to be able to link there people together automatically as people

then have them displayed as as graph.


also, you cannot link existing people
image

Doesn't seem to actually link the people.. just added the text field?
image

@dancyfits
Copy link

This is the lowest hanging fruit in my opinion. Having this feature would do the most in making Monica a complete product, for me.

@lathomas64
Copy link

yes was very dissapointed that I could not have a significant other listed as a separate person instead of basically a note on the person.

@sid3windr
Copy link

The linking of contacts is now implemented and working, this issue should be (and remain?) only for the graph part :) Would also love to see this!

@cybershambles
Copy link
Author

:D

@djaiss
Copy link
Member

djaiss commented Nov 10, 2017

Are you aware of a tool that would help me build those relationship graphs?

@dancyfits
Copy link

dancyfits commented Nov 11, 2017

https://github.com/lazychaser/laravel-nestedset
I'm not up to date with the PHP scene, but that looks pretty helpful! Maybe at least a good an example to work from.

Edit: Although, the above seems more suited for family relationships and not so great for work, friend networks.
Maybe this? https://github.com/clue/graph

And if you wanna get really into it: https://en.wikipedia.org/wiki/Graph_theory

I guess it really depends on how your database is setup. Network graphs and d3.js seem like the things to google.
http://bl.ocks.org/jose187/4733747

@turtles2
Copy link

@djaiss The graph part of this interests me. I am willing to find the tool and build them. I just need some guidance on what we are looking for visually.

@dancyfits
Copy link

@turtles2 It's been a while since I've looked at this project, but I'd be willing to play around with the current ui for a few days and come up with a UI/UX mockup if any code contributors are interested. I can't remember what my line of thinking was in my last comment, but GraphQL comes to mind now. Wonder if that could make things easier.

@djaiss
Copy link
Member

djaiss commented Apr 15, 2018

@dancyfits imho GraphQL is unrelated with the relationship graph concept. GraphQL is an alternative to traditional REST APIs, and the work to implement it in Monica would take months and months.

@turtles2 @dancyfits before finding out how it should look like, we should define what it would do, considering the current structure of the relationships between contacts. Also I need to be convinced that we need this feature, because I'm not sure what it would bring 😀

@turtles2
Copy link

@djaiss My interest in implementing this is due to the technical nature of it. I was hoping for guidance from you and others on what it should do precisely

@dancyfits
Copy link

dancyfits commented Apr 15, 2018

@djaiss This type of problem is one of the main reasons GraphQL was built in the first place:
https://dev-blog.apollodata.com/explaining-graphql-connections-c48b7c3d6976#de1c

GraphQL is not an alternative for REST APIs:
http://graphql.org/blog/rest-api-graphql-wrapper/

Here's a video of a guy implementing GraphQL over Django, Rails, and Node in 30 minutes:
https://www.youtube.com/watch?time_continue=900&v=UBGzsb2UkeY

Here's the GraphQL spec written for PHP:
https://webonyx.github.io/graphql-php/

Here's a GraphQL wrapper for Laravel:
https://github.com/rebing/graphql-laravel

@cybershambles
Copy link
Author

I'd also like to be able to tag people into groups.. I have social circles.. like a workplace or hobby or group of friends.

@dancyfits
Copy link

dancyfits commented Apr 17, 2018

@cybershambles That you can do. On a contact's page, "Edit tag" under their name.
Tags will show up on the right of the contact list, clicking on one will filter the list to just the people with that tag.

@ghost
Copy link

ghost commented Sep 1, 2019

Agree that GraphQL is not relevant to this issue -- it's a tool for building APIs, but this issue is about visualizing a graph.

I've used this front-end graph framework in the past, and it's pretty solid and well-maintained: http://js.cytoscape.org/

If Monica already has API endpoints to get all contacts and all relationships, then visualizing such a graph isn't a very large task. Do these endpoints exist?

Just visualizing the social graph is the MVP, but other neat feature could be:

  • Dragging a line between people on the graph, then getting a small popup to select the relationship type. This'd be a fast way to enter relationships!
  • The ability to filter nodes by tag, so you can view only people tagged with "family" for a family-tree-like view

@MrModest
Copy link

Maybe this script will be somehow helpful in implementing a built-in feature: https://github.com/jmcker/monica2neo4j

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Roadmap
Long term
Development

No branches or pull requests

7 participants