From 3a746cf23a82bf8f41c3a7d26e05a2f06ad17c6f Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Mon, 10 May 2021 23:07:08 +0200 Subject: [PATCH] Split sample step 3: rooms and spaces --- vector/sampledata/matrix.json | 40 ------------------- vector/sampledata/rooms.json | 14 +++++++ vector/sampledata/spaces.json | 28 +++++++++++++ .../layout/bottom_sheet_space_settings.xml | 4 +- .../res/layout/fragment_matrix_profile.xml | 2 +- .../fragment_matrix_to_room_space_card.xml | 7 ++-- .../main/res/layout/fragment_room_detail.xml | 4 +- .../fragment_room_preview_no_preview.xml | 4 +- .../layout/fragment_room_setting_generic.xml | 2 +- .../main/res/layout/fragment_room_uploads.xml | 2 +- .../res/layout/fragment_space_add_rooms.xml | 2 +- .../layout/item_bottom_sheet_room_preview.xml | 2 +- .../res/layout/item_expandable_textview.xml | 2 +- .../src/main/res/layout/item_public_room.xml | 6 +-- .../main/res/layout/item_room_invitation.xml | 4 +- .../res/layout/item_room_to_add_in_space.xml | 2 +- .../item_room_to_add_in_space_placeholder.xml | 22 +--------- .../main/res/layout/item_space_roomchild.xml | 4 +- .../main/res/layout/item_space_subspace.xml | 2 +- .../res/layout/item_space_top_summary.xml | 2 +- .../main/res/layout/item_suggested_room.xml | 2 +- ...meline_event_merged_room_creation_stub.xml | 2 +- .../src/main/res/layout/item_unknown_room.xml | 2 +- .../layout/view_stub_room_profile_header.xml | 4 +- 24 files changed, 74 insertions(+), 91 deletions(-) delete mode 100644 vector/sampledata/matrix.json create mode 100644 vector/sampledata/rooms.json create mode 100644 vector/sampledata/spaces.json diff --git a/vector/sampledata/matrix.json b/vector/sampledata/matrix.json deleted file mode 100644 index b924e5f351..0000000000 --- a/vector/sampledata/matrix.json +++ /dev/null @@ -1,40 +0,0 @@ -{ - "data": [ - { - "roomName": "Matrix HQ", - "roomAlias": "#matrix:matrix.org", - "spaceName": "Runner's world", - "roomTopic": "Welcome to Matrix HQ! Here is the rest of the room topic, with a https://www.example.org url and a phone number: 0102030405 which should not be clickable." - }, - { - "roomName": "Room name very loooooooong with some details", - "roomAlias": "#matrix:matrix.org", - "spaceName": "Matrix Org", - "roomTopic": "Room topic very loooooooong with some details" - }, - { - "roomName": "Room name very loooooooong with some details", - "roomAlias": "#matrix:matrix.org", - "spaceName": "Rennes", - "roomTopic": "Room topic very loooooooong with some details" - }, - { - "roomName": "Room name very loooooooong with some details", - "roomAlias": "#matrix:matrix.org", - "spaceName": "Est London", - "roomTopic": "Room topic very loooooooong with some details" - }, - { - "roomName": "Room name very loooooooong with some details", - "roomAlias": "#matrix:matrix.org", - "spaceName": "Element HQ", - "roomTopic": "Room topic very loooooooong with some details" - }, - { - "roomName": "Room name very loooooooong with some details", - "roomAlias": "#matrix:matrix.org", - "spaceName": "My Company", - "roomTopic": "Room topic very loooooooong with some details" - } - ] -} diff --git a/vector/sampledata/rooms.json b/vector/sampledata/rooms.json new file mode 100644 index 0000000000..9304aa308d --- /dev/null +++ b/vector/sampledata/rooms.json @@ -0,0 +1,14 @@ +{ + "data": [ + { + "name": "Matrix HQ", + "alias": "#matrix:matrix.org", + "topic": "Welcome to Matrix HQ! Here is the rest of the room topic, with a https://www.example.org url and a phone number: 0102030405 which should not be clickable." + }, + { + "name": "Room name very loooooooong with some details", + "alias": "#matrix:matrix.org", + "topic": "Room topic very loooooooong with some details" + } + ] +} diff --git a/vector/sampledata/spaces.json b/vector/sampledata/spaces.json new file mode 100644 index 0000000000..f58c2ca5da --- /dev/null +++ b/vector/sampledata/spaces.json @@ -0,0 +1,28 @@ +{ + "data": [ + { + "name": "Runner's world", + "topic": "Space about running around the world!" + }, + { + "name": "Matrix Org", + "topic": "Space about matrix.org!" + }, + { + "name": "Rennes", + "topic": "Venez visiter Rennes!" + }, + { + "name": "Est London", + "topic": "All about Est London!" + }, + { + "name": "Element HQ", + "topic": "All about Element!" + }, + { + "name": "My Company", + "topic": "All about My company!" + } + ] +} diff --git a/vector/src/main/res/layout/bottom_sheet_space_settings.xml b/vector/src/main/res/layout/bottom_sheet_space_settings.xml index a7ec33a9b0..5679347766 100644 --- a/vector/src/main/res/layout/bottom_sheet_space_settings.xml +++ b/vector/src/main/res/layout/bottom_sheet_space_settings.xml @@ -43,7 +43,7 @@ app:layout_constraintStart_toEndOf="@id/spaceAvatarImageView" app:layout_constraintTop_toTopOf="parent" app:layout_constraintVertical_chainStyle="packed" - tools:text="@sample/users.json/data/displayName" /> + tools:text="@sample/spaces.json/data/name" /> diff --git a/vector/src/main/res/layout/fragment_matrix_profile.xml b/vector/src/main/res/layout/fragment_matrix_profile.xml index 697541497a..398aaf2c4a 100644 --- a/vector/src/main/res/layout/fragment_matrix_profile.xml +++ b/vector/src/main/res/layout/fragment_matrix_profile.xml @@ -87,7 +87,7 @@ app:layout_constraintStart_toEndOf="@+id/matrixProfileToolbarAvatarImageView" app:layout_constraintTop_toTopOf="parent" tools:alpha="1" - tools:text="@sample/matrix.json/data/roomName" /> + tools:text="@sample/rooms.json/data/name" /> diff --git a/vector/src/main/res/layout/fragment_matrix_to_room_space_card.xml b/vector/src/main/res/layout/fragment_matrix_to_room_space_card.xml index 4635cabffe..efe21ddfb1 100644 --- a/vector/src/main/res/layout/fragment_matrix_to_room_space_card.xml +++ b/vector/src/main/res/layout/fragment_matrix_to_room_space_card.xml @@ -52,7 +52,7 @@ android:textSize="15sp" android:textStyle="bold" app:layout_constraintTop_toBottomOf="@+id/matrixToCardAvatar" - tools:text="@sample/matrix.json/data/roomName" /> + tools:text="@sample/rooms.json/data/name" /> + tools:text="@sample/rooms.json/data/alias" + tools:visibility="visible" /> + tools:text="@sample/rooms.json/data/topic" /> + tools:text="@sample/rooms.json/data/name" /> + tools:text="@sample/rooms.json/data/topic" /> diff --git a/vector/src/main/res/layout/fragment_room_preview_no_preview.xml b/vector/src/main/res/layout/fragment_room_preview_no_preview.xml index d840d52f21..dc23a8f33f 100644 --- a/vector/src/main/res/layout/fragment_room_preview_no_preview.xml +++ b/vector/src/main/res/layout/fragment_room_preview_no_preview.xml @@ -93,7 +93,7 @@ android:textAppearance="@style/TextAppearance.Vector.Title" android:textSize="15sp" android:textStyle="bold" - tools:text="@sample/matrix.json/data/roomName" /> + tools:text="@sample/rooms.json/data/name" /> + tools:text="@sample/rooms.json/data/topic" /> + tools:text="@sample/rooms.json/data/name" /> diff --git a/vector/src/main/res/layout/fragment_room_uploads.xml b/vector/src/main/res/layout/fragment_room_uploads.xml index 421059bd75..39ba60f1a7 100644 --- a/vector/src/main/res/layout/fragment_room_uploads.xml +++ b/vector/src/main/res/layout/fragment_room_uploads.xml @@ -62,7 +62,7 @@ app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toEndOf="@+id/roomUploadsToolbarAvatarImageView" app:layout_constraintTop_toTopOf="parent" - tools:text="@sample/matrix.json/data/roomName" /> + tools:text="@sample/rooms.json/data/name" /> diff --git a/vector/src/main/res/layout/fragment_space_add_rooms.xml b/vector/src/main/res/layout/fragment_space_add_rooms.xml index 6619d06cca..a084fa943d 100644 --- a/vector/src/main/res/layout/fragment_space_add_rooms.xml +++ b/vector/src/main/res/layout/fragment_space_add_rooms.xml @@ -63,7 +63,7 @@ android:maxLines="1" android:textColor="?riotx_text_secondary" android:textSize="16sp" - tools:text="@sample/matrix.json/data/spaceName" /> + tools:text="@sample/spaces.json/data/name" /> diff --git a/vector/src/main/res/layout/item_bottom_sheet_room_preview.xml b/vector/src/main/res/layout/item_bottom_sheet_room_preview.xml index 384a097f18..9e98774eaf 100644 --- a/vector/src/main/res/layout/item_bottom_sheet_room_preview.xml +++ b/vector/src/main/res/layout/item_bottom_sheet_room_preview.xml @@ -42,7 +42,7 @@ app:layout_constraintStart_toEndOf="@id/bottomSheetRoomPreviewAvatar" app:layout_constraintTop_toTopOf="@id/bottomSheetRoomPreviewAvatar" tools:fontFamily="sans-serif" - tools:text="@sample/matrix.json/data/roomName" /> + tools:text="@sample/rooms.json/data/name" /> + tools:text="@sample/rooms.json/data/topic" /> + tools:text="@sample/rooms.json/data/name" /> + tools:text="@sample/rooms.json/data/alias" /> + tools:text="@sample/rooms.json/data/name" /> + tools:text="@sample/rooms.json/data/topic" /> + tools:text="@sample/rooms.json/data/name" /> - - - - - - - - - - - - - + app:layout_constraintVertical_chainStyle="packed" /> \ No newline at end of file diff --git a/vector/src/main/res/layout/item_space_roomchild.xml b/vector/src/main/res/layout/item_space_roomchild.xml index 799f9730a1..536a749344 100644 --- a/vector/src/main/res/layout/item_space_roomchild.xml +++ b/vector/src/main/res/layout/item_space_roomchild.xml @@ -57,7 +57,7 @@ app:layout_constraintHorizontal_bias="0.5" app:layout_constraintStart_toEndOf="@+id/childRoomAvatar" app:layout_constraintTop_toTopOf="parent" - tools:text="@sample/matrix.json/data/spaceName" /> + tools:text="@sample/rooms.json/data/name" /> + tools:text="@sample/rooms.json/data/topic" /> + tools:text="@sample/spaces.json/data/name" /> \ No newline at end of file diff --git a/vector/src/main/res/layout/item_space_top_summary.xml b/vector/src/main/res/layout/item_space_top_summary.xml index 27b21ece9b..fd451e7b93 100644 --- a/vector/src/main/res/layout/item_space_top_summary.xml +++ b/vector/src/main/res/layout/item_space_top_summary.xml @@ -44,6 +44,6 @@ app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toBottomOf="@id/spaceSummaryMemberCountIcon" - tools:text="@sample/matrix.json/data/roomTopic" /> + tools:text="@sample/spaces.json/data/topic" /> \ No newline at end of file diff --git a/vector/src/main/res/layout/item_suggested_room.xml b/vector/src/main/res/layout/item_suggested_room.xml index f1966f9c8e..dd1c5ba01e 100644 --- a/vector/src/main/res/layout/item_suggested_room.xml +++ b/vector/src/main/res/layout/item_suggested_room.xml @@ -70,7 +70,7 @@ app:layout_constraintEnd_toStartOf="@id/joinSuggestedRoomButton" app:layout_constraintStart_toStartOf="@+id/roomNameView" app:layout_constraintTop_toBottomOf="@+id/roomNameView" - tools:text="@sample/messages.json/data/message" /> + tools:text="@sample/rooms.json/data/topic" /> + tools:text="@sample/rooms.json/data/name" /> + tools:text="@sample/rooms.json/data/name" /> + tools:text="@sample/rooms.json/data/name" /> + tools:text="@sample/rooms.json/data/alias" />