mirror of
https://github.com/shumaiOne/shumai.git
synced 2026-12-04 06:54:28 +00:00
feat(webui): add simplified mobile-friendly layout for file and share lists (#356)
* feat(webui): add simplified mobile-friendly layout for file and share lists * refactor(webui): switch mobile file list layout to 1-column grid * feat(webui): show foldertree by default in child sidebar and add close button * feat(webui): add collapsible section headers and fix folder card full-width on mobile * feat(webui): improve mobile breadcrumb bar with middle truncation and dual ellipsis * fix(webui): unify breadcrumb DOM structure across desktop and mobile * fix(webui): remove unused breadcrumbs variable in BreadcrumbNav * fix(webui): complete and confirm file uploads on mobile and handle errors properly * fix(webui): remove active scale animation on mobile FAB to stabilize dropdown menu anchor * refactor(webui): use PresignedUrl type from dtos for uploadFiles and eliminate any cast * fix(webui): scope folder card max width to desktop with responsive md:max-w-[340px]
This commit is contained in:
@@ -51,7 +51,7 @@ describe('BreadcrumbNav component', () => {
|
||||
</QueryClientProvider>,
|
||||
)
|
||||
|
||||
expect(screen.getByTitle(/Linked Tasks|关联任务/i)).toBeDefined()
|
||||
expect(screen.getAllByTitle(/Linked Tasks|关联任务/i).length).toBeGreaterThan(0)
|
||||
})
|
||||
|
||||
it('hides SquareKanban task link button on project root folder', () => {
|
||||
@@ -83,4 +83,44 @@ describe('BreadcrumbNav component', () => {
|
||||
|
||||
expect(screen.queryByTitle(/Linked Tasks|关联任务/i)).toBeNull()
|
||||
})
|
||||
|
||||
it('renders mobile navigation menu button when not in public share mode', () => {
|
||||
render(
|
||||
<QueryClientProvider client={queryClient}>
|
||||
<BreadcrumbNav {...baseProps} isPublic={false} />
|
||||
</QueryClientProvider>,
|
||||
)
|
||||
|
||||
expect(screen.getByRole('button', { name: /Open navigation menu/i })).toBeDefined()
|
||||
})
|
||||
|
||||
it('renders mobile breadcrumbs without All Projects and with project name', () => {
|
||||
render(
|
||||
<QueryClientProvider client={queryClient}>
|
||||
<BreadcrumbNav {...baseProps} />
|
||||
</QueryClientProvider>,
|
||||
)
|
||||
|
||||
// Project name is in mobile and desktop
|
||||
expect(screen.getAllByText('Demo Project').length).toBeGreaterThan(0)
|
||||
// Folder A is rendered
|
||||
expect(screen.getAllByText('Folder A').length).toBeGreaterThan(0)
|
||||
})
|
||||
|
||||
it('renders omitted middle folders button (...) for deep hierarchy on mobile', () => {
|
||||
render(
|
||||
<QueryClientProvider client={queryClient}>
|
||||
<BreadcrumbNav
|
||||
{...baseProps}
|
||||
ancestorFolders={[
|
||||
{ id: 'parent-1', name: 'Middle Folder 1' },
|
||||
{ id: 'parent-2', name: 'Middle Folder 2' },
|
||||
]}
|
||||
currentAsset={{ id: 'asset-deep', name: 'Deep Folder', type: 'folder' }}
|
||||
/>
|
||||
</QueryClientProvider>,
|
||||
)
|
||||
|
||||
expect(screen.getByRole('button', { name: /Show omitted folders/i })).toBeDefined()
|
||||
})
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user