Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Automatically convert the CHANGELOG in the same directory as th… #1961

Closed
wants to merge 1 commit into from
Closed

Conversation

draco-china
Copy link

@draco-china draco-china commented Nov 6, 2023

🤔 这个变动的性质是?/ What is the nature of this change?

  • 自动将 README 同级目录下的 CHANGELOG 转换为 Tab

  • Automatically convert the CHANGELOG in the same directory as the README to Tab.

  • 新特性提交 / New feature

  • bug 修复 / Fix bug

  • 样式优化 / Style optimization

  • 代码风格优化 / Code style optimization

  • 性能优化 / Performance optimization

  • 构建优化 / Build optimization

  • 网站、文档、Demo 改进 / Website, documentation, demo improvements

  • 重构代码或样式 / Refactor code or style

  • 测试相关 / Test related

  • 其他 / Other

🔗 相关 Issue / Related Issue

💡 需求背景和解决方案 / Background or solution

在 monorepo 时开发组件/库类,多个子包时,菜单聚合后 没有 changelog 的入口,
如果单独把所有changelog作为导航,则导致搜索时会出现同样的两个结果,无法判断是日志页面和文档页面 让人迷惑
所以此改动是为了更方便的查看单个包的更新日志

考虑到不是所有人都需要的功能,看是否需要通过 增加 config 来开启开关

📝 更新日志 / Changelog

Language Changelog
🇺🇸 English Automatically convert the CHANGELOG in the same directory as the README to Tab.
🇨🇳 Chinese 自动将 README 同级目录下的 CHANGELOG 转换为 Tab

Copy link

vercel bot commented Nov 6, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
dumi ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 6, 2023 6:28am

@PeachScript
Copy link
Member

感谢贡献,但这个行为太隐晦了,建议用 xx.$tab-changelog.md + embed 功能替代,或者软链接将 xx.$tab-changelog.md 指向 CHANGELOG.md 也可以

@draco-china
Copy link
Author

draco-china commented Nov 6, 2023

感谢贡献,但这个行为太隐晦了,建议用 xx.$tab-changelog.md + embed 功能替代,或者软链接将 xx.$tab-changelog.md 指向 CHANGELOG.md 也可以

因为目前基于现有的插件 api 无法实现此功能,但是也不想去额外维护一份文件生成 tab,还有之前提到的,如果通过额外的文件菜单来实现,搜索功能会出现同样的两个选项,是否可以优化相关 api 提供自定义插件的能力来实现呢,

如果通过配置来开启这个行为,是否会更合理一些,就如同 apiParser 一样,指定某些子包开启这个行为

@PeachScript
Copy link
Member

因为目前基于现有的插件 api 无法实现此功能

api.modifyRoutes 应该可以实现,https://d.umijs.org/plugin/api#modifyroutes

如果通过额外的文件菜单来实现,搜索功能会出现同样的两个选项

如果有两处相同的内容,那么出现两个相同的选项是符合预期的,如果需要定制搜索结果的展示,可以覆盖内置的 SearchResult slot:

@draco-china
Copy link
Author

因为目前基于现有的插件 api 无法实现此功能

api.modifyRoutes 应该可以实现,https://d.umijs.org/plugin/api#modifyroutes

如果通过额外的文件菜单来实现,搜索功能会出现同样的两个选项

如果有两处相同的内容,那么出现两个相同的选项是符合预期的,如果需要定制搜索结果的展示,可以覆盖内置的 SearchResult slot:

感谢您的建议,但是还是达不到我所期望的效果,我将通过 patch 实现此功能

@draco-china draco-china closed this Nov 6, 2023
@draco-china draco-china reopened this Nov 6, 2023
@draco-china draco-china closed this Nov 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants