fix(core): text style is not centered when chat-panel is wide (#10607)

Fix issue [BS-2751](https://linear.app/affine-design/issue/BS-2751).

Before:

![截屏2025-03-04 16.56.46.png](https://graphite-user-uploaded-assets-prod.s3.amazonaws.com/sJGviKxfE3Ap685cl5bj/d0aae342-ff53-42d6-964b-ecd2e8720af6.png)

After:

![截屏2025-03-04 16.56.57.png](https://graphite-user-uploaded-assets-prod.s3.amazonaws.com/sJGviKxfE3Ap685cl5bj/986bde63-6fe8-485d-97d1-0a062658cf7c.png)
This commit is contained in:
akumatus
2025-03-04 15:25:35 +00:00
parent 66d9d576e0
commit a6692f70aa
4 changed files with 77 additions and 54 deletions

View File

@@ -106,7 +106,7 @@ const clearChat = async (page: Page) => {
const collectChat = async (page: Page) => {
await page.waitForTimeout(ONE_SECOND);
const chatPanel = await page.waitForSelector('.chat-panel-messages');
if (await chatPanel.$('.chat-panel-messages-placeholder')) {
if (await chatPanel.$('.messages-placeholder')) {
return [];
}
// wait ai response