-
Notifications
You must be signed in to change notification settings - Fork 741
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
#4319: Fix DM navigation in member profile screen #5292
Conversation
Matrix SDKIntegration Tests Results:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The fix is fine, but this is a change in the navigation. Is it confirmed that we want to do this change?
Maybe a video before / after showing the diff can help @daniellekirkwood to understand the diff.
@@ -297,8 +302,7 @@ class RoomMemberProfileFragment @Inject constructor( | |||
} | |||
|
|||
override fun onOpenDmClicked() { | |||
roomDetailPendingActionStore.data = RoomDetailPendingAction.OpenOrCreateDm(fragmentArgs.userId) | |||
vectorBaseActivity.finish() | |||
viewModel.handle(RoomMemberProfileAction.OpenOrCreateDm(fragmentArgs.userId)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This has the effect to add a room to the Activity stack. This is fine, but this is a side effect of this change.
So when the user will close the RoomDetailActivity with the DM, they will see the RoomMemberProfile Fragment again.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes It was intended. In my opinion it is consistent to go back to member profile screen in term of navigation. But I will try to make a video to explain the changes as you suggested.
_viewEvents.post(RoomMemberProfileViewEvents.OpenRoom(roomId = roomId)) | ||
} | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This code is duplicate of the code in TimelineViewModel
.
We should find a way to avoid code duplication in ViewModels (maybe out of scope of this PR)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is the code which is duplicated? Normally, I moved out this method handleOpenOrCreateDm
from TimelineViewModel
into the RoomMemberProfileViewModel
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, my bad, sorry
CC: @kittykat |
I have just seen your comment. I have just added GIFs in the associated issue. |
@mnaturel Can we make the back button go to the timeline instead of the user profile? (Please wait for confirmation from @niquewoodhouse before changing behaviour.) My thoughts are that normally a user would want to message only one user from a memberlist rather than continuing to take other actions on that user's profile or on the member list. |
Hello @kittykat , to answer your question, I can explain why I changed the back navigation. There are 2 navigation paths leading to a room member profile:
For the case 1, I see why we would like to go back to timeline and it may be easy to handle technically. But for the case 2, which is the original bug we fix here, I don't understand why we would go back to a room timeline and if so, which room we would choose since the user is coming back from home screen. So I may find a solution to handle case 1, but for case 2, I am not sure we should do something else. |
78b7543
to
958d7f7
Compare
Is it possible to fix #4319, so case 1, without changing the other existing navigation of case 2? |
958d7f7
to
e8ac9c4
Compare
[I talked to mnaturel and current status of PR is Nique and I are considering best course of action. I would be leaning towards |
@kittykat Okay. Just to be sure I understood well, to sum up:
Is that correct? |
@mnaturel Please stay with your original proposal for now (the back button goes back screen by screen along the whole path) and we can review the interaction when we're not in a rush as we would ideally do some user testing around it because it's a big change. |
e8ac9c4
to
96f041a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the discussion.
We may have complain about the change of navigation when opening the DM from the room member list, but we will see!
It's worth noting that we can also open a DM from the timeline by clicking on a user avatar and choosing "Direct message". So I guess the long path is less used.
Type of change
Content
Moving the navigation handling to open direct message from
TimelineFragment
toRoomMemberProfileFragment
.Motivation and context
Closes #4319
Screenshots / GIFs
Tests
Tested devices
Checklist