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

[Spaces] M10.8 Browsing users in a space #4682 #4742

Merged
merged 15 commits into from
Sep 14, 2021

Conversation

gileluard
Copy link
Contributor

@gileluard gileluard commented Aug 23, 2021

Fixes #4682

testable link: https://i.diawi.com/ybUnZi

ezgif-3-14bedb55ae85
ezgif-3-aacb77b8a27c

- Added MVVM classes
- roughly integrated `RoomParticipantsViewController` to the MVVM
- Added navigation to member detail page
- Present space members screen from people tab if space has been selected
@gileluard gileluard linked an issue Aug 23, 2021 that may be closed by this pull request
Copy link

@niquewoodhouse niquewoodhouse left a comment

Choose a reason for hiding this comment

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

  • The admin label doesn't seem to be right-aligned, so it starts in a random location depending on character length
  • In dark theme, the search empty state is a light image
    IMG_81EED386CC0A-1
  • Empty state text has space name as actual text, should be name of currently visisble space
    IMG_62ED29C3643F-1

…_a_space

# Conflicts:
#	Riot/Modules/SideMenu/SideMenuCoordinator.swift
- Update after design review
- Update after design review
@niquewoodhouse
Copy link

@gileluard Looks good, I just realised one thing when searching members that I didn't really think of sooner.

Seeing the big image appear here feels a bit strange, as the keyboard is up it's not clear what it means. Those empty states are useful when everything is visisble: image and text. The text underneath is much more helpful. Could we either just remove the image, or replace with same no results design for rooms, but with members info instead

Members@2x

@@ -870,6 +879,19 @@ - (void)pushViewController:(UIViewController*)viewController
}
}

- (void)showDetailFor:(MXRoomMember* _Nonnull)member from:(UIView* _Nullable)sourceView {
Copy link
Contributor

Choose a reason for hiding this comment

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

sourceView parameter seems to be not used 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.

It's not used here indeed but it's used by SpaceMemberListViewController that inherits from RoomParticipantsViewController

let spaceMembersCoordinator = SpaceMembersCoordinator(parameters: parameters)
spaceMembersCoordinator.delegate = self
let presentable = spaceMembersCoordinator.toPresentable()
presentable.presentationController?.delegate = self
Copy link
Contributor

Choose a reason for hiding this comment

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

Even if it's fine to let it here I think it can be interesting to put presentable.presentationController?.delegate = self inside SpaceMembersCoordinator. We will add this to the file template. And add a delegate method for this case. It will centralise this edge case and avoid to forget it for other screens.

@@ -131,7 +131,7 @@ final class AppCoordinator: NSObject, AppCoordinatorType {

private func addSideMenu() {
let appInfo = AppInfo.current
let coordinatorParameters = SideMenuCoordinatorParameters(appNavigator: self.appNavigator, userSessionsService: self.userSessionsService, appInfo: appInfo)
let coordinatorParameters = SideMenuCoordinatorParameters(appNavigator: self.appNavigator, appCoordinator: self, userSessionsService: self.userSessionsService, appInfo: appInfo)
Copy link
Contributor

Choose a reason for hiding this comment

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

The AppCoordinator should not be injected, other coordinators should not know is existence. It's adding an unnecessary object relation and avoid reusability.

@@ -49,7 +49,7 @@ final class AppCoordinator: NSObject, AppCoordinatorType {
private weak var splitViewCoordinator: SplitViewCoordinatorType?
fileprivate weak var sideMenuCoordinator: SideMenuCoordinatorType?

private let userSessionsService: UserSessionsService
let userSessionsService: UserSessionsService
Copy link
Contributor

Choose a reason for hiding this comment

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

We should try to keep it private and inject this instance from Coordinators to other Coordinators.
For places where we still can't inject instances such as UserSessionsService from side to side. The parent does not have the reference or the flow is started from ObjC class.
We can temporary define and use a shared instance like UserSessionsService.shared but we still continue to inject it from the outside like: CoordinatorParameters(userSessionsService: UserSessionsService.shared) to avoid having singleton inside Coordinators. And in AppCoordinator.init we can temporary use self.userSessionsService = UserSessionsService.shared until we can avoid singleton in the app.

- Fixed build issue on Jenkins
@gileluard gileluard merged commit 4fabc24 into spaces Sep 14, 2021
@gileluard gileluard deleted the gil/4682_browsing_users_in_a_space branch September 14, 2021 15:43
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.

[Spaces] M10.8 Browsing users in a space
3 participants