Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Horizontal scroll in main room if text is too long #28434

Merged
merged 4 commits into from Mar 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 4 additions & 4 deletions apps/meteor/tests/e2e/e2e-encryption.spec.ts
Expand Up @@ -161,7 +161,7 @@ test.describe.serial('e2e-encryption', () => {

await poHomeChannel.content.sendMessage('hello world');

await expect(poHomeChannel.content.lastUserMessage.locator('p')).toHaveText('hello world');
await expect(poHomeChannel.content.lastUserMessageBody).toHaveText('hello world');
await expect(poHomeChannel.content.lastUserMessage.locator('.rcx-icon--name-key')).toBeVisible();

await poHomeChannel.tabs.kebab.click({ force: true });
Expand All @@ -171,7 +171,7 @@ test.describe.serial('e2e-encryption', () => {

await poHomeChannel.content.sendMessage('hello world not encrypted');

await expect(poHomeChannel.content.lastUserMessage.locator('p')).toHaveText('hello world not encrypted');
await expect(poHomeChannel.content.lastUserMessageBody).toHaveText('hello world not encrypted');
await expect(poHomeChannel.content.lastUserMessage.locator('.rcx-icon--name-key')).not.toBeVisible();

await poHomeChannel.tabs.kebab.click({ force: true });
Expand All @@ -181,7 +181,7 @@ test.describe.serial('e2e-encryption', () => {

await poHomeChannel.content.sendMessage('hello world encrypted again');

await expect(poHomeChannel.content.lastUserMessage.locator('p')).toHaveText('hello world encrypted again');
await expect(poHomeChannel.content.lastUserMessageBody).toHaveText('hello world encrypted again');
await expect(poHomeChannel.content.lastUserMessage.locator('.rcx-icon--name-key')).toBeVisible();
});

Expand All @@ -207,7 +207,7 @@ test.describe.serial('e2e-encryption', () => {

await poHomeChannel.content.sendMessage('hello world');

await expect(poHomeChannel.content.lastUserMessage.locator('p')).toHaveText('hello world');
await expect(poHomeChannel.content.lastUserMessageBody).toHaveText('hello world');
await expect(poHomeChannel.content.lastUserMessage.locator('.rcx-icon--name-key')).toBeVisible();
});
});
Expand Up @@ -19,6 +19,10 @@ export class FederationHomeContent {
return this.page.locator('[data-qa-type="message"]').last();
}

get lastUserMessageBody(): Locator {
return this.lastUserMessage.locator('[data-qa-type="message-body"]');
}

get lastUserMessageNotSequential(): Locator {
return this.page.locator('[data-qa-type="message"][data-sequential="false"]').last();
}
Expand Down
102 changes: 51 additions & 51 deletions apps/meteor/tests/e2e/federation/tests/messaging/dm.spec.ts

Large diffs are not rendered by default.

112 changes: 56 additions & 56 deletions apps/meteor/tests/e2e/federation/tests/messaging/private.spec.ts

Large diffs are not rendered by default.

112 changes: 56 additions & 56 deletions apps/meteor/tests/e2e/federation/tests/messaging/public.spec.ts

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions apps/meteor/tests/e2e/messaging.spec.ts
Expand Up @@ -29,8 +29,8 @@ test.describe.serial('Messaging', () => {

await poHomeChannel.content.sendMessage('hello world');

await expect(auxContext.poHomeChannel.content.lastUserMessage.locator('p')).toHaveText('hello world');
await expect(poHomeChannel.content.lastUserMessage.locator('p')).toHaveText('hello world');
await expect(auxContext.poHomeChannel.content.lastUserMessageBody).toHaveText('hello world');
await expect(poHomeChannel.content.lastUserMessageBody).toHaveText('hello world');

await auxContext.page.close();
});
Expand All @@ -43,8 +43,8 @@ test.describe.serial('Messaging', () => {

await poHomeChannel.content.sendMessage('hello world');

await expect(poHomeChannel.content.lastUserMessage.locator('p')).toHaveText('hello world');
await expect(auxContext.poHomeChannel.content.lastUserMessage.locator('p')).toHaveText('hello world');
await expect(poHomeChannel.content.lastUserMessageBody).toHaveText('hello world');
await expect(auxContext.poHomeChannel.content.lastUserMessageBody).toHaveText('hello world');

await auxContext.page.close();
});
Expand Down
Expand Up @@ -21,6 +21,10 @@ export class HomeContent {
return this.page.locator('[data-qa-type="message"]').last();
}

get lastUserMessageBody(): Locator {
return this.lastUserMessage.locator('[data-qa-type="message-body"]');
}

get lastUserMessageNotSequential(): Locator {
return this.page.locator('[data-qa-type="message"][data-sequential="false"]').last();
}
Expand Down
13 changes: 5 additions & 8 deletions packages/gazzodown/src/blocks/HeadingBlock.tsx
Expand Up @@ -12,14 +12,11 @@ const HeadingBlock = ({ children = [], level = 1 }: HeadingBlockProps): ReactEle
const HeadingTag = `h${level}` as const;

return (
<>
<HeadingTag style={{ display: 'inline-block' }}>
{children.map((block, index) => (
<PlainSpan key={index} text={block.value} />
))}
</HeadingTag>
<br />
</>
<HeadingTag>
{children.map((block, index) => (
<PlainSpan key={index} text={block.value} />
))}
</HeadingTag>
);
};

Expand Down
9 changes: 3 additions & 6 deletions packages/gazzodown/src/blocks/ParagraphBlock.tsx
Expand Up @@ -8,12 +8,9 @@ type ParagraphBlockProps = {
};

const ParagraphBlock = ({ children }: ParagraphBlockProps): ReactElement => (
<>
<p style={{ display: 'inline-block' }}>
<InlineElements children={children} />
</p>
<br />
</>
<div>
<InlineElements children={children} />
</div>
);

export default ParagraphBlock;