Skip to content
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

View Profile: "Edit Name" is not available when accessing the contact from the members section in a group view #3267

Closed
Simon-Laux opened this issue Jun 15, 2023 · 6 comments · Fixed by #3310
Labels
bug Something isn't working good first issue Good for newcomers

Comments

@Simon-Laux
Copy link
Member

Simon-Laux commented Jun 15, 2023

Edit Name is not available when accessing the contact from the members section in a group view.
It is confusing to have 2 slightly different versions of the same view, depending on how it was opened.

@Simon-Laux Simon-Laux added bug Something isn't working good first issue Good for newcomers labels Jun 15, 2023
@farooqkz
Copy link
Collaborator

Can you elaborate on this please? Like steps to reproduce?

@Simon-Laux
Copy link
Member Author

When accessing the profile view directly:
Bildschirmfoto 2023-07-12 um 17 11 29
When clicking on a member in a group view:
Bildschirmfoto 2023-07-12 um 17 11 44

Note that the pen icon/button to edit the contacts name is missing in that case. I think that is confusing and it should always be accessible.

@farooqkz
Copy link
Collaborator

From what I understand reading the code, there are actually two different dialogs shown to the user:

  • If the user is in ViewGroup and clicks on someone, simply the viewMode state of this component is changed to profile and a profile using the same component is shown.
  • If the user goes some other way to view the profile, like right-click on DM with someone and then "View Profile", the "ViewProfille" component is shown.

@Simon-Laux
Copy link
Member Author

Simon-Laux commented Jul 15, 2023

Right that part seems to be outside of ViewProfileInner, still we can copy the following over to the other dialog:

  • the onClickEdit function
  • the showEditButton condition (maybe though that condition is unreachable, you can not have a group with the "device chat contact" and you can not click on yourself in the group list, so you might as well always show the edit button)
  • if profileContact and only if it is set then we need to update it when the contact changes (for example when you edit the name, this requires a more involved use effect, so I can do that part if required. (is not really a good first issue anymore unless one is a react expert)

@farooqkz
Copy link
Collaborator

Why not take the harder but the right way and show the same dialog everywhere?

@Simon-Laux
Copy link
Member Author

Simon-Laux commented Jul 17, 2023

Why not take the harder but the right way and show the same dialog everywhere?

We need to think over the whole dialog systems at some point anyway and refactor everything, so I think the duplication is fine for now, I also don't like it, but if we put in the effort we should remove blueprints in that part too while we will be already at it. So better postpone bigger refactoring IMO.

farooqkz added a commit that referenced this issue Jul 26, 2023
… group member list(fix #3267) (#3310)

* showing ViewProfile in ViewGroup if a contact is selected

* pretty code!

* update change log to include the fix

* make linter happy by removing unused import

* fix misplaced console log

* show main view of ViewGroup when user closes ViewProfile

* per Simon's review, close btn always closes ViewProfile and back button goes back to ViewGroup if ViewProfile is opened from ViewGroup

* one variable less per Simon's review
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers
Projects
None yet
2 participants