Skip to content

Commit 40ed1a4

Browse files
authored
Merge pull request #51 from sendbird/release/2.1.0
[SDKRLSD-595] Release/2.1.0
2 parents e381040 + c778a84 commit 40ed1a4

File tree

119 files changed

+1508
-765
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

119 files changed

+1508
-765
lines changed

.circleci/config.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ jobs:
7373
echo "export PILOT_USERNAME=$FASTLANE_IOS_APPLE_ID" >> $BASH_ENV
7474
echo "export PILOT_APPLE_ID=$FASTLANE_IOS_ITC_TEAM_ID" >> $BASH_ENV
7575
echo "export PILOT_DEV_PORTAL_TEAM_ID=$FASTLANE_IOS_TEAM_ID" >> $BASH_ENV
76+
echo "export PILOT_ITC_PROVIDER=$FASTLANE_IOS_TEAM_ID" >> $BASH_ENV
7677
echo "export PILOT_SKIP_WAITING_FOR_BUILD_PROCESSING=true" >> $BASH_ENV
7778
echo "export FASTLANE_APPLE_APPLICATION_SPECIFIC_PASSWORD=$FASTLANE_IOS_APPLE_APPLICATION_SPECIFIC_PASSWORD" >> $BASH_ENV
7879
- run:

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ jobs:
3838

3939
- name: Install dependencies
4040
if: steps.check_cache.outputs.cache-hit == ''
41-
run: yarn install
41+
run: yarn install --frozen-lockfile
4242
outputs:
4343
cache_node_modules_key: ${{ steps.lockfile_hash.outputs.hash }}
4444

CHANGELOG.md

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,52 @@
33
All notable changes to this project will be documented in this file.
44
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
55

