Neriderc / GVExport

Repository for GVExport module for Webtrees
GNU General Public License v2.0
15 stars 6 forks source link

Change default zoom level to always be the same, zoomed in on the starting person and surrounding individuals, regardless of diagram size #456

Closed WeT-Klb closed 9 months ago

WeT-Klb commented 9 months ago
          If you choose 3 or 4 generations, would it be possible not to reduce the size of the graphic?

It would be nicer if the individual persons were displayed in the same size, but the graphic could be moved accordingly - as in "MyHeritage". GVExport with 2 Generations GVExport with 3 Generations GVExport with 4 Generations

Originally posted by @WeT-Klb in https://github.com/Neriderc/GVExport/issues/232#issuecomment-1826286895

WeT-Klb commented 9 months ago

My personal opinion is that the view as in "MyHeritage" would be optimal. For example, you can select a person and then navigate through the whole tree by moving the graphic. Have you ever seen that there? In my personal opinion, that would be the icing on the cake. MyHeritage look

Neriderc commented 9 months ago

Because (by definition) GVExport is powered by Graphviz, we don't have the ability to load more of the tree as you scroll around (which I think is what you mean). Instead, we need to generate the whole tree. If you have thousands of individuals, this can take a long time and can also fail because there's a maximum size the browser can display.

The other issue we have had is getting things in the places we want on the tiles. What seems simple such as adding an edit button in the corner, is not simple when you need to feed this through Graphviz.

Basically, this extension was originally designed (at least 12 years ago) to generate printed diagrams using Graphviz. It does this well, in particular handling complex family relationships where others fail (especially others available for webtrees). The ability to see the output on the website and scroll around was only added in 2021 (not by me), and I have built on this. However, it's still a printed diagram tool at heart.

I think what you're asking for would need a complete rebuild using a different tool (i.e. it would not be GVExport anymore). And given the popularity of MyHeritage and Ancestry, and the fact that no such extension exists for webtrees despite webtrees having many extensions - I'm guessing it's pretty difficult to do.

One day I might attempt something like that, but to be honest I'm not really sure of a good place to start. Webtrees does already include some level of functionality in letting you scroll your family tree, such as the arrow on the right hand side here:

click to show

I know this is in no way a replacement, but it's similar conceptually.

For GVExport, I'll only look at having the zoom level set to have the tiles show the same size each time.

(sorry for the long reply, I did try to shorten it - yes, it was longer)

WeT-Klb commented 9 months ago

I understand that this is very complex. I also intended it more as food for thought. I would be satisfied if the zoom level would remain the same - i.e. the person box would remain the same size, but the graphic would have to be moved. Nevertheless, thank you for your efforts. And, as you said, perhaps you still have a plan to implement this at some point.

hartenthaler commented 9 months ago

If you are interested in interactive opening and closing branches in a tree you should try the custom module xtv (see https://github.com/huhwt/huhwt-xtv).

WeT-Klb commented 9 months ago

Danke für den Tip - ist aber leider nicht ganz das, was ich suche. GVExport geht schon in die richtige Richtung - mir würde halt gefallen, wenn man den ganzen Stammbaum erkunden könnte - wie eben in MyHeritage.

Neriderc commented 9 months ago

If you are interested in interactive opening and closing branches in a tree you should try the custom module xtv (see https://github.com/huhwt/huhwt-xtv).

As far as I can tell, this only shows ancestors and descendants, rather than all records.

hartenthaler commented 9 months ago

Und was spricht gegen diesen Wunsch den ganzen Stammbaum mit GVExport zu erkunden?

Eine Möglichkeit wäre diverse Startpersonen in GVExport zu definieren, etwa die Spitzenahnen und deren Nachkommen.

Eine andere Möglichkeit wäre es den ganzen Stammbaum in den Sammelbehälter zu legen und diesen dann mit GVExport anzusehen. Das geht mit dem Erweiterungsmodul cce https://github.com/huhwt/huhwt-cce

Wenn schon cce installiert ist, dann macht es auch Sinn TAM und LIN vom selben Autor zu installieren, da auch diese beiden Module sich sehr gut eignen einen ganzen Stammbaum zu analysieren (mit einer ganz anderen Bedienoberfläche).

Neriderc commented 9 months ago

I've just edited the title to make it clearer what is being changed when this goes through the release cycle. It turns out this was very easy to do. I will submit the pull request shortly.

I have some other stuff I'm working on in the hope of having it in the next release, so for the moment I'll hold off on creating a new release, but one the pull request is merged you should be able to use the main branch to get early access to the change (and others). Feel free to ask if you need help with how to do that. Completing the pull request will close this issue but everyone can continue to reply to it.

WeT-Klb commented 9 months ago

Und was spricht gegen diesen Wunsch den ganzen Stammbaum mit GVExport zu erkunden?

Es spricht natürlich nichts gegen den Wunsch. Ich wollte nur sehen, ob es möglich ist. z.B. mich als Person auszuwählen und dann frei durch den ganzen Baum zu navigieren, indem ich die Grafik verschiebe. Mir gefällt einfach die Möglichkeit, die MyHeritage bietet. Dieses Feature fehlt mir persönlich in Webtrees.

schuco commented 9 months ago

It looks like one may have different experiences and opinions on the same thing. As far as I have worked with the MyHeritage tree I found it much less comfortable and effective in exploring a relationship tree. Switching the tree to get ancestores or descendants of a presently displayed individual makes members of the tree disappear in the new display and visible connections get lost. GVExport, after expanding the tree with additional source individuals, keeps all relations visible which have been explored up to now. Of course you may have to zoom or move the diagram around.

Still I would like to propose a further improvement in GVExport to support stepwise exploring family relations by adding further source individuals: The procedure now is:

  1. click on an individual you want to add as source individual.
  2. The individual person's page will open.
  3. You select "Charts" and roll down to select"GVExport" If you have selected "treatment of souce individuals" under "advanced settings" or you already have included more than one source individual an expanded diagram will appear.

My proposal would be: In the diagram from GVExport there would be another clickable option below "full screen" and "search". This option would control what happens when you click on a name in the diagram. Either the person's page is shown as it currently is, or a new diagram appears immediately, expanded to include the person clicked on.

Neriderc commented 9 months ago

@schuco I think what you have suggested is already covered in #402. I have copied your comment over to make sure we get a nice experience doing this functionality when the time comes.

Currently I have been working on #416, which has been taking some time because of the complexity, and I expect to take a fair bit more time to complete, but it is making progress.

schuco commented 3 months ago

After working with the change resulting in a fixed zoom level for some months now (since November 2023), it is my experience, that this change has not been favourable in all cases. Especially when I am displaying a big tree the strong zoom on the last individual added opens a much too narrow scope of the tree. In most cases it is my first action to widen the zoom before I can inspect the result of adding the last individual. The present approach may be more useful in a top-to-bottom diagram than in left-to-right diagram, which I am maily applying.

Proposal: When a fixed zoom is used the scope should include at least the parent generation and the direct offspring generation. Maybe a dynamic solution could be useful, where the zoom diaplay a preset proportion of the tree.