Skip to content

feat: Can create page when executing page edit shortcut key on empty page#10594

Merged
miya merged 6 commits intodev/7.4.xfrom
feat/175737-can-create-page-when-executing-page-edit-shortcut-key-on-empty-page
Dec 15, 2025
Merged

feat: Can create page when executing page edit shortcut key on empty page#10594
miya merged 6 commits intodev/7.4.xfrom
feat/175737-can-create-page-when-executing-page-edit-shortcut-key-on-empty-page

Conversation

@miya
Copy link
Member

@miya miya commented Dec 11, 2025

@miya miya requested a review from yuki-takei December 11, 2025 09:06
@miya miya self-assigned this Dec 11, 2025
}
}, [create, isNotFound, setEditorMode]);

};
Copy link
Member Author

Choose a reason for hiding this comment

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

PageEditorModeManager.tsx の editButtonClickedHandler の内部実装を hook として切り出した

// remove this
props.onDeleteRender(this);
})();
}, [startEditing, isEditable, path, props, setEditorMode, t]);
Copy link
Member Author

Choose a reason for hiding this comment

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

ショートカット (e) 実行時に空ページの場合はページを作成できるようにした

await startEditing(path);
}
catch (err) {
toastError(t('toaster.create_failed', { target: path }));
Copy link
Contributor

Choose a reason for hiding this comment

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

hook の中に toastr 処理が入るのはやだな

Copy link
Member Author

@miya miya Dec 15, 2025

Choose a reason for hiding this comment

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

useEditPage (ロジックレイヤー) と EditPage (UI レイヤー) に分けて、toastr 処理を EditPage 側に定義して useEditPage のコールバック関数として渡すようにリファクタしました。

@miya miya merged commit e451915 into dev/7.4.x Dec 15, 2025
16 checks passed
@miya miya deleted the feat/175737-can-create-page-when-executing-page-edit-shortcut-key-on-empty-page branch December 15, 2025 00:56
This was referenced Dec 15, 2025
This was referenced Dec 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants