fix(notion): 修复 Invisible 页面菜单映射 - #4372
Open
kforris wants to merge 2 commits into
Open
Conversation
✅ Deploy Preview for notionnext-netlify ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
@kforris is attempting to deploy a commit to the tangly1024's projects Team on Vercel. A member of the Team first needs to authorize it. |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Collaborator
|
我这边做了合并前复核:
结论:代码本身看起来可以,但当前 PR 仍有 Docker/Netlify 红灯。我先不强合并,等外部 Notion 数据/预览构建恢复后再 rerun;如果 Docker/Netlify 转绿,这个 PR 可以按当前实现合入。 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
问题
#4344 已支持 Menu/SubMenu 的源 slug 映射到 Page 的最终 href,但
getCustomMenu只把PublishedPage 视为可路由目标。#4336 的报告者现已确认,受影响的
pending、contact、copyrightPage 都是Invisible;Page 的完整路径可以直接访问,临时改为Published后菜单也立即恢复。这与本地失败用例一致:菜单仍保留/pending,而没有替换为映射后的完整 Page href。修复
Published和InvisiblePage 都视为可以被显式 Menu/SubMenu 引用的直接路由目标;Draft,避免未发布页面被菜单意外暴露;验证
yarn test __tests__/lib/db/SiteDataApi.customMenu.test.js --runInBand:5/5 通过;yarn test --runInBand:39 suites / 211 tests 通过;yarn type-check:通过;yarn lint:通过,仅仓库既有 warnings;git diff --check:通过;yarn build:候选分支和干净的main@e401c019均在编译、类型检查通过后,被仓库默认 Notion 数据源的loadPageChunk403 阻断,并在/auth/result预渲染阶段退出;已确认不是本次两文件改动引入。Follow-up to #4336 and #4344.