digitalfabrik / integreat-cms

Simplified content management back end for the Integreat App - a multilingual information platform for newcomers
https://digitalfabrik.github.io/integreat-cms/
Apache License 2.0
56 stars 35 forks source link

When editing a contact and removing the location it hides the other grid items #3151

Open juliankehne opened 1 month ago

juliankehne commented 1 month ago

Describe the Bug

When editing an existing Contact and removing the Location (trash icon) from the contact it hides the grid items "Manage contact data" and "Contact information"

Steps to Reproduce

  1. Go to 'Contacts'
  2. Open an existing contact to edit it
  3. Click the trash bin icon to remove the location from the contact
  4. See that grid items "Manage contact data" and "Contact information" are now hidden

Expected Behavior

When editing an already existing contact the two grid items should stay visible

Actual Behavior

When editing an already existing contact the two grid items are hidden after the location was removed

Additional Information

Hiding the grid items items is great during the creation of a contact, but I think it is confusing when editing a contact and some of the existing information is suddenly not visible anymore.

Before removing the location: 2024-10-23 16_04_19-Integreat Editorial System — Mozilla Firefox

After removing the location: 2024-10-23 16_04_33-Integreat Editorial System — Mozilla Firefox

Traceback ``` ```
juliankehne commented 1 month ago

If editing a contact should have the same behaviour as creating a new contact as defined in this design then this issue can be closed again:

https://www.figma.com/design/6U7R7Xj4wL7sbjxKRmOG9D/CMS-Project?node-id=1752-1636

osmers commented 1 month ago

I think we could maybe grey out the two sections that are currently disappearing to indicate that they cannot be changed without a poi being selected?

juliankehne commented 1 month ago

As I understand it we are hiding the grids during creation to guide the user through the process. But theoretically we don't have to do that as long as a location is selected in the end and all other mandatory fields are filled out.

And if a user tries saving without a location selected it does return an error message already: 2024-10-23 16_28_05-Integreat Editorial System — Mozilla Firefox

So when editing an existing contact I don't think we need to guide the user through the process again, be it via hiding or greying out the fields.

What I can think of is that we could put an indicator that Location has to be selected, once the user removes the current location.

juliankehne commented 1 month ago

@nikolahoff What do you think?

osmers commented 1 month ago

So when editing an existing contact I don't think we need to guide the user through the process again, be it via hiding or greying out the fields.

What I can think of is that we could put an indicator that Location has to be selected, once the user removes the current location.

That works well too :) good idea

nikolahoff commented 1 month ago

@juliankehne @osmers yes we should indicate that the location is mandatory and not hiding the other 2 input columns. It could be confusing and could seem like the other information is gone and needs to create a whole new contact. Editing follows the same bahaviour like for users herehttps://admin.integreat-app.de/testumgebung/users/1709/edit/ I will add the info in the design and the indicator for location.

nikolahoff commented 1 month ago

@osmers do we need to create a new ticket for this?

osmers commented 1 month ago

@nikolahoff I don't think we need a new ticket - maybe it's enough that you comment once the design is ready for this? And maybe put the link to the design in the comment? But I'll pass the question to @JoeyStk in case he does not agree.

JoeyStk commented 1 month ago

Yes, I agree with @osmers. You can just use this ticket until the design is done :)

osmers commented 1 week ago

I think this is the design for the new workflow: https://www.figma.com/design/6U7R7Xj4wL7sbjxKRmOG9D/CMS-Project?node-id=1629-2&node-type=canvas&t=gNzRYazMXvxfChmS-0 @JoeyStk