feat(mobile): new docs list for mobile (#12329)

close AF-2514

<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
## Summary by CodeRabbit

- **New Features**
  - Enhanced document explorer on mobile with live updates, responsive masonry layout, and improved empty state handling for all documents, collections, and tags.
  - Added customization for card height and masonry item width in document explorer views.
  - Extended layout components to support additional flexbox styling options for improved layout flexibility.

- **Bug Fixes**
  - Improved flexibility in layout components by supporting additional flexbox styling options.

- **Refactor**
  - Replaced older static document list and menu components with a unified, context-driven explorer for a more dynamic and interactive experience.
  - Removed obsolete CSS and component files related to the previous document list and menu implementations.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
CatsJuice
2025-05-23 07:07:09 +00:00
parent d0539fde22
commit a96cd3eb0a
15 changed files with 241 additions and 366 deletions

View File

@@ -13,7 +13,7 @@ test.beforeEach(async ({ page }) => {
const docsTab = page.locator('#app-tabs').getByRole('tab', { name: 'all' });
await expect(docsTab).toBeVisible();
await docsTab.click();
await page.getByTestId('doc-card').first().click();
await page.getByTestId('doc-list-item').first().click();
await expect(page.locator('.affine-page-viewport')).toBeVisible();
});
@@ -53,7 +53,5 @@ test('can add text property', async ({ page }) => {
).toBeVisible();
await page.getByTestId('mobile-menu-back-button').last().click();
await expect(page.getByTestId('mobile-menu-back-button')).toContainText(
'Getting Started'
);
await expect(page.getByTestId('mobile-menu-back-button')).toBeVisible();
});

View File

@@ -47,6 +47,6 @@ test('all tab', async ({ page }) => {
await docsTab.click();
const todayDocs = page.getByTestId('doc-card');
const todayDocs = page.getByTestId('doc-list-item');
expect(await todayDocs.count()).toBeGreaterThan(0);
});