element-hq / element-hq/element-ios
Navigation: Create RoomCoordinator
- Dominant language
- Swift
- Stars
- 1.8k
- Forks
- 544
- PR merge metrics
- PR metrics pending
Description
To make screen reusable and take back control on navigation we need to manage all the things listed below outside of `RoomViewController`:
Priority:
- [ ] Show a room: `[[AppDelegate theDelegate] showRoom:room.roomId andEventId:nil withMatrixSession:self.mainSession];`
- [ ] Handle universal link: `[[AppDelegate theDelegate] handleUniversalLinkURL:url];` & `[[AppDelegate theDelegate] handleUniversalLinkFragment:fragment fromURL:url];`
- [ ] Start a direct chat `[[AppDelegate theDelegate] createDirectChatWithUserId:matrixId completion:completion];`
- [ ] Leave the room `[[AppDelegate theDelegate] restoreInitialDisplay:^{}];`
Todo next:
- [ ] Present complete security: `[[AppDelegate theDelegate] presentCompleteSecurityForSession: self.mainSession];`
- [ ] Show room infos: `- (void)showRoomInfoWithInitialSection:(RoomInfoSection)roomInfoSection`
- [ ] Show room creation: `- (void)showRoomCreationModalWithBubbleData:(id) bubbleData`
- [ ] Show member details: `- (void)showMemberDetails:(MXRoomMember *)member`
- [ ] Show emoji picker: `- (void)reactionsMenuViewModelDidTapMoreReactions:(ReactionsMenuViewModel *)viewModel forEventId:(NSString *)eventId`
- [ ] Show edit history: `- (void)showEditHistoryForEventId:(NSString*)eventId animated:(BOOL)animated`
- [ ] Show media picker: `- (void)showMediaPickerAnimated:(BOOL)animated`
- [ ] Show sticker picker: `- (void)roomInputToolbarViewPresentStickerPicker`
- [ ] Show room search: `if ([[segue identifier] isEqualToString:@"showRoomSearch"])`
- [ ] Show contact details: `[[segue identifier] isEqualToString:@"showContactDetails"])`
- [ ] Show unknown devices: `([[segue identifier] isEqualToString:@"showUnknownDevices"])`
Nice to have:
- [ ] Jitsi call management: `[[AppDelegate theDelegate].callPresenter displayJitsiCallWithWidget:jitsiWidget];` & `[[AppDelegate theDelegate].callPresenter endActiveJitsiCall];`
- [ ] Missed discussion counts
- [ ] Missed discussion count `[[AppDelegate theDelegate].masterTabBarController missedDiscussionsCount];`
- [ ] Missed highlighted discussion count : `missedHighlightDiscussionsCount`
- [ ] Show error as alert: `[[AppDelegate theDelegate] showErrorAsAlert:error];`
- [ ] Show alert with title: `[[AppDelegate theDelegate] showAlertWithTitle:title]`
- [ ] Visible room id: `[AppDelegate theDelegate].visibleRoomId = self.roomDataSource.roomId;`
- [ ] Last navigated room id from push: `lastNavigatedRoomIdFromPush`
Contributor guide
Research direction
Review RoomViewController and the listed AppDelegate, segue, call, and discussion-count entry points; begin by separating the Priority items into the proposed RoomCoordinator. Done means those responsibilities are handled outside RoomViewController, with the Todo next and Nice to have items addressed according to their listed priority.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- swift
- Domain
- mobile
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100