-
Notifications
You must be signed in to change notification settings - Fork 7
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
Add option for what to do when individual clicked on in diagram #402
Comments
Currently, when you click on an individual in the diagram, you either have URLs enabled - in which case the page of the individual will open, or you don't - in which case nothing happens. We should remove the option for URLs, and replace this with a list of what should happen when an individual is clicked. This could have the following options:
|
Replacing the URL option to get the enlarged functionality is an excellent idea. |
Hmm I did not think of that. One option is about the browser, and the other about the output, but currently the URL setting does both. I think perhaps we will need to retain the URL option, which would only apply to output (SVG/PDF), and add this additional option for what happens when you click within the browser. |
Replying to #232 (comment)
Ok we can consider that. Another option is to show a menu when clicking to get several options. We can in theory use a right click, but I do not like doing that as it prevents the user using the normal right click menu. We could, however, use the left click to show a menu.
Yes I think there are several options we can add here. Some of them more advanced than others, so we may need to consider carefully how this works. |
Still I would like to propose a further improvement in GVExport to support stepwise exploring family relations by adding further source individuals:
My proposal would be: Originally posted by @schuco in #456 (comment) |
This is now done. Feel free to update from the main branch and test it out! This involved quite a few challenges that required quite a few changes, so it would be good to get confirmation everything is working ok. You can find the new setting in the General settings -> Browser render options, where the auto-update option is. |
I tried the new options to choose what happens when individual is clicked on. One further proposal resp. whish not linked to the observation above. Could you add another option for what happens when individual is clicked on: |
Hmm. This would probably happen if there is an error preventing the code from running (since part of the code blocks the normal action to follow the link). Could you check the browser console for any red error messages? Right click anywhere on the page, then choose "Inspect", then there should be a "Console" tab. If there are any red messages there, let me know what it says.
Oh yes, I remember you suggesting this. I will create a new issue to track it. |
I think that's unlikely to be the cause of the issue, as generally warnings don't prevent future code from running, which I think is probably happening in this case. Do you get a red error if you try to click on something in the diagram? |
I think I've fixed this. I worked out how to disable "pretty URLs" as I believe you both have servers with this disabled, and I saw the issue that you are having. I thought I had accounted for this, but it seems the URL often shows the HTML code '%2F' instead of the character it stands for ('/'), and so I have updated the check to correct this before testing the URL. I'm using the URL for a couple of things, but the important part here I think is the check for whether it is an individual. It looks for '/individual/' in the URL (which I believe is always in English, based on a quick glance at the webtrees source code). If this is not found, it is treated as a family record and the default action applies (if URLs are enabled, it would open the link). This problem would not result in an error in the browser log, as no error would be encountered. I have made this change in the main branch and tested that it works for me. If you could update from the main branch again and test it, that would be great! |
Now it works as expected - thank you! Two issues to be corrected for the option "show menu":
|
Great! Thank you for pointing out those issues. I think they were caused by a last minute change I made to fix when the menu wasn't appearing in the right place sometimes. I've now merged in a new pull request. Hopefully that's the last of the issues, but please let me know if you find more! |
This works perfect! Another idea to amend this new option: |
Hey, that is a beneficial new option! It allows me to cut and expand the tree dynamically! I will set the option to "show menu", too. Now it is necessary to have the possibility to export the persons and families from GVExport zu the clippings cart. I know already how to do that. So time to finish #177 . Beside that, the suggested option "add the clicked individual to the clippings cart" by schuco makes some sense, too. But adding single persons is my opinion not enough, in most cases you need additionally the families of that person. |
Still using and enjoying the "show menu" option I have
|
@hartenthaler wrote:
I agree. To effectively work with webtrees mainly from a GVExport-fullscreen-interface, clicks on families should get a pop-up-menu simular to that of individuals. |
I have created a new issue to track this. I will have to see what we can do about it, it's probably not a quick fix, but we should be able to fix it.
This change to show the settings in full screen is a lot more significant than it appears, for reasons that are hard to explain if you aren't familiar with web development. Not impossible, but I think this will not be done any time soon. I've created an issue so we don't forget, and I will get to this one day.
It should be relatively easy to add a menu for families once we decide what we want it to show. I feel it's best to wait until @hartenthaler has completed his planned work on the clippings cart to avoid conflicts and see if that work opens up nice possibilities for the menu. |
I could even imagine a further improved setting, where I admit not to know if and how it could work:
If you want to add individuals to the displayed tree and you are in the "add to list" mode you need two clicks to get the enlarged diagram:
Could there be an "add clicked individual to diagram" option so that the enlarged diagram is shown immediately after the click on an individual?
Originally posted by @schuco in #396 (comment)
The text was updated successfully, but these errors were encountered: