From 9b98a2be6b9869a4c9a366d7624554a2fcfaea6e Mon Sep 17 00:00:00 2001 From: "Nathan.fooo" <86001920+appflowy@users.noreply.github.com> Date: Wed, 3 Dec 2025 00:25:11 +0800 Subject: [PATCH] chore: fix resize (#190) --- cypress/e2e/page/publish-page.cy.ts | 5 ++++- src/application/services/js-services/http/http_api.ts | 10 ++++++++-- src/components/app/view-actions/NewPage.tsx | 2 ++ .../components/panels/slash-panel/SlashPanel.tsx | 2 +- 4 files changed, 15 insertions(+), 4 deletions(-) diff --git a/cypress/e2e/page/publish-page.cy.ts b/cypress/e2e/page/publish-page.cy.ts index 548174a6..d9ddc451 100644 --- a/cypress/e2e/page/publish-page.cy.ts +++ b/cypress/e2e/page/publish-page.cy.ts @@ -703,7 +703,10 @@ describe('Publish Page Test', () => { ShareSelectors.sharePopover().should('not.exist'); ShareSelectors.publishManageModal().should('be.visible'); - ShareSelectors.publishManagePanel().should('be.visible').contains('Namespace'); + + // Verify panel exists and is visible separately to avoid null subject issues + ShareSelectors.publishManagePanel().should('exist').should('be.visible'); + ShareSelectors.publishManagePanel().contains('Namespace'); cy.get('body').type('{esc}'); ShareSelectors.publishManageModal().should('not.exist'); diff --git a/src/application/services/js-services/http/http_api.ts b/src/application/services/js-services/http/http_api.ts index 9213120a..afcc5ae9 100644 --- a/src/application/services/js-services/http/http_api.ts +++ b/src/application/services/js-services/http/http_api.ts @@ -156,7 +156,7 @@ async function executeAPIRequest( const method = response.config?.method?.toUpperCase() || 'UNKNOWN'; - Log.debug('[executeAPIRequest]', { method, url: requestUrl }); + Log.debug('[executeAPIRequest]', { method, url: requestUrl, response_data: response.data?.data, response_code: response.data?.code, response_message: response.data?.message }); if (!response.data) { console.error('[executeAPIRequest] No response data received', response); @@ -1442,13 +1442,19 @@ export async function createDatabaseView( export async function addAppPage(workspaceId: string, parentViewId: string, { layout, name }: CreatePagePayload) { const url = `/api/workspace/${workspaceId}/page-view`; - return executeAPIRequest(() => + Log.debug('[addAppPage] request', { url, workspaceId, parentViewId, layout, name }); + + const response = await executeAPIRequest(() => axiosInstance?.post>(url, { parent_view_id: parentViewId, layout, name, }) ); + + Log.debug('[addAppPage] response', { view_id: response.view_id, database_id: response.database_id }); + + return response; } export async function updatePage(workspaceId: string, viewId: string, data: UpdatePagePayload) { diff --git a/src/components/app/view-actions/NewPage.tsx b/src/components/app/view-actions/NewPage.tsx index b6b7dd29..6c8e217a 100644 --- a/src/components/app/view-actions/NewPage.tsx +++ b/src/components/app/view-actions/NewPage.tsx @@ -11,6 +11,7 @@ import CreateSpaceModal from '@/components/app/view-actions/CreateSpaceModal'; import SpaceList from '@/components/publish/header/duplicate/SpaceList'; import { dropdownMenuItemVariants } from '@/components/ui/dropdown-menu'; import { cn } from '@/lib/utils'; +import { Log } from '@/utils/log'; function NewPage() { const { t } = useTranslation(); @@ -44,6 +45,7 @@ function NewPage() { if (!addPage || !openPageModal) return; setLoading(true); try { + Log.debug('[handleAddPage]', { parentId, layout: ViewLayout.Document }); const response = await addPage(parentId, { layout: ViewLayout.Document, }); diff --git a/src/components/editor/components/panels/slash-panel/SlashPanel.tsx b/src/components/editor/components/panels/slash-panel/SlashPanel.tsx index 89136b8f..0c65af05 100644 --- a/src/components/editor/components/panels/slash-panel/SlashPanel.tsx +++ b/src/components/editor/components/panels/slash-panel/SlashPanel.tsx @@ -144,7 +144,7 @@ const DatabaseTreeItem: React.FC<{ ) : (
)} - + {name}
{isDatabase && (