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

Start DM on first message #6367

Merged
merged 11 commits into from
Sep 6, 2022
Merged

Start DM on first message #6367

merged 11 commits into from
Sep 6, 2022

Conversation

yostyle
Copy link
Contributor

@yostyle yostyle commented Jul 1, 2022

@yostyle yostyle requested a review from giomfo July 1, 2022 17:49
@sonarcloud
Copy link

sonarcloud bot commented Jul 1, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

@codecov-commenter
Copy link

codecov-commenter commented Jul 1, 2022

Codecov Report

Merging #6367 (aa1ec2d) into develop (33540c9) will increase coverage by 0.05%.
The diff coverage is 0.00%.

@@             Coverage Diff             @@
##           develop    #6367      +/-   ##
===========================================
+ Coverage     6.13%    6.19%   +0.05%     
===========================================
  Files         1475     1476       +1     
  Lines       156165   156546     +381     
  Branches     62571    62735     +164     
===========================================
+ Hits          9577     9691     +114     
- Misses      146192   146451     +259     
- Partials       396      404       +8     
Impacted Files Coverage Δ
Riot/Generated/Strings.swift 2.85% <0.00%> (-0.01%) ⬇️
Riot/Modules/Application/LegacyAppDelegate.m 13.34% <0.00%> (+0.61%) ⬆️
...on/ScreenNavigation/RoomNavigationParameters.swift 0.00% <0.00%> (ø)
...es/Contacts/Details/ContactDetailsViewController.m 0.00% <0.00%> (ø)
...ot/Modules/Home/AllChats/AllChatsCoordinator.swift 0.00% <0.00%> (ø)
...dules/MatrixKit/Views/RoomTitle/MXKRoomTitleView.m 0.00% <0.00%> (ø)
...ules/Room/Members/RoomParticipantsViewController.m 0.00% <0.00%> (ø)
Riot/Modules/Room/RoomCoordinator.swift 0.00% <0.00%> (ø)
Riot/Modules/Room/RoomCoordinatorParameters.swift 0.00% <0.00%> (ø)
Riot/Modules/Room/RoomViewController.m 0.00% <0.00%> (ø)
... and 19 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@github-actions
Copy link

github-actions bot commented Jul 1, 2022

📱 Scan the QR code below to install the build for this PR.
🔒 This build is for internal testing purpose. Only devices listed in the ad-hoc provisioning profile can install Element Alpha.

QR code

If you can't scan the QR code you can install the build via this link: https://i.diawi.com/miYLKi

@giomfo
Copy link
Member

giomfo commented Jul 4, 2022

@yostyle I observed a crash during my test
image

I got it by filling a wrong matrix id (not an actual account)

@giomfo
Copy link
Member

giomfo commented Jul 4, 2022

In the empty room (temporary DM), the voice message is displayed in the text composer, but it seems disabled
image

I would replace the placeholder with "Send your first message" to satisfy a minimum the requested design.

@giomfo giomfo self-assigned this Jul 5, 2022
Riot/Modules/Room/RoomCoordinator.swift Outdated Show resolved Hide resolved
Riot/Modules/Room/RoomViewController.m Outdated Show resolved Hide resolved
Riot/Modules/Room/RoomViewController.m Outdated Show resolved Hide resolved
Riot/Modules/Room/RoomViewController.m Outdated Show resolved Hide resolved
Riot/Modules/Room/RoomViewController.m Outdated Show resolved Hide resolved
Riot/Modules/Room/RoomViewController.h Outdated Show resolved Hide resolved
@yostyle yostyle force-pushed the yostyle/start_dm_first_msg branch 3 times, most recently from a8d0293 to 322b2f1 Compare August 8, 2022 11:23
@yostyle yostyle marked this pull request as ready for review August 8, 2022 12:15
Riot/Modules/Room/RoomViewController.m Show resolved Hide resolved
Riot/Modules/Room/RoomViewController.m Outdated Show resolved Hide resolved
Riot/Modules/Room/RoomCoordinator.swift Outdated Show resolved Hide resolved
Riot/Modules/Room/RoomViewController.m Outdated Show resolved Hide resolved
Riot/Modules/Room/RoomViewController.m Outdated Show resolved Hide resolved
Riot/Modules/Room/RoomViewController.h Outdated Show resolved Hide resolved
Riot/Modules/Room/RoomViewController.m Outdated Show resolved Hide resolved
Riot/Modules/Room/RoomViewController.m Outdated Show resolved Hide resolved
Riot/Modules/Room/RoomViewController.m Outdated Show resolved Hide resolved
Riot/Modules/Room/RoomViewController.m Outdated Show resolved Hide resolved
Riot/Assets/de.lproj/Vector.strings Outdated Show resolved Hide resolved
@giomfo
Copy link
Member

giomfo commented Aug 17, 2022

@yostyle I did some tests

  • the placeholder "Send your first message" is not reset after the DM creation (the RoomInputToolbarViewSendMode has to be updated)
    Simulator Screen Shot - iPhone 13 Pro - 2022-08-17 at 18 46 02

  • I created a second DM by sending a new message in this first one NOK