6+
## [2.1.0](https://github.com/sendbird/sendbird-uikit-react-native/compare/v2.0.3...v2.1.0) (2022-12-06)
7+
8+
9+
### ⚠ BREAKING CHANGES
10+
11+
* **uikit:** update camera roll module
12+
13+
### Features
14+
15+
* added group channel type selector ([9fb7a19](https://github.com/sendbird/sendbird-uikit-react-native/commit/9fb7a193b5e245ba89030ef9c9d8abae95cf4bba))
16+
* **chat-hooks:** added useGroupChannel hook ([9392dea](https://github.com/sendbird/sendbird-uikit-react-native/commit/9392dea1f5b7c5a102c0aa96107a472f8433bae8))
17+
* **foundation:** added profile card ui ([472f02f](https://github.com/sendbird/sendbird-uikit-react-native/commit/472f02f064cbad416661cf49e90c4c9509eb1a4c))
18+
* support broadcast and supergroup channel ([895fa3b](https://github.com/sendbird/sendbird-uikit-react-native/commit/895fa3b27ffb06977fb326610e8234cfb812ec1f))
19+
* **uikit:** added enableUseUserIdForNickname option ([5d3cfd8](https://github.com/sendbird/sendbird-uikit-react-native/commit/5d3cfd839ba7b0a58f7aba19d46b07b5d8dbea2d))
20+
* **uikit:** added group channel banned users fragment ([80e1a5e](https://github.com/sendbird/sendbird-uikit-react-native/commit/80e1a5ebaf6b80e6bb015ff64a9b4cc6ef2e19d7))
21+
* **uikit:** added group channel moderations fragment ([4213e6d](https://github.com/sendbird/sendbird-uikit-react-native/commit/4213e6dc279739d69dc2617de54ba1446c0e16e3))
22+
* **uikit:** added group channel muted members fragment ([3784b73](https://github.com/sendbird/sendbird-uikit-react-native/commit/3784b7364835fde061f91b157632dc864f555ab1))
23+
* **uikit:** added group channel operators add fragment ([4ac84ee](https://github.com/sendbird/sendbird-uikit-react-native/commit/4ac84ee727b4336555ed84deb70775c308b6d2e5))
24+
* **uikit:** added group channel operators fragment ([c7f6626](https://github.com/sendbird/sendbird-uikit-react-native/commit/c7f6626afd4236542f41aee48cfcdf9b217835b1))
25+
* **uikit:** added mini profile card ([0877463](https://github.com/sendbird/sendbird-uikit-react-native/commit/08774638ba0e283f6da2c63545be746746b64058))
26+
* **uikit:** added moderation in group channel members ([9b25059](https://github.com/sendbird/sendbird-uikit-react-native/commit/9b250594fa3ecf4c02ceeb3ea035ac7060fcf0f5))
27+
* **utils:** added buffered request function ([d3e375c](https://github.com/sendbird/sendbird-uikit-react-native/commit/d3e375cc05721c251846d27eb2f8f8e86ad4379f))
28+
29+
30+
### Bug Fixes
31+
32+
* **chat-hooks:** prevent MESSAGE_RECEIVED handler called twice when receiving new message. ([ab988c6](https://github.com/sendbird/sendbird-uikit-react-native/commit/ab988c611d801e8eecd0b49743743c63ee48e1e2))
33+
34+
35+
### Improvements
36+
37+
* **chat-hooks:** removed activeChannel from useGroupChannelMessages for normalizing ([70fb1c7](https://github.com/sendbird/sendbird-uikit-react-native/commit/70fb1c7ec2acad4f74d95c37c6d0bdf66d3eab88))
38+
* **uikit:** update camera roll module ([5ddb5d3](https://github.com/sendbird/sendbird-uikit-react-native/commit/5ddb5d33f81d8fdd7b4dd2fa541cd687d5a9bd30))
39+
40+
41+
### Documentation
42+
43+
* added list banned users in group channel ([4f60dfb](https://github.com/sendbird/sendbird-uikit-react-native/commit/4f60dfb19e5ae6ee8ab439b23b27cf1ebb0ae213))
44+
* added list muted members ([877d7d8](https://github.com/sendbird/sendbird-uikit-react-native/commit/877d7d8928b8cfebbb64320756e940e959991e9a))
45+
* added list operators in group channel ([a4afbf7](https://github.com/sendbird/sendbird-uikit-react-native/commit/a4afbf75e80432fe5cd7ada79b1edb1f33db93d0))
46+
* added moderating channels and members page ([aad20af](https://github.com/sendbird/sendbird-uikit-react-native/commit/aad20af84a51ad7eb288bc016efe395b791c8754))
47+
* added register member as operators ([7dde222](https://github.com/sendbird/sendbird-uikit-react-native/commit/7dde22261dca51e19c2d9475141be18ec74aa22b))
48+
* update docs validation snippet ([4aaeb89](https://github.com/sendbird/sendbird-uikit-react-native/commit/4aaeb894c172c58e95feed03d14fd75b94ec9b19))
49+
50+
51+
652
## [2.0.3](https://github.com/sendbird/sendbird-uikit-react-native/compare/v2.0.1...v2.0.3) (2022-12-01)
753

854

README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,13 @@ yarn workspace @sendbird/uikit-react-native run create-domain
9999
> **Note**
100100
> We are using [yarn workspaces](https://classic.yarnpkg.com/en/docs/workspaces) and [lerna](https://github.com/lerna/lerna) to maintain this monorepo
101101
102+
#### Patch package
103+
104+
If you need to patch some packages for the sample to work using `patch-package`
105+
106+
1. `npx patch-package package-name` > mark as comment `yarn-path` in `.yarnrc` file
107+
2. OR `./node_modules/.bin/patch-package package-name` > just run
108+
102109
#### Package dependencies
103110

104111
See [yarn workspace](https://classic.yarnpkg.com/en/docs/cli/workspace)

docs-validation/4_key-functions/ConfiguringChannelSettings/ConfigureGroupChannelSettings.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,15 @@ const GroupChannelSettingsScreen = ({ params }: { params: { channelUrl: string }
1717
const navigateToBack = () => {};
1818
const navigateToGroupChannelListScreen = () => {};
1919
const navigateToGroupChannelMembersScreen = () => {};
20-
const navigateToGroupChannelModerationsScreen = () => {};
20+
const navigateToGroupChannelModerationScreen = () => {};
2121

2222
return (
2323
<GroupChannelSettingsFragment
2424
channel={channel}
2525
onPressHeaderLeft={navigateToBack}
2626
onPressMenuLeaveChannel={navigateToGroupChannelListScreen}
2727
onPressMenuMembers={navigateToGroupChannelMembersScreen}
28-
onPressMenuModerations={navigateToGroupChannelModerationsScreen}
28+
onPressMenuModeration={navigateToGroupChannelModerationScreen}
2929
/>
3030
);
3131
};
@@ -74,15 +74,15 @@ const GroupChannelSettingsScreen2 = ({ params }: { params: { channelUrl: string
7474
const navigateToBack = () => {};
7575
const navigateToGroupChannelListScreen = () => {};
7676
const navigateToGroupChannelMembersScreen = () => {};
77-
const navigateToGroupChannelModerationsScreen = () => {};
77+
const navigateToGroupChannelModerationScreen = () => {};
7878

7979
return (
8080
<GroupChannelSettingsFragment2
8181
channel={channel}
8282
onPressHeaderLeft={navigateToBack}
8383
onPressMenuLeaveChannel={navigateToGroupChannelListScreen}
8484
onPressMenuMembers={navigateToGroupChannelMembersScreen}
85-
onPressMenuModerations={navigateToGroupChannelModerationsScreen}
85+
onPressMenuModeration={navigateToGroupChannelModerationScreen}
8686
menuItemsCreator={(items) => {
8787
items.unshift({
8888
icon: 'channels',

docs-validation/4_key-functions/CreatingAChannel/CreateAGroupChannel.tsx

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import React, { useContext } from 'react';
33
const MyAppUserBar = (_: Record<string, unknown>) => <></>;
44
const createMyAppUserQuery = () => ({
55
async next(): Promise<MyAppUser[]> {
6-
return [{ uid: '', name: '', profile: '' }];
6+
return [{ userId: '', name: '', profile: '' }];
77
},
88
isLoading: false,
99
hasNext: false,
@@ -71,10 +71,14 @@ const Component2 = () => {
7171
* Customization
7272
* {@link https://sendbird.com/docs/uikit/v3/react-native/key-functions/creating-a-channel/create-a-group-channel#2-customization}
7373
* */
74-
import { CustomQuery } from '@sendbird/uikit-chat-hooks';
74+
import { CustomQuery, UserStruct } from '@sendbird/uikit-chat-hooks';
7575
import { createGroupChannelCreateFragment } from '@sendbird/uikit-react-native';
7676

77-
type MyAppUser = { uid: string; name: string; profile: string };
77+
interface MyAppUser extends UserStruct {
78+
userId: string;
79+
name: string;
80+
profile: string;
81+
}
7882

7983
const myAppUserQueryCreator = () => {
8084
const query = createMyAppUserQuery();
@@ -103,9 +107,8 @@ const GroupChannelCreateScreen2 = ({ params }: { params: { channelType: GroupCha
103107
onCreateChannel={replaceToGroupChannelScreen}
104108
channelType={channelTypeFromGroupChannelListScreen}
105109
queryCreator={myAppUserQueryCreator}
106-
userIdsGenerator={(users) => users.map((u) => u.uid)}
107110
renderUser={(user, selectedUsers, setSelectedUsers) => {
108-
const selected = selectedUsers.findIndex((u) => u.uid === user.uid) > -1;
111+
const selected = selectedUsers.findIndex((u) => u.userId === user.userId) > -1;
109112
return <MyAppUserBar selected={selected} user={user} onToggle={setSelectedUsers} />;
110113
}}
111114
/>

docs-validation/4_key-functions/InviteUsers.tsx

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import React from "react";
33
const MyAppUserBar = (_: Record<string, unknown>) => <></>;
44
const createMyAppUserQuery = () => ({
55
async next(): Promise<MyAppUser[]> {
6-
return [{ uid: '', name: '', profile: '' }];
6+
return [{ userId: '', name: '', profile: '' }];
77
},
88
isLoading: false,
99
hasNext: false,
@@ -82,11 +82,15 @@ const Component2 = () => {
8282
* Customization
8383
* {@link https://sendbird.com/docs/uikit/v3/react-native/key-functions/creating-a-channel/create-a-group-channel#2-customization}
8484
* */
85-
import { CustomQuery } from '@sendbird/uikit-chat-hooks';
85+
import { CustomQuery, UserStruct } from '@sendbird/uikit-chat-hooks';
8686
// import { useSendbirdChat, createGroupChannelInviteFragment } from '@sendbird/uikit-react-native';
8787
// import { useGroupChannel } from '@sendbird/uikit-chat-hooks';
8888

89-
type MyAppUser = { uid: string; name: string; profile: string };
89+
interface MyAppUser extends UserStruct {
90+
userId: string;
91+
name: string;
92+
profile: string;
93+
}
9094

9195
const myAppUserQueryCreator = () => {
9296
const query = createMyAppUserQuery();
@@ -118,9 +122,8 @@ const GroupChannelInviteScreen2 = ({ params }: { params: { channelUrl: string }
118122
onPressHeaderLeft={navigateToBack}
119123
onInviteMembers={navigateToGroupChannel}
120124
queryCreator={myAppUserQueryCreator}
121-
userIdsGenerator={(users) => users.map((u) => u.uid)}
122125
renderUser={(user, selectedUsers, setSelectedUsers) => {
123-
const selected = selectedUsers.findIndex((u) => u.uid === user.uid) > -1;
126+
const selected = selectedUsers.findIndex((u) => u.userId === user.userId) > -1;
124127
return <MyAppUserBar selected={selected} user={user} onToggle={setSelectedUsers} />;
125128
}}
126129
/>
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
const MyHeader = () => null;
2+
3+
/**
4+
*
5+
* {@link }
6+
* */
7+
import React from 'react';
8+
9+
import { useGroupChannel } from '@sendbird/uikit-chat-hooks';
10+
import { createGroupChannelBannedUsersFragment, useSendbirdChat } from '@sendbird/uikit-react-native';
11+
12+
const GroupChannelBannedUsersFragment = createGroupChannelBannedUsersFragment();
13+
const GroupChannelBannedUsersScreen = (params: { channelUrl: string }) => {
14+
const { sdk } = useSendbirdChat();
15+
const { channel } = useGroupChannel(sdk, params.channelUrl);
16+
if (!channel) return null;
17+
18+
const navigateToBack = () => {};
19+
20+
return <GroupChannelBannedUsersFragment channel={channel} onPressHeaderLeft={navigateToBack} />;
21+
};
22+
23+
/**
24+
*
25+
* {@link }
26+
* */
27+
const GroupChannelBannedUsersFragment2 = createGroupChannelBannedUsersFragment({
28+
Header: () => <MyHeader />, // Use custom header
29+
});
30+
const GroupChannelBannedUsersScreen2 = (params: { channelUrl: string }) => {
31+
const { sdk } = useSendbirdChat();
32+
const { channel } = useGroupChannel(sdk, params.channelUrl);
33+
if (!channel) return null;
34+
35+
const navigateToBack = () => {};
36+
37+
return <GroupChannelBannedUsersFragment channel={channel} onPressHeaderLeft={navigateToBack} />;
38+
};
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
const MyHeader = () => null;
2+
3+
/**
4+
*
5+
* {@link }
6+
* */
7+
import React from 'react';
8+
9+
import { useGroupChannel } from '@sendbird/uikit-chat-hooks';
10+
import { createGroupChannelMutedMembersFragment, useSendbirdChat } from '@sendbird/uikit-react-native';
11+
12+
const GroupChannelMutedMembersFragment = createGroupChannelMutedMembersFragment();
13+
const GroupChannelMutedMembersScreen = (params: { channelUrl: string }) => {
14+
const { sdk } = useSendbirdChat();
15+
const { channel } = useGroupChannel(sdk, params.channelUrl);
16+
if (!channel) return null;
17+
18+
const navigateToBack = () => {};
19+
20+
return <GroupChannelMutedMembersFragment channel={channel} onPressHeaderLeft={navigateToBack} />;
21+
};
22+
23+
/**
24+
*
25+
* {@link }
26+
* */
27+
const GroupChannelMutedMembersFragment2 = createGroupChannelMutedMembersFragment({
28+
Header: () => <MyHeader />, // Use custom header
29+
});
30+
const GroupChannelMutedMembersScreen2 = (params: { channelUrl: string }) => {
31+
const { sdk } = useSendbirdChat();
32+
const { channel } = useGroupChannel(sdk, params.channelUrl);
33+
if (!channel) return null;
34+
35+
const navigateToBack = () => {};
36+
37+
return <GroupChannelMutedMembersFragment channel={channel} onPressHeaderLeft={navigateToBack} />;
38+
};
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
const MyHeader = () => null;
2+
3+
/**
4+
*
5+
* {@link }
6+
* */
7+
import React from 'react';
8+
9+
import { useGroupChannel } from '@sendbird/uikit-chat-hooks';
10+
import { createGroupChannelOperatorsFragment, useSendbirdChat } from '@sendbird/uikit-react-native';
11+
12+
const GroupChannelOperatorsFragment = createGroupChannelOperatorsFragment();
13+
const GroupChannelOperatorsScreen = (params: { channelUrl: string }) => {
14+
const { sdk } = useSendbirdChat();
15+
const { channel } = useGroupChannel(sdk, params.channelUrl);
16+
if (!channel) return null;
17+
18+
const navigateToBack = () => {};
19+
const navigateToGroupChannelRegisterOperator = () => {};
20+
21+
return (
22+
<GroupChannelOperatorsFragment
23+
channel={channel}
24+
onPressHeaderLeft={navigateToBack}
25+
onPressHeaderRight={navigateToGroupChannelRegisterOperator}
26+
/>
27+
);
28+
};
29+
30+
/**
31+
*
32+
* {@link }
33+
* */
34+
const GroupChannelOperatorsFragment2 = createGroupChannelOperatorsFragment({
35+
Header: () => <MyHeader />, // Use custom header
36+
});
37+
const GroupChannelOperatorsScreen2 = (params: { channelUrl: string }) => {
38+
const { sdk } = useSendbirdChat();
39+
const { channel } = useGroupChannel(sdk, params.channelUrl);
40+
if (!channel) return null;
41+
42+
const navigateToBack = () => {};
43+
const navigateToGroupChannelRegisterOperator = () => {};
44+
45+
return (
46+
<GroupChannelOperatorsFragment
47+
channel={channel}
48+
onPressHeaderLeft={navigateToBack}
49+
onPressHeaderRight={navigateToGroupChannelRegisterOperator}
50+
/>
51+
);
52+
};

0 commit comments

Comments
 (0)