michelesalvador / FamilyGem

Android app for genealogical trees
https://www.familygem.app
GNU General Public License v3.0
125 stars 34 forks source link

Random photo / changing photos #104

Open aaannndddyyy opened 10 months ago

aaannndddyyy commented 10 months ago

If more than one photo is present in a person's profile and none is selected as primary one, then have the app select one at random each time the tree is opened. That way you get to display more of what the user has saved into the tree and the user experience is more vivid.

michelesalvador commented 10 months ago

Nice idea. I think it's easy to implement.

aaannndddyyy commented 10 months ago

Ideally, it would be an option, so that those who prefer a static primary pic can still choose that.

You might also create another category for files that are not photos. If you want to upload a document (even if it's not a PDF but a jpg) , you wouldn't want it to be displayed on the tree instead of a photo

michelesalvador commented 7 months ago

From fd33891 if no primary media is selected a random profile media is displayed for person. I'm not so happy about this decision, because it increases the use of the _PRIM (primary) tag that is not GEDCOM standard.

Yes, theoretically everything could be customizable within a setting. But I'd prefer to adopt the standard better decision for everyone, whenever possible.

About the media "category": in GEDCOM 5.5.1 there is the OBJE.FILE.FORM.TYPE tag that holds the SOURCE_MEDIA_TYPE values, among which we find photo, card and others. Those could be actually used to categorize the media. Unfortunately the gedcom5-java library doesn't implement this standard tag, but rather the OBJE._TYPE custom tag, which could be used for this scope, but well... it's not standard!

IMHO a document media (PDF, JPEG or whatever) should be placed inside a source record, and so not displayed on the person's profile.

aaannndddyyy commented 7 months ago

[...] if no primary media is selected a random profile media is displayed for person. I'm not so happy about this decision, because it increases the use of the _PRIM (primary) tag that is not GEDCOM standard.

You're not happy with the displaying of a random pic or not happy about tagging one as primary? I don't quite understand.

IMHO a document media (PDF, JPEG or whatever) should be placed inside a source record, and so not displayed on the person's profile.

True. I had not thought about the source category. And I just tested, that it's then not shown on the tree but only on the profile, so that works as it should. Thanks for pointing that out .

jer194 commented 7 months ago

Ideally, it would be an option, so that those who prefer a static primary pic can still choose that. ...

It seems to be implemented in 1.0.1. I think it would be better to add the option to switch back to the old behaviour (or maybe it is there, I just didn't find it?).

I personally prefer static primary images, it is quicker to spot a specific person. If principally all images can change on reload of the tree, the view gets pretty chaotic, if there are several images for each of the person ...

aaannndddyyy commented 7 months ago

Ideally, it would be an option, so that those who prefer a static primary pic can still choose that. ...

It seems to be implemented in 1.0.1. I think it would be better to add the option to switch back to the old behaviour (or maybe it is there, I just didn't find it?).

I personally prefer static primary images, it is quicker to spot a specific person. If principally all images can change on reload of the tree, the view gets pretty chaotic, if there are several images for each of the person ...

You can easily have the old static behavior, just select the photo which you want to be statically shown as primary. You do that by long tapping on it and then selecting "primary media". Otherwise, how would the app know which photo to show?

~~However , it seems that cannot be undone. You can change the primary pic tag to another , but it seems you can't go back to random, once you have selected a primary one~~ To revert to random, you open the primary picture and write "N" under " primary "

jer194 commented 7 months ago

Ideally, it would be an option, so that those who prefer a static primary pic can still choose that. ...

It seems to be implemented in 1.0.1. I think it would be better to add the option to switch back to the old behaviour (or maybe it is there, I just didn't find it?). I personally prefer static primary images, it is quicker to spot a specific person. If principally all images can change on reload of the tree, the view gets pretty chaotic, if there are several images for each of the person ...

You can easily have the old static behavior, just select the photo which you want to be statically shown as primary. You do that by long tapping on it and then selecting "primary media". Otherwise, how would the app know which photo to show?

However , it seems that cannot be undone. You can change the primary pic tag to another , but it seems you can't go back to random, once you have selected a primary one

Same problem like for you, in other threads: Do that for hundreds of individuals ...

aaannndddyyy commented 7 months ago

Just a question: Do you think shared media should be excluded from the random carousel? I don't know what other use case they may have, but I use them for photos that have several people in them , and I link those to all. It's nice to have them in the album / profile of a person, but to display them as representing one person in the tree, they're less optimal. I don't know how you implemented it, so I don't know if it's just a single line of code to excluded shared media from that or if it would be more work.

aaannndddyyy commented 7 months ago

I'm not so happy about this decision, because it increases the use of the _PRIM (primary) tag that is not GEDCOM standard.

You mean you don't like the possibility to select a static primary picture because you don't want to use that PRIM tag? I don't know about the standard and how bad it is to use a non standard tag. If other apps that abide by the standard just ignore it, then no harm is done. It's information only needed for your app for how to display things. It's not related to the info about the tree itself and if there is no standard for primary media then all photos are equal for other apps , whether you have that tag or not. The only question would be if it breaks things. If you want to get rid of the tag you might use the ordering and always select the first one as primary and show that if randomization is off, bit then you'd need another Boolean that stores whether or not to randomize.

Either way, I very much like the new randomization, looks very nice . Thank you!

aaannndddyyy commented 7 months ago

Same problem like for you, in other threads: Do that for hundreds of individuals ...

True, that is a lot of work. But don't you have to select a primary one anyhow? Or do you not care which one is shown, as long as it keeps being the same one ?

jer194 commented 7 months ago

Same problem like for you, in other threads: Do that for hundreds of individuals ...

True, that is a lot of work. But don't you have to select a primary one anyhow? Or do you not care which one is shown, as long as it keeps being the same one ?

The old behaviour was to just display the frst image linked to the person I think.

In GEDCOM:

0 @I2@ INDI
1 NAME Vorname /NAME/
1 FAMC @F2@
1 FAMS @F1@
1 SEX F
1 OCCU something
1 OBJE
2 FILE img1.jpg  <- this one
1 OBJE
2 FILE img2.jpg 
aaannndddyyy commented 7 months ago

This could be done with a global toggle

WeT-Klb commented 7 months ago

As for me until now I handle my tree with a software called "webtrees". Every now and then i just copied the media files and GEDCOM-file (5.5.1) over to my phone - and it only showed the first pic of an individual. For me it was perfect.

I don't think it's a good use if everytime to import the latest GEDCOM i need to set a primar picture manually.

I think it's q good try if we can switch between the "picture carusell" and the "Show pic 1 only" view. If this could be done it was perfect - at least for me.

michelesalvador commented 7 months ago

You're not happy with the displaying of a random pic or not happy about tagging one as primary?

I'm not happy with the displaying of a random media. The result seems to me just chaotic.

I had fun creating a little survey on Google Forms to understand how to proceed.

aaannndddyyy commented 7 months ago

I think an option would be best, maybe hidden under advanced options so that it's not too many options at once. And the real question would be which behavior should be the default? Since the changing photos are nice but nothing anybody expects, maybe by default it should be the old behavior, and the dynamic behavior can then de activated and deactivated in advanced settings. All commenters on this thread have said an option to switch would be good

michelesalvador commented 7 months ago

Tree settings are just been introduced, and I'd like to keep them as light as possible. Theoretically everything could be made customizable in some settings. But create a setting is much more work than just make the right choice on code. A setting must be translated in 30+ languages, displayed to user, saved, loaded, applied. And there are other settings that I feel more urgent than this random media carousel, which I think very few people really like.

kuhjunge commented 7 months ago

This feature completely broke my workflow. I manage my tree with gramps and import a gedcom file with media into familygem. I have a lot of pictures, some in very low quality. This really messed up my view. I don't know how set the tag in gramps and if I set it in the app, it resets after I reimport a changed gedcom file. I used the pdf feature a lot to share the actual tree with my family, but now I get complaints about very old pictures. I need a option to get the old behavior back, or at least a switch for the GED import, to set the first picture as default.

PS: I switched back to version 1.0 - problem solved for now.

WeT-Klb commented 7 months ago

Are there already plans to create a new release with the old behaviour? Because I need to stick with at least 1.0.1.1 to use pdf-files as media files. https://github.com/michelesalvador/FamilyGem/issues/125#issuecomment-1939534898

michelesalvador commented 7 months ago

With 1154383 I switched back to display the first media (instead of a random one) or a primary media, like was before. You can find the updated preview release (version 1.0.1.3) in https://www.familygem.app/apk

As far as I'm concerned, this unfortunate story can end here.

WeT-Klb commented 7 months ago

Yep - for me it's just perfect like it is now. Thanks so much. Sorry for the trouble.