From 0e46e2b74c4c3db8e521be5cf08efe100dede49a Mon Sep 17 00:00:00 2001 From: ryosei-f Date: Thu, 12 Dec 2024 09:04:29 +0000 Subject: [PATCH] Resolve conflicts --- .../PagePathNavSticky.module.scss | 2 ++ .../components/PagePresentationModal.tsx | 3 ++- .../PagePathNav/PagePathNav.module.scss | 7 +++-- .../Common/PagePathNav/PagePathNavLayout.tsx | 26 ++++++++++++++++--- .../PagePathNavTitle.module.scss | 4 +++ apps/app/src/pages/[[...path]].page.tsx | 2 +- apps/app/src/stores-universal/context.tsx | 1 + apps/app/src/stores/renderer.tsx | 5 ++++ 8 files changed, 42 insertions(+), 8 deletions(-) diff --git a/apps/app/src/client/components/PagePathNavSticky/PagePathNavSticky.module.scss b/apps/app/src/client/components/PagePathNavSticky/PagePathNavSticky.module.scss index 2948618afcb..9dd96f4284d 100644 --- a/apps/app/src/client/components/PagePathNavSticky/PagePathNavSticky.module.scss +++ b/apps/app/src/client/components/PagePathNavSticky/PagePathNavSticky.module.scss @@ -1,6 +1,8 @@ @use '@growi/core-styles/scss/bootstrap/init' as bs; .grw-page-path-nav-sticky :global { + // width: 100%; + .sticky-inner-wrapper { z-index: bs.$zindex-sticky; } diff --git a/apps/app/src/client/components/PagePresentationModal.tsx b/apps/app/src/client/components/PagePresentationModal.tsx index 7796841113c..51468e781eb 100644 --- a/apps/app/src/client/components/PagePresentationModal.tsx +++ b/apps/app/src/client/components/PagePresentationModal.tsx @@ -67,7 +67,8 @@ const PagePresentationModal = (): JSX.Element => { if (!isOpen) { return <>; } - + console.log(isEnabledMarp, 'Marp'); + console.log(rendererOptions, 'renderOption'); return ( import('~/client/components/Common/CopyDropdown').then(mod => mod.CopyDropdown), { ssr: false }); @@ -40,6 +41,19 @@ export const PagePathNavLayout = (props: Props): JSX.Element => { const copyDropdownId = `copydropdown-${pageId}`; + const [, setIsHovered] = useState(false); + const [hideTimeout, setHideTimeout] = useState(null); + + const handleMouseEnter = () => { + if (hideTimeout) clearTimeout(hideTimeout); // 非表示タイマーをリセット + setIsHovered(true); // ボタンを表示 + }; + + const handleMouseLeave = () => { + const timeout = setTimeout(() => setIsHovered(false), 3000); // 3秒後にボタンを非表示 + setHideTimeout(timeout); + }; + return (
{ { isWipPage && ( WIP )} - + content_paste diff --git a/apps/app/src/components/Common/PagePathNavTitle/PagePathNavTitle.module.scss b/apps/app/src/components/Common/PagePathNavTitle/PagePathNavTitle.module.scss index 3c62f47ea35..4d4fc899da1 100644 --- a/apps/app/src/components/Common/PagePathNavTitle/PagePathNavTitle.module.scss +++ b/apps/app/src/components/Common/PagePathNavTitle/PagePathNavTitle.module.scss @@ -3,3 +3,7 @@ .grw-page-path-nav-title :global { min-height: 75px; } + +.grw-page-path-nav-title:hover { + background-color: rgba(0, 0, 0, 0.05); /* ホバー範囲を視覚的に確認したい場合の背景 */ +} diff --git a/apps/app/src/pages/[[...path]].page.tsx b/apps/app/src/pages/[[...path]].page.tsx index d26fb5e22d1..e8e4b7c4d9c 100644 --- a/apps/app/src/pages/[[...path]].page.tsx +++ b/apps/app/src/pages/[[...path]].page.tsx @@ -237,7 +237,7 @@ const Page: NextPageWithLayout = (props: Props) => { useDefaultIndentSize(props.adminPreferredIndentSize); useIsIndentSizeForced(props.isIndentSizeForced); useDisableLinkSharing(props.disableLinkSharing); - useRendererConfig(props.rendererConfig); + // useRendererConfig(props.rendererConfig); useIsEnabledMarp(props.rendererConfig.isEnabledMarp); // useRendererSettings(props.rendererSettingsStr != null ? JSON.parse(props.rendererSettingsStr) : undefined); // useGrowiRendererConfig(props.growiRendererConfigStr != null ? JSON.parse(props.growiRendererConfigStr) : undefined); diff --git a/apps/app/src/stores-universal/context.tsx b/apps/app/src/stores-universal/context.tsx index a62586dacc7..e29ada8d300 100644 --- a/apps/app/src/stores-universal/context.tsx +++ b/apps/app/src/stores-universal/context.tsx @@ -147,6 +147,7 @@ export const useIsEnabledStaleNotification = (initialData?: boolean): SWRRespons }; export const useRendererConfig = (initialData?: RendererConfig): SWRResponse => { + console.log(initialData, 'undifined or null'); return useContextSWR('growiRendererConfig', initialData); }; diff --git a/apps/app/src/stores/renderer.tsx b/apps/app/src/stores/renderer.tsx index bd4a4776bd3..97dd1cfa748 100644 --- a/apps/app/src/stores/renderer.tsx +++ b/apps/app/src/stores/renderer.tsx @@ -171,6 +171,11 @@ export const useCustomSidebarOptions = (config?: SWRConfiguration): SWRResponse< export const usePresentationViewOptions = (): SWRResponse => { const { data: currentPagePath } = useCurrentPagePath(); const { data: rendererConfig } = useRendererConfig(); + console.log(rendererConfig, 'rendererconfig'); + if (!rendererConfig) { + console.log('RendererConfig is missing.'); + } + const isAllDataValid = currentPagePath != null && rendererConfig != null;