SanichKotikov / react-family-tree-example

FamilyTree demo
https://sanichkotikov.github.io/react-family-tree-example/
38 stars 24 forks source link

Allow loading data from remote URL's #8

Closed fcsonline closed 3 years ago

fcsonline commented 3 years ago

Adding the capability to load JSON family information from remote sources. This will let us review and play with examples created by external people or for debugging purposes.

For example, you can load this URL that I extracted from #3 issue:

https://gist.githubusercontent.com/fcsonline/64b1149cf544237fbc10a786de871e18/raw/cf658d5199aaf51cbbdc0d83599f60b9dbe05872/tree.sample.json

Screenshot:

image

SanichKotikov commented 3 years ago

Hi,

Thanks. I'll be able to check after next week.

One thought, maybe it's better to replace it with ability loading local json file, or add this feature too?

fcsonline commented 3 years ago

I think both features are not incompatible. I mean, sometimes you want to share some examples to be analyzed I you want to avoid sending files back and forth. An URL is simpler. On the other hand, loading examples from localhost are also a valid use case when you own the dataset.