gramps-web icon indicating copy to clipboard operation
gramps-web copied to clipboard

Manage last names

Open fuelen opened this issue 3 years ago • 16 comments

I've imported my database to gramps web and I noticed that I'm not able to manage multiple last names. It would be great to have this option, as in my case it is one of the most used features.

fuelen avatar Oct 25 '22 10:10 fuelen

Hi, right, I didn't notice since I don't use the feature :wink:

Do I understand correctly that it's about editing names in case of multiple surnames, not about the display?

DavidMStraub avatar Oct 25 '22 10:10 DavidMStraub

Yes, about editing. Women in my tree almost always have 2 last names :slightly_smiling_face:

fuelen avatar Oct 25 '22 10:10 fuelen

Right. The current form just displays the first one and if you save it even discards any additional ones not present. https://github.com/gramps-project/Gramps.js/blob/main/src/components/GrampsjsFormName.js#L92

DavidMStraub avatar Oct 25 '22 10:10 DavidMStraub

I just pushed an improved implementation of name display and editing, please try it out.

DavidMStraub avatar Nov 07 '22 19:11 DavidMStraub

I tried it, and functionally it works :tada: Thank you. However, there are some UI issues, like modal window is too thin. It would be great to make it wider and place fields in a couple of columns. Also, labels interfere with prepopulated value image

fuelen avatar Nov 08 '22 20:11 fuelen

When I double-click on Name type field, so dropdown is shown and then hidden, I see the error This field is mandatory even though it is shown as selected. When I explicitly choose Birth Name after that, the error doesn't disappear. image

fuelen avatar Nov 08 '22 20:11 fuelen

Just want to add that now with updated libraries (I think because of that) the modal window is wider, and it looks better :slightly_smiling_face:)

fuelen avatar Nov 21 '22 18:11 fuelen

I think it's unrelated to the library update, I set a min-width manually in https://github.com/gramps-project/Gramps.js/commit/ef5bbdf467f197664fe21c2886395da588e3d18d

Unfortunately the overlapping labels are still there. I believe it's a mwc-textfield bug (but I doubt reporting it makes too much sense as they are working on Material 3...).

DavidMStraub avatar Nov 21 '22 18:11 DavidMStraub

That is strange, as such values as Type and Quality work well when editing Date :thinking:

fuelen avatar Nov 21 '22 19:11 fuelen

Good point. That's very strange indeed.

DavidMStraub avatar Nov 21 '22 19:11 DavidMStraub

Woohoo. I've experimented a bit and added a clause to render null if types are loading

    if (this.loadingTypes) { return null }

right before https://github.com/gramps-project/Gramps.js/blob/55f131b1e3b73d217db3a29b51ab1a41fdc7a68e/src/components/GrampsjsObjectForm.js#L105

fuelen avatar Nov 21 '22 19:11 fuelen

Seems like mwc initializes component only once and on the first run it initializes select with empty list of items and further update is ignored

fuelen avatar Nov 21 '22 19:11 fuelen

Another thing that I found is that it is not possible to set primary surname in the form

fuelen avatar Nov 21 '22 19:11 fuelen

@DavidMStraub it seems like management is ready and the only thing that is left is removing objects which is a part of https://github.com/gramps-project/Gramps.js/issues/119 Should we close this issue?

fuelen avatar Feb 17 '23 09:02 fuelen

It's deleting surnames and

Another thing that I found is that it is not possible to set primary surname in the form

Actually it's unrelated to #119 which is about deleting primary objects (e.g. a person), but the surname is not a primary object, so technically it's editing an object.

DavidMStraub avatar Feb 17 '23 09:02 DavidMStraub

Do I understand correctly: Deleting names is still open here and deleting surnames (as in https://github.com/gramps-project/gramps-web/issues/149)? Is there something else?

As I am on the whole name editing right now, I might fix the things left here as well. 😄

BlitzundBogen avatar Mar 15 '24 01:03 BlitzundBogen