@yostyle
Copy link
Contributor Author

yostyle commented Aug 19, 2022

@yostyle I did some tests

  • the placeholder "Send your first message" is not reset after the DM creation (the RoomInputToolbarViewSendMode has to be updated)
    Simulator Screen Shot - iPhone 13 Pro - 2022-08-17 at 18 46 02
  • I created a second DM by sending a new message in this first one NOK

Fixed

@yostyle yostyle requested review from giomfo, a team, phloux and ismailgulek and removed request for giomfo and a team August 19, 2022 20:26
@giomfo giomfo removed their assignment Aug 22, 2022
@giomfo
Copy link
Member

giomfo commented Aug 22, 2022

@ismailgulek Hi, except the following small remark, all the points already mentioned during our first (@phlniji and I) reviews have been fixed.
I will approve this PR, but we will wait for your review before being able to merge it. Is that ok for you?

Copy link
Member

@giomfo giomfo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM - tests ok

@ismailgulek
Copy link
Contributor

@ismailgulek Hi, except the following small remark, all the points already mentioned during our first (@phlniji and I) reviews have been fixed.

I will approve this PR, but we will wait for your review before being able to merge it. Is that ok for you?

Yes, i'll provide a review when appropriate.

Copy link
Contributor

@ismailgulek ismailgulek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had some comment inline, otherwise looks sane to me.

Riot/Modules/Room/RoomCoordinator.swift Outdated Show resolved Hide resolved
Riot/Modules/Room/RoomCoordinatorParameters.swift Outdated Show resolved Hide resolved
Riot/Modules/Room/RoomViewController.m Show resolved Hide resolved
Riot/Modules/Room/RoomViewController.m Outdated Show resolved Hide resolved
Riot/Modules/Room/RoomViewController.m Outdated Show resolved Hide resolved
Riot/Modules/Room/RoomViewController.m Outdated Show resolved Hide resolved
Riot/Modules/Room/RoomViewController.m Outdated Show resolved Hide resolved
Riot/Modules/Room/RoomViewController.m Outdated Show resolved Hide resolved
Riot/Modules/Room/RoomCoordinator.swift Outdated Show resolved Hide resolved
@giomfo
Copy link
Member

giomfo commented Aug 25, 2022

@ismailgulek FYI I'm working with @phlniji to take into account your comment. We will ping you here when the PR will be ready for a new review

Riot/Modules/Room/RoomViewController.m Outdated Show resolved Hide resolved
Riot/Modules/Room/RoomViewController.m Outdated Show resolved Hide resolved
Copy link
Member

@giomfo giomfo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

second review : approved

@giomfo
Copy link
Member

giomfo commented Aug 26, 2022

@ismailgulek FYI this PR has been updated, your review is requested on the last commit of @phlniji which should fixed all your comments

Copy link
Contributor

@ismailgulek ismailgulek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the changes, LGTM now. I just have new tiny question.

@@ -80,6 +80,9 @@ final class RoomCoordinator: NSObject, RoomCoordinatorProtocol {
if let threadId = parameters.threadId {
self.roomViewController = ThreadViewController.instantiate(withThreadId: threadId,
configuration: parameters.displayConfiguration)
} else if parameters.userId != nil {
Copy link
Contributor

@ismailgulek ismailgulek Aug 26, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this really needed? I think the view controller will be created with right parameters even if we remove this.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thx for your final review
I agree with you, the session seems provided latter to the view controller (via the - (void)displayNewDirectChatWithTargetUser:(nonnull MXUser*)directChatTargetUser session:(nonnull MXSession*)session method)
I will check this point with @yostyle to have a third point of view before cleaning the code here

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You right session parameter is not needed. I removed it

@giomfo
Copy link
Member

giomfo commented Aug 29, 2022

A final UX review based on build is planned before merging this PR

@giomfo
Copy link
Member

giomfo commented Aug 29, 2022

During UX Review, we observed an issue: the selected attachment is ignored, it is not sent in the created DM

@giomfo giomfo self-requested a review September 6, 2022 06:47
Copy link
Member

@giomfo giomfo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved

Note: In the last commit we retrieve (in the createOrRestoreDiscussionIfNeeded completion block) the actual input tool bar after the potential DM creation. The input tool bar may have been replaced by this method

Copy link
Member

@giomfo giomfo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@yostyle I did some additional tests by enabling the new Layout
The empty DM is not displayed correctly when I try to start a new DM
I got only a white screen (no header, no input tool bar...)
Must be fixed before merging

Copy link
Member

@giomfo giomfo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tests with the new layout succeeded

@sonarcloud
Copy link

sonarcloud bot commented Sep 6, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

@yostyle yostyle merged commit e56981b into develop Sep 6, 2022
@yostyle yostyle deleted the yostyle/start_dm_first_msg branch September 6, 2022 12:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants