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

Topola Viewer integration (#347) #414

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

PeWu
Copy link

@PeWu PeWu commented Mar 29, 2024

Topola Viewer is integrated as follows:

  • Topola Viewer is loaded from the official deployment at https://pewu.github.io/topola-viewer and displayed in an iframe.
  • 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:

  1. [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.

  2. [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.

  3. [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.

@DavidMStraub
Copy link
Member

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. 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants