Skip to content

Commit

Permalink
Enhancement - UX Rework: Update the buttons of the room expanded header.
Browse files Browse the repository at this point in the history
- Add a contact list button on the left of the members info to open contact list.
- Add a add members button on the right to open the contacts picker.

element-hq/riot-meta#76
  • Loading branch information
giomfo committed Jun 20, 2017
1 parent 0e1a72e commit 7f561e2
Show file tree
Hide file tree
Showing 11 changed files with 255 additions and 32 deletions.
12 changes: 12 additions & 0 deletions Riot.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -422,6 +422,9 @@
F083BEA21E7009ED00A9B29C /* TableViewCellWithPhoneNumberTextField.m in Sources */ = {isa = PBXBuildFile; fileRef = F083BD1B1E7009ED00A9B29C /* TableViewCellWithPhoneNumberTextField.m */; };
F083BEA31E7009ED00A9B29C /* TableViewCellWithPhoneNumberTextField.xib in Resources */ = {isa = PBXBuildFile; fileRef = F083BD1C1E7009ED00A9B29C /* TableViewCellWithPhoneNumberTextField.xib */; };
F083BEA51E70356E00A9B29C /* RiotTests.m in Sources */ = {isa = PBXBuildFile; fileRef = F083BB041E7005FD00A9B29C /* RiotTests.m */; };
F0A4A1671EF7CB66003630DB /* members_list_icon.png in Resources */ = {isa = PBXBuildFile; fileRef = F0A4A1641EF7CB66003630DB /* members_list_icon.png */; };
F0A4A1681EF7CB66003630DB /* [email protected] in Resources */ = {isa = PBXBuildFile; fileRef = F0A4A1651EF7CB66003630DB /* [email protected] */; };
F0A4A1691EF7CB66003630DB /* [email protected] in Resources */ = {isa = PBXBuildFile; fileRef = F0A4A1661EF7CB66003630DB /* [email protected] */; };
F0D869EB1EC455A100BB0A2B /* create_direct_chat.png in Resources */ = {isa = PBXBuildFile; fileRef = F0D869E81EC455A100BB0A2B /* create_direct_chat.png */; };
F0D869EC1EC455A100BB0A2B /* [email protected] in Resources */ = {isa = PBXBuildFile; fileRef = F0D869E91EC455A100BB0A2B /* [email protected] */; };
F0D869ED1EC455A100BB0A2B /* [email protected] in Resources */ = {isa = PBXBuildFile; fileRef = F0D869EA1EC455A100BB0A2B /* [email protected] */; };
Expand Down Expand Up @@ -1006,6 +1009,9 @@
F083BD1C1E7009ED00A9B29C /* TableViewCellWithPhoneNumberTextField.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = TableViewCellWithPhoneNumberTextField.xib; sourceTree = "<group>"; };
F094A9A21B78D8F000B1FBBF /* Riot.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Riot.app; sourceTree = BUILT_PRODUCTS_DIR; };
F094A9BE1B78D8F000B1FBBF /* RiotTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = RiotTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
F0A4A1641EF7CB66003630DB /* members_list_icon.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = members_list_icon.png; sourceTree = "<group>"; };
F0A4A1651EF7CB66003630DB /* [email protected] */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "[email protected]"; sourceTree = "<group>"; };
F0A4A1661EF7CB66003630DB /* [email protected] */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "[email protected]"; sourceTree = "<group>"; };
F0D869E81EC455A100BB0A2B /* create_direct_chat.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = create_direct_chat.png; sourceTree = "<group>"; };
F0D869E91EC455A100BB0A2B /* [email protected] */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "[email protected]"; sourceTree = "<group>"; };
F0D869EA1EC455A100BB0A2B /* [email protected] */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "[email protected]"; sourceTree = "<group>"; };
Expand Down Expand Up @@ -1156,6 +1162,9 @@
F083BB151E7009EC00A9B29C /* Images */ = {
isa = PBXGroup;
children = (
F0A4A1641EF7CB66003630DB /* members_list_icon.png */,
F0A4A1651EF7CB66003630DB /* [email protected] */,
F0A4A1661EF7CB66003630DB /* [email protected] */,
F0614A101EDEE65000F5DC9A /* cancel.png */,
F0614A111EDEE65000F5DC9A /* [email protected] */,
F0614A121EDEE65000F5DC9A /* [email protected] */,
Expand Down Expand Up @@ -2130,6 +2139,7 @@
F083BD891E7009ED00A9B29C /* file_music_icon.png in Resources */,
F083BDD11E7009ED00A9B29C /* settings_icon.png in Resources */,
F083BD811E7009ED00A9B29C /* [email protected] in Resources */,
F0A4A1681EF7CB66003630DB /* [email protected] in Resources */,
F083BD9F1E7009ED00A9B29C /* [email protected] in Resources */,
F083BD801E7009ED00A9B29C /* favourite.png in Resources */,
F083BD4B1E7009ED00A9B29C /* camera_capture.png in Resources */,
Expand Down Expand Up @@ -2266,6 +2276,7 @@
F083BD631E7009ED00A9B29C /* [email protected] in Resources */,
F083BE991E7009ED00A9B29C /* MessagesSearchResultTextMsgBubbleCell.xib in Resources */,
F083BD711E7009ED00A9B29C /* e2e_unencrypted.png in Resources */,
F0A4A1671EF7CB66003630DB /* members_list_icon.png in Resources */,
F083BE731E7009ED00A9B29C /* RoomOutgoingTextMsgWithoutSenderInfoBubbleCell.xib in Resources */,
F083BD251E7009ED00A9B29C /* admin_icon.png in Resources */,
F083BDBE1E7009ED00A9B29C /* [email protected] in Resources */,
Expand Down Expand Up @@ -2328,6 +2339,7 @@
F083BDE01E7009ED00A9B29C /* video_icon.png in Resources */,
F083BD601E7009ED00A9B29C /* [email protected] in Resources */,
F083BE5F1E7009ED00A9B29C /* RoomIncomingAttachmentWithPaginationTitleBubbleCell.xib in Resources */,
F0A4A1691EF7CB66003630DB /* [email protected] in Resources */,
F083BE8D1E7009ED00A9B29C /* PreviewRoomTitleView.xib in Resources */,
F083BD561E7009ED00A9B29C /* camera_video_capture.png in Resources */,
F083BD651E7009ED00A9B29C /* directChatOff.png in Resources */,
Expand Down
Binary file added Riot/Assets/Images/members_list_icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Riot/Assets/Images/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Riot/Assets/Images/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
25 changes: 22 additions & 3 deletions Riot/Base.lproj/Main.storyboard
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
<segue destination="nDS-pp-sWM" kind="show" identifier="showMemberDetails" id="cUw-vU-gJq"/>
<segue destination="gkO-rP-nGK" kind="show" identifier="showContactDetails" action="showDetailViewController:sender:" id="f5u-Y1-7nt"/>
<segue destination="ZZb-IS-a1F" kind="presentation" identifier="showUnknownDevices" id="wUx-4y-ybn"/>
<segue destination="udm-55-AMb" kind="show" identifier="showContactPicker" id="Q6y-9M-Ugl"/>
</connections>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="94y-cU-qQD" userLabel="First Responder" sceneMemberID="firstResponder"/>
Expand Down Expand Up @@ -524,6 +525,24 @@
</objects>
<point key="canvasLocation" x="1385" y="180"/>
</scene>
<!--Contacts Table View Controller-->
<scene sceneID="2zi-xJ-RQo">
<objects>
<viewController id="udm-55-AMb" customClass="ContactsTableViewController" sceneMemberID="viewController">
<layoutGuides>
<viewControllerLayoutGuide type="top" id="Jch-ZS-1Mm"/>
<viewControllerLayoutGuide type="bottom" id="7q1-ig-sPp"/>
</layoutGuides>
<view key="view" contentMode="scaleToFill" id="6G9-nj-ktC">
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
</view>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="uv3-zI-b3q" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="374" y="449"/>
</scene>
<!--Directory Server Picker View Controller-->
<scene sceneID="t8d-GX-ntZ">
<objects>
Expand Down Expand Up @@ -558,9 +577,9 @@
<image name="tab_rooms_selected.png" width="25" height="25"/>
</resources>
<inferredMetricsTieBreakers>
<segue reference="0ws-cL-0tk"/>
<segue reference="f5u-Y1-7nt"/>
<segue reference="cUw-vU-gJq"/>
<segue reference="Tfl-tq-LQp"/>
<segue reference="ziz-Xl-QVg"/>
<segue reference="fNQ-S3-DbZ"/>
<segue reference="0ws-cL-0tk"/>
</inferredMetricsTieBreakers>
</document>
8 changes: 2 additions & 6 deletions Riot/ViewController/RoomParticipantsViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -601,7 +601,7 @@ - (void)onAddParticipantButtonPressed
// Add a plus icon to the contact cell in the contacts picker, in order to make it more understandable for the end user.
contactsDataSource.contactCellAccessoryImage = [UIImage imageNamed:@"plus_icon"];

// List all the participants by their matrix user id, or a room 3pid invite token to ignore them during the contacts search.
// List all the participants matrix user id to ignore them during the contacts search.
for (Contact *contact in actualParticipants)
{
[contactsDataSource.ignoredContactsByMatrixId setObject:contact forKey:contact.mxMember.userId];
Expand All @@ -612,10 +612,6 @@ - (void)onAddParticipantButtonPressed
{
[contactsDataSource.ignoredContactsByMatrixId setObject:contact forKey:contact.mxMember.userId];
}
else if (contact.mxThirdPartyInvite)
{
[contactsDataSource.ignoredContactsByMatrixId setObject:contact forKey:contact.mxThirdPartyInvite.token];
}
}
if (userParticipant)
{
Expand Down Expand Up @@ -905,7 +901,7 @@ - (void)removePendingActionMask
- (void)pushViewController:(UIViewController*)viewController
{
// Check whether the view controller is displayed inside a segmented one.
if (self.parentViewController)
if (self.parentViewController.navigationController)
{
// Hide back button title
self.parentViewController.navigationItem.backBarButtonItem =[[UIBarButtonItem alloc] initWithTitle:@"" style:UIBarButtonItemStylePlain target:nil action:nil];
Expand Down
4 changes: 3 additions & 1 deletion Riot/ViewController/RoomViewController.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,11 @@

#import "RoomParticipantsViewController.h"

#import "ContactsTableViewController.h"

#import "UIViewController+RiotSearch.h"

@interface RoomViewController : MXKRoomViewController <UISearchBarDelegate, UIGestureRecognizerDelegate, RoomTitleViewTapGestureDelegate, RoomParticipantsViewControllerDelegate, MXKRoomMemberDetailsViewControllerDelegate>
@interface RoomViewController : MXKRoomViewController <UISearchBarDelegate, UIGestureRecognizerDelegate, RoomTitleViewTapGestureDelegate, RoomParticipantsViewControllerDelegate, MXKRoomMemberDetailsViewControllerDelegate, ContactsTableViewControllerDelegate>

// The expanded header
@property (weak, nonatomic) IBOutlet UIView *expandedHeaderContainer;
Expand Down
Loading

0 comments on commit 7f561e2

Please sign in to comment.