-
Notifications
You must be signed in to change notification settings - Fork 500
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
Device manager: User session details screen (PSG-685) #6693 #6750
Conversation
📱 Scan the QR code below to install the build for this PR. If you can't scan the QR code you can install the build via this link: https://i.diawi.com/kjC2BK |
@paleksandrs could you please add some comments and ideally some screenshots to give me more context to this PR? |
@gileluard this ticket is the implementation of a session details screen that looks like this:
ACs:
|
app.buttons["Copy"].tap() | ||
|
||
let clipboard = try XCTUnwrap(UIPasteboard.general.string) | ||
XCTAssertEqual(clipboard,"iOS") |
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.
Kudos for adding tests from the start! 👌
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.
Sorry but I wanted to take all the time needed to have a clear and fair review. Hopefully, this will be helpful.
As a general advice, it seems that you added some files (at least UserSessionFlowCoordinator
) using xcode which may lead to some build error as we use xcodegen
to regenerate the Riot
project. You should rather run xcodegen
adn then pod update
more often to make sure the CI will build successfully the project.
From the architecture standpoint, the way you organize the coordinators confused me a bit as you tried to mix flow coordinator and screen coordinators. You may benefit from reorganizing your coordinators this way:
UserSessionsFlowCoordinator
-> this coordinator handles the entire flow. It manages the navigation router and push screen coordinators
|
-- UserSessionsListCoordinator
-> this coordinator handles the sessions list screen
|
-- UserSessionDetailCoordinator
-> this coordinator handles the session Detail screen
This way you may plenty use our template and have the folder hierarchy with consistent name between coordinators, view models, and views:
UserSessionsFlow
-> mainly contains the UserSessionsFlowCoordinator
and the UserSessionsFlowCoordinatorBridgePresenter
files
|
-- UserSessionsList
|
-- UserSessionDetail
You can take a look at the RoomAccessCoordinator
as an example.
From the UX standpoint, the detail screen is expected to display more information then the list view and I cannot see any information about the session verification state. If the design is definitive, it could be interesting to talk about this topic with the designer.
...odules/UserSessions/UserSession/DetailsView/Test/Unit/UserSessionDetailsViewModelTests.swift
Outdated
Show resolved
Hide resolved
...odules/UserSessions/UserSession/DetailsView/Test/Unit/UserSessionDetailsViewModelTests.swift
Outdated
Show resolved
Hide resolved
RiotSwiftUI/Modules/UserSessions/UserSession/DetailsView/UserSessionDetailsModels.swift
Outdated
Show resolved
Hide resolved
RiotSwiftUI/Modules/UserSessions/UserSession/Test/Unit/UserSessionFlowCoordinatorTests.swift
Outdated
Show resolved
Hide resolved
RiotSwiftUI/Modules/UserSessions/UserSession/UserSessionFlowCoordinator.swift
Outdated
Show resolved
Hide resolved
RiotSwiftUI/Modules/UserSessions/UserSession/Test/Unit/UserSessionFlowCoordinatorTests.swift
Outdated
Show resolved
Hide resolved
.../Modules/UserSessions/UserSessionsOverview/Coordinator/UserSessionsOverviewCoordinator.swift
Outdated
Show resolved
Hide resolved
RiotSwiftUI/Modules/UserSessions/UserSession/UserSessionFlowCoordinator.swift
Outdated
Show resolved
Hide resolved
This is probably impossible to understand from this PR alone but there will be an intermediate "session overview" screen inserted between the list view and this "session details" screen in a future PR. We just started on this screen first to minimize conflicts with the work Stève had ongoing at the time. Also, the session details screen itself will be enhanced with further rows in yet another pull request once we have parsed the additional data out of the user agent. |
Thanks for the detailed code review and spending time on it. Yes, indeed I added some files using Xcode. Sorry, I haven't worked with About the architecture. I am a little bit confused how the coordinator pattern is being used in the project. I might be wrong but from what I know coordinators are usually responsible for creating and starting the flow on the screen, that is their main responsibility. The application can have many flows and each flow can use the same views. As you mentioned that there are 2 types of coordinators - "flow coordinator" and "screen coordinator", but they both have one protocol and main function Because of that, I created |
Let's consider my general comment.
When the user taps an item in the screen handled by the
Feel free to DM me if you need more information. |
Kudos, SonarCloud Quality Gate passed! |
@gileluard thank you for your comments, I fixed most of them. I wasn't aware of the folder structure that is being used in the project, so hopefully, you should be able to run the tests now. I also change the architecture to use "screen coordinator" to match other places in the app. Please let me know if you have any other comments. |
Codecov ReportBase: 9.92% // Head: 10.04% // Increases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## develop #6750 +/- ##
===========================================
+ Coverage 9.92% 10.04% +0.11%
===========================================
Files 1484 1490 +6
Lines 150486 150805 +319
Branches 60742 60858 +116
===========================================
+ Hits 14934 15143 +209
- Misses 135006 135108 +102
- Partials 546 554 +8
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
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.
Great job ! Seems we have a brand new screen within a great architecture :)
Closes #6693