Skip to content

Commit 026d9a8

Browse files
Merge pull request #1279 from GetStream/develop
Next Release
2 parents bd8e690 + 30cec62 commit 026d9a8

File tree

38 files changed

+415
-183
lines changed

38 files changed

+415
-183
lines changed

docusaurus/docs/reactnative/customization/custom_components.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ It also gives insight into what data the out of the box component is using, and
207207

208208
### Equality
209209

210-
It is import to consider equality when writing `areEqual` checks.
210+
It is important to consider equality when writing `areEqual` checks.
211211
Trying to compare two functions, objects, or arrays during a re-render cycle, unless they are themselves memoized or in another way referentially stable, will fail a shallow comparison.
212212
For this reason in the out of the box components it is often considered _when_ the component should re-render, and the equality checks are created based on that logic.
213213

examples/SampleApp/ios/SampleApp.xcodeproj/project.pbxproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -495,7 +495,7 @@
495495
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
496496
CLANG_ENABLE_MODULES = YES;
497497
CODE_SIGN_IDENTITY = "iPhone Distribution";
498-
CURRENT_PROJECT_VERSION = 84;
498+
CURRENT_PROJECT_VERSION = 90;
499499
DEVELOPMENT_TEAM = EHV7XZLAHA;
500500
ENABLE_BITCODE = NO;
501501
INFOPLIST_FILE = SampleApp/Info.plist;
@@ -525,7 +525,7 @@
525525
CLANG_ENABLE_MODULES = YES;
526526
CODE_SIGN_IDENTITY = "iPhone Distribution";
527527
CODE_SIGN_STYLE = Manual;
528-
CURRENT_PROJECT_VERSION = 84;
528+
CURRENT_PROJECT_VERSION = 90;
529529
DEVELOPMENT_TEAM = EHV7XZLAHA;
530530
INFOPLIST_FILE = SampleApp/Info.plist;
531531
LD_RUNPATH_SEARCH_PATHS = (

examples/SampleApp/ios/SampleApp/Info.plist

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,11 @@
1717
<key>CFBundlePackageType</key>
1818
<string>APPL</string>
1919
<key>CFBundleShortVersionString</key>
20-
<string>1.2.0</string>
20+
<string>1.3.0</string>
2121
<key>CFBundleSignature</key>
2222
<string>????</string>
2323
<key>CFBundleVersion</key>
24-
<string>84</string>
24+
<string>90</string>
2525
<key>LSRequiresIPhoneOS</key>
2626
<true />
2727
<key>NSAppTransportSecurity</key>

examples/SampleApp/ios/SampleAppTests/Info.plist

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@
1515
<key>CFBundlePackageType</key>
1616
<string>BNDL</string>
1717
<key>CFBundleShortVersionString</key>
18-
<string>1.2.0</string>
18+
<string>1.3.0</string>
1919
<key>CFBundleSignature</key>
2020
<string>????</string>
2121
<key>CFBundleVersion</key>
22-
<string>84</string>
22+
<string>90</string>
2323
</dict>
2424
</plist>

package/CHANGELOG.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -908,13 +908,13 @@ We are going to incrementally implement these changes and will try to keep every
908908
- Upgrading @stream-io/react-native-simple-markdown to 1.2.1 [d89f012](https://github.com/GetStream/react-native-simple-markdown/commit/d89f0128e6c4f179f2afe9f9a896b289288e2afd)
909909

910910
It fixes the issue with markdown where text like "#stream" was treated as heading, thus disallowing anyone to use hashtags in chat.
911-
912-
- Internal directory restructuring of components
911+
912+
- Internal directory restructuring of components
913913

914914
## [0.14.0] 2020-07-16
915915

916916
- Fixing compatibility issues with react-native 0.63 [88721a0](https://github.com/GetStream/stream-chat-react-native/commit/88721a077b3bb3369c3d8dbde9451d84f6761d87)
917-
- Updating stream-chat to 0.13.x [4af1b1d](https://github.com/GetStream/stream-chat-react-native/commit/4af1b1d63a3c7dec662f8c75426ea7a7082f26a4)
917+
- Updating stream-chat to 0.13.x [4af1b1d](https://github.com/GetStream/stream-chat-react-native/commit/4af1b1d63a3c7dec662f8c75426ea7a7082f26a4)
918918

919919
## [0.13.1] 2020-07-14
920920

@@ -1263,7 +1263,7 @@ From now on, autocomplete input (specifically mentions autocomplete) will be api
12631263

12641264
## [0.7.0] 2020-03-17
12651265

1266-
- Introducing internationalization (i18n) support for the sdk https://github.com/GetStream/stream-chat-react-native/blob/master/src/components/docs/Streami18n.md
1266+
- Introducing internationalization (i18n) support for the sdk https://github.com/GetStream/stream-chat-react-native/blob/master/package/src/components/docs/Streami18n.md
12671267

12681268
## [0.6.6] 2020-02-20
12691269

package/src/components/Attachment/Giphy.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,7 @@ const GiphyWithContext = <
201201
{ backgroundColor: white, borderColor: `${black}0D` },
202202
selectionContainer,
203203
]}
204+
testID='giphy-action-attachment'
204205
>
205206
<View style={[styles.header, header]}>
206207
<GiphyIcon />
@@ -229,6 +230,7 @@ const GiphyWithContext = <
229230
{ borderColor: grey_gainsboro, borderRightWidth: 1 },
230231
buttonContainer,
231232
]}
233+
testID={`${actions?.[2].value}-action-button`}
232234
>
233235
<Text style={[styles.cancel, { color: grey }, cancel]}>{actions?.[2].text}</Text>
234236
</TouchableOpacity>
@@ -243,6 +245,7 @@ const GiphyWithContext = <
243245
{ borderColor: grey_gainsboro, borderRightWidth: 1 },
244246
buttonContainer,
245247
]}
248+
testID={`${actions?.[1].value}-action-button`}
246249
>
247250
<Text style={[styles.shuffle, { color: grey }, shuffle]}>{actions?.[1].text}</Text>
248251
</TouchableOpacity>
@@ -253,6 +256,7 @@ const GiphyWithContext = <
253256
}
254257
}}
255258
style={[styles.buttonContainer, { borderColor: grey_gainsboro }, buttonContainer]}
259+
testID={`${actions?.[0].value}-action-button`}
256260
>
257261
<Text style={[styles.send, { color: accent_blue }, send]}>{actions?.[0].text}</Text>
258262
</TouchableOpacity>

package/src/components/Attachment/__tests__/Attachment.test.js

Lines changed: 0 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,7 @@ import {
1010
generateAudioAttachment,
1111
generateCardAttachment,
1212
generateFileAttachment,
13-
generateGiphyAttachment,
1413
generateImageAttachment,
15-
generateImgurAttachment,
1614
} from '../../../mock-builders/generator/attachment';
1715
import { generateMessage } from '../../../mock-builders/generator/message';
1816
import { Attachment } from '../Attachment';
@@ -53,65 +51,6 @@ describe('Attachment', () => {
5351
});
5452
});
5553

56-
it('should render Card component for "imgur" type attachment', async () => {
57-
const attachment = generateImgurAttachment();
58-
const { getByTestId } = render(getAttachmentComponent({ attachment }));
59-
60-
await waitFor(() => {
61-
expect(getByTestId('giphy-attachment')).toBeTruthy();
62-
});
63-
});
64-
65-
it('should render Card component for "giphy" type attachment', async () => {
66-
const attachment = generateGiphyAttachment();
67-
const { getByTestId } = render(getAttachmentComponent({ attachment }));
68-
69-
await waitFor(() => {
70-
expect(getByTestId('giphy-attachment')).toBeTruthy();
71-
});
72-
});
73-
74-
it('"giphy" attachment size should be customisable', async () => {
75-
const attachment = generateGiphyAttachment();
76-
attachment.giphy = {
77-
fixed_height: {
78-
height: '200',
79-
url: 'https://media1.giphy.com/media/test/fixed_height.gif',
80-
width: '375',
81-
},
82-
original: {
83-
height: '256',
84-
url: 'https://media1.giphy.com/media/test/original.gif',
85-
width: '480',
86-
},
87-
};
88-
const { getByTestId: getByTestIdFixedHeight } = render(
89-
getAttachmentComponent({ attachment, giphyVersion: 'fixed_height' }),
90-
);
91-
const { getByTestId: getByTestIdOriginal } = render(
92-
getAttachmentComponent({ attachment, giphyVersion: 'original' }),
93-
);
94-
await waitFor(() => {
95-
const checkImageProps = (imageProps, specificSizedGiphyData) => {
96-
let imageStyle = imageProps.style;
97-
if (Array.isArray(imageStyle)) {
98-
imageStyle = Object.assign({}, ...imageStyle);
99-
}
100-
expect(imageStyle.height).toBe(parseFloat(specificSizedGiphyData.height));
101-
expect(imageStyle.width).toBe(parseFloat(specificSizedGiphyData.width));
102-
expect(imageProps.source.uri).toBe(specificSizedGiphyData.url);
103-
};
104-
checkImageProps(
105-
getByTestIdFixedHeight('giphy-attachment-image').props,
106-
attachment.giphy.fixed_height,
107-
);
108-
checkImageProps(
109-
getByTestIdOriginal('giphy-attachment-image').props,
110-
attachment.giphy.original,
111-
);
112-
});
113-
});
114-
11554
it('should render UrlPreview component if attachment has title_link or og_scrape_url', async () => {
11655
const attachment = generateImageAttachment({
11756
og_scrape_url: uuidv4(),

0 commit comments

Comments
 (0)