-
Notifications
You must be signed in to change notification settings - Fork 70
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
Create parent from person view #227
Comments
Happy to support this work, where I can. @DavidMStraub Let me know if you have a direction in mind and any task I could contribute to |
Sure! I think the first step would be to create a new pop-up dialog for creating a new person. At the moment, we have two different ways of adding new objects: via a dedicated page/view or via a pop-up. To not duplicate code, both elements share a mixin. See here for events: https://github.com/gramps-project/gramps-web/blob/main/src/views/GrampsjsViewNewEvent.js For people, only the first one exists an the mixin has not been separated out yet. Once that is done, adding the form to the person view is similar to the "new event" form, which also allows creating an event. The logic for handling the completed & submitted form is in |
I have opened a draft PR where I create a newPersonMixin. #575 Question about the next steps, should we allow a new person to be created within another dialog modal? For example, in the screenshot below should we add a + button next to father that opens a new dialog or should it expand the existing dialog. |
Stacking modals on top of each other is indeed something I would avoid. But maybe we can make the UI simpler than having a a big dialog with expanding sections. Instead of a single dialog to edit father, mother and relationship at the same time, we could have a single dialog to edit the relationship, one dialog for editing father and one for editing mother. For editing a parent, we could either have a single dialog where the user can switch between selecting an existing and adding a new person (by unhiding a NewPersonMixing form on a button click), or we could have two separate icon buttons in the UI for "link existing person as father/mother" and "create new person as father/mother", then the individual popups are even simpler. What do you think? |
That sounds good to me. I agree that stacking dialogs is to be avoided. Do you have any examples of big dialogs and expanding sections in the codebase? That would help to follow a defined pattern. I like the idea of a single form that expands if required. Maybe the select a person select could display "Add a new Person", that when selected displays the NewPersonMixin. I'll give that a go and then we can discuss improvements |
The expanding name form in the new person dialog itself is probably the best example. |
On the gramps desktop interface it automatically pops up a blank spot you can double click to add a parent. On the web-app this doesn't happen, and you can't add parents through person details. Looks like I have to add a person, then find the child in the tree, and link the parent. It would be much more convenient to be able to edit these details from the person detail view.
The text was updated successfully, but these errors were encountered: