Data is loaded from the Gramps Web API as a full GEDCOM file and is passed to Topola Viewer using JS messaging between Gramps Web and the iframe. Topola Viewer has a dedicated "embedded mode" for this purpose.
Here are some ideas how to move forward:
[recommended] Implement fetching only relevant data through the Gramps Web API instead of fetching the whole GEDCOM. This would have to be mostly implemented on the Topola Viewer side with some plumbing in GrampsjsViewTopola.
[possible] Instead of showing an iframe, the user could be redirected to a new tab showing Topola Viewer with data from Gramps Web. On one hand, we avoid the combination of 2 apps that have a different look and feel but on the other hand, the integration is far from being seamless.
[possible but more effort required] To avoid iframes, we'd have to use the https://github.com/PeWu/topola library directly in Gramps Web. The topola library is responsible for rendering the family tree and doing animations while the Topola Viewer is essentially a rich wrapper around the topola library providing the menu, loading data, showing individual details and settings. Using the topola library directly would mean reimplementing some parts of Topola Viewer in Gramps Web. This way, the topola chart could be added as another option in the "Family Tree" view.
Cool, thanks a lot! In principle 3 would be the best option, but we could opt for a staged approach as well. I'll review this version in the next days. :+1:
Topola Viewer is integrated as follows:
Here are some ideas how to move forward:
[recommended] Implement fetching only relevant data through the Gramps Web API instead of fetching the whole GEDCOM. This would have to be mostly implemented on the Topola Viewer side with some plumbing in
GrampsjsViewTopola
.[possible] Instead of showing an iframe, the user could be redirected to a new tab showing Topola Viewer with data from Gramps Web. On one hand, we avoid the combination of 2 apps that have a different look and feel but on the other hand, the integration is far from being seamless.
[possible but more effort required] To avoid iframes, we'd have to use the https://github.com/PeWu/topola library directly in Gramps Web. The topola library is responsible for rendering the family tree and doing animations while the Topola Viewer is essentially a rich wrapper around the topola library providing the menu, loading data, showing individual details and settings. Using the topola library directly would mean reimplementing some parts of Topola Viewer in Gramps Web. This way, the topola chart could be added as another option in the "Family Tree" view.