Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { EditorMode, useEditorMode } from '~/states/ui/editor';

const EditPage = (props) => {
const isEditable = useIsEditable();
const { mutate: mutateEditorMode } = useEditorMode();
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

useEditorMode は mutate を提供していない

const { setEditorMode } = useEditorMode();

// setup effect
useEffect(() => {
Expand All @@ -20,11 +20,11 @@ const EditPage = (props) => {
return;
}

mutateEditorMode(EditorMode.Editor);
setEditorMode(EditorMode.Editor);

// remove this
props.onDeleteRender(this);
}, [isEditable, mutateEditorMode, props]);
}, [isEditable, props, setEditorMode]);

return null;
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,6 @@ export const PagePathNavSticky = (props: PagePathNavLayoutProps): JSX.Element =>

const isPrinting = usePrintMode();

const isPrinting = usePrintMode();
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

isPrinting が二重に定義されていたので削除


const pageControlsX = usePageControlsX();
const [sidebarWidth] = useCurrentProductNavWidth();
const { sidebarMode } = useSidebarMode();
Expand Down
1 change: 1 addition & 0 deletions apps/app/src/components/PageView/PageViewLayout.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import type { JSX, ReactNode } from 'react';

// biome-ignore lint/style/noRestrictedImports: ignore
import { usePrintMode } from '~/client/services/use-print-mode';
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

usePrintMode は最近実装された hook だと思うのですが Lint error が出ていました。

一旦 ignore させ CI 上でエラーを出さないようにしたのですがどのように対処するのがよいでしょうか?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

なるほど、悩ましい

やりたいこととしては、print mode だったらサイドコンテンツがないときと同じように children のみをレンダリングさせたいんだけど、このままだと SSR でも import してしまうのであまりよくない

かといってプログラマブルに制御するのをやめて、 div.grw-side-contents-containerd-print-none を設定して CSS 側で消すことにすると、そもそもの #10505 が直らない
(と、コード内コメントに書いておいた方がいいな)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

後続ストーリー作っておいてほしい


import styles from './PageViewLayout.module.scss';
Expand Down
Loading