Skip to content

Commit 7adaf85

Browse files
Prettier fixes
1 parent 82edfc7 commit 7adaf85

File tree

386 files changed

+5760
-3218
lines changed

Some content is hidden

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

386 files changed

+5760
-3218
lines changed

.releaserc.json

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,9 +72,11 @@
7272
}
7373
],
7474
[
75-
"@semantic-release/exec", {
76-
"prepareCmd": "NEXT_VERSION=${nextRelease.version} npm run build"
77-
}],
75+
"@semantic-release/exec",
76+
{
77+
"prepareCmd": "NEXT_VERSION=${nextRelease.version} npm run build"
78+
}
79+
],
7880
[
7981
"@semantic-release/changelog",
8082
{

docusaurus/react_versioned_sidebars/version-11.x.x-sidebars.json

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,9 @@
1313
"guides/theming/css_and_theming"
1414
]
1515
},
16-
{ "Chat": ["components/core-components/chat", "components/contexts/chat_context"] },
16+
{
17+
"Chat": ["components/core-components/chat", "components/contexts/chat_context"]
18+
},
1719
{
1820
"Channel": [
1921
"components/core-components/channel",
@@ -142,8 +144,10 @@
142144
"guides/sdk-state-management"
143145
]
144146
},
145-
{ "Release Guides": ["release-guides/upgrade-to-v10", "release-guides/upgrade-to-v11"] },
147+
{
148+
"Release Guides": ["release-guides/upgrade-to-v10", "release-guides/upgrade-to-v11"]
149+
},
146150
"troubleshooting/troubleshooting",
147151
"resources/resources"
148152
]
149-
}
153+
}

docusaurus/react_versions.json

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1 @@
1-
[
2-
"11.x.x",
3-
"11.x.x-legacy"
4-
]
1+
["11.x.x", "11.x.x-legacy"]

docusaurus/sidebars-react.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,9 @@
1212
"theming/global-variables"
1313
]
1414
},
15-
{ "Chat": ["components/core-components/chat", "components/contexts/chat_context"] },
15+
{
16+
"Chat": ["components/core-components/chat", "components/contexts/chat_context"]
17+
},
1618
{
1719
"Channel": [
1820
"components/core-components/channel",

e2e/add-message.test.ts

Lines changed: 21 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,10 @@ test.describe('add text message', () => {
2121
await user.clicks(ChannelPreview).text(CHANNEL_NAME);
2222
});
2323

24-
test('message list and preview button should be clear', async ({ controller, user }) => {
24+
test('message list and preview button should be clear', async ({
25+
controller,
26+
user,
27+
}) => {
2528
await controller.clearChannel();
2629
await user.sees(MessageList).empty();
2730
await user.sees(ChannelPreview)(CHANNEL_NAME).empty();
@@ -32,7 +35,9 @@ test.describe('add text message', () => {
3235

3336
await user.sees(MessageList).not.empty();
3437
await user.sees(MessageList).contains.nthMessage(ADDED_MESSAGE_MAIN_LIST);
35-
await user.sees(ChannelPreview)(CHANNEL_NAME).contains.lastMessage(ADDED_MESSAGE_MAIN_LIST);
38+
await user
39+
.sees(ChannelPreview)(CHANNEL_NAME)
40+
.contains.lastMessage(ADDED_MESSAGE_MAIN_LIST);
3641
});
3742
});
3843

@@ -47,12 +52,19 @@ test.describe('receive a message', () => {
4752
await controller.openStory('add-message--user2', selectors.channelPreviewButton);
4853
});
4954

50-
test('channel list should update for channel members and show unread', async ({ user }) => {
55+
test('channel list should update for channel members and show unread', async ({
56+
user,
57+
}) => {
5158
await user.sees(ChannelPreview)(CHANNEL_NAME).not.read();
52-
await user.sees(ChannelPreview)(CHANNEL_NAME).contains.lastMessage(ADDED_MESSAGE_MAIN_LIST);
59+
await user
60+
.sees(ChannelPreview)(CHANNEL_NAME)
61+
.contains.lastMessage(ADDED_MESSAGE_MAIN_LIST);
5362
});
5463

55-
test('message list should update for different users on the channel', async ({ page, user }) => {
64+
test('message list should update for different users on the channel', async ({
65+
page,
66+
user,
67+
}) => {
5668
await Promise.all([
5769
page.waitForResponse((r) => r.url().includes('/read') && r.ok()),
5870
user.clicks(ChannelPreview).text(CHANNEL_NAME),
@@ -73,7 +85,10 @@ test.describe('reply to a message', () => {
7385
await user.clicks(Thread).close();
7486
});
7587

76-
test('thread with no replies contains only parent message', async ({ controller, user }) => {
88+
test('thread with no replies contains only parent message', async ({
89+
controller,
90+
user,
91+
}) => {
7792
await controller.clearChannel();
7893
await controller.sendMessage();
7994
await user.clicks(MessageActions).reply(ADDED_MESSAGE_MAIN_LIST);

e2e/attachment-sizing.test.ts

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,10 @@ const USER1_CHAT_VIEW_CLASSNAME = `.${user1Id}`;
1616

1717
test.describe('add height to video and image attachments', () => {
1818
test.beforeEach(async ({ controller, user }) => {
19-
await controller.openStory('attachment-sizing--user1', selectors.channelPreviewButton);
19+
await controller.openStory(
20+
'attachment-sizing--user1',
21+
selectors.channelPreviewButton,
22+
);
2023
await user.clicks(ChannelPreview).text(CHANNEL_NAME);
2124
});
2225

@@ -31,7 +34,9 @@ test.describe('add height to video and image attachments', () => {
3134
expect(result).toBeTruthy();
3235
await user
3336
.sees(MessageList)
34-
.isScrolledToBottom(`${USER1_CHAT_VIEW_CLASSNAME} ${selectors.messageListContainer}`);
37+
.isScrolledToBottom(
38+
`${USER1_CHAT_VIEW_CLASSNAME} ${selectors.messageListContainer}`,
39+
);
3540
});
3641

3742
test('should add height for single image attachments', async ({ page, user }) => {
@@ -45,6 +50,8 @@ test.describe('add height to video and image attachments', () => {
4550
expect(result).toBe(true);
4651
await user
4752
.sees(MessageList)
48-
.isScrolledToBottom(`${USER1_CHAT_VIEW_CLASSNAME} ${selectors.messageListContainer}`);
53+
.isScrolledToBottom(
54+
`${USER1_CHAT_VIEW_CLASSNAME} ${selectors.messageListContainer}`,
55+
);
4956
});
5057
});

e2e/autocomplete-mention.test.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,9 @@ test.describe('autocomplete a mention', () => {
1717

1818
await user.typesTo(MessageInput).text(MENTION_TRIGGER);
1919

20-
const autocompleteSuggestionItem = await user.clicks(AutocompleteSuggestionItem).nth(1);
20+
const autocompleteSuggestionItem = await user
21+
.clicks(AutocompleteSuggestionItem)
22+
.nth(1);
2123
const textContent = await autocompleteSuggestionItem.textContent();
2224

2325
await expect(getMessageInput(page)).toContainText(`${MENTION_TRIGGER}${textContent}`);

e2e/edit-message.test.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,10 @@ test.describe('edit text message', () => {
1414
await controller.openStory('edit-message--user1', selectors.buttonAddMessage);
1515
await controller.clearChannel();
1616

17-
await Promise.all([page.waitForSelector(selectors.attachmentCard), controller.sendMessage()]);
17+
await Promise.all([
18+
page.waitForSelector(selectors.attachmentCard),
19+
controller.sendMessage(),
20+
]);
1821
});
1922

2023
test('message has 3 attachments (2 cards and 1 gallery)', ({ user }) => {

e2e/navigate-long-message-lists.test.ts

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,16 @@ const NEW_MESSAGE_NOTIFICATION_TEXT = 'New Messages!' as const;
2929
const LAST_REPLY_TEXT = 'Message 299';
3030
const MESSAGES_WITH_REPLIES = ['Message 149', 'Message 137', 'Message 124', 'Message 99'];
3131

32-
const scrollInSteps = async (user: TestingUser, msgNumbers = ['142', '135', '128'], cycles = 3) => {
32+
const scrollInSteps = async (
33+
user: TestingUser,
34+
msgNumbers = ['142', '135', '128'],
35+
cycles = 3,
36+
) => {
3337
for (let i = 0; i < cycles; i++) {
3438
await Promise.all(
35-
msgNumbers.map((num: string) => user.get(Message)(`Message ${num}`).scrollIntoViewIfNeeded()),
39+
msgNumbers.map((num: string) =>
40+
user.get(Message)(`Message ${num}`).scrollIntoViewIfNeeded(),
41+
),
3642
);
3743
}
3844
};
@@ -63,7 +69,10 @@ test.describe('thread autoscroll', () => {
6369
await expectToOpenThreadAndSeeLatestMessage(page, user, MESSAGES_WITH_REPLIES[0]);
6470
});
6571

66-
test('if I load more messages by scrolling primary msg list', async ({ page, user }) => {
72+
test('if I load more messages by scrolling primary msg list', async ({
73+
page,
74+
user,
75+
}) => {
6776
const message = await user.get(Message)(MESSAGES_WITH_REPLIES[1]);
6877
await message.scrollIntoViewIfNeeded();
6978
await expectToOpenThreadAndSeeLatestMessage(page, user, MESSAGES_WITH_REPLIES[1]);
@@ -155,12 +164,16 @@ test.describe('scroll to the bottom', () => {
155164
await controller.sendOtherUserMessage();
156165

157166
// click the notification
158-
await page.waitForSelector(getMessageNotificationSelector(NEW_MESSAGE_NOTIFICATION_TEXT));
167+
await page.waitForSelector(
168+
getMessageNotificationSelector(NEW_MESSAGE_NOTIFICATION_TEXT),
169+
);
159170
await user.clicks(MessageNotification).text(NEW_MESSAGE_NOTIFICATION_TEXT);
160171

161172
// check that you are at the bottom
162173
await user
163174
.sees(MessageList)
164-
.isScrolledToBottom(`${USER1_CHAT_VIEW_CLASSNAME} ${selectors.messageListContainer}`);
175+
.isScrolledToBottom(
176+
`${USER1_CHAT_VIEW_CLASSNAME} ${selectors.messageListContainer}`,
177+
);
165178
});
166179
});

e2e/user/Controller.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,10 @@ import type { Page } from '@playwright/test';
33
import selectors from './selectors';
44

55
export class Controller {
6-
constructor(private baseURL: string | undefined, private page: Page) {}
6+
constructor(
7+
private baseURL: string | undefined,
8+
private page: Page,
9+
) {}
710

811
async openStory(story: string, waitForPresence: string) {
912
await Promise.all([

0 commit comments

Comments
 (0)