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: default order of docs more friendly for human #2006

Open
W-HanYu opened this issue Jan 10, 2024 · 5 comments
Open

feat: default order of docs more friendly for human #2006

W-HanYu opened this issue Jan 10, 2024 · 5 comments
Labels
enhancement New feature or request PR Welcome

Comments

@W-HanYu
Copy link

W-HanYu commented Jan 10, 2024

Version

^2.0.2

OS Version

macOS 14.0.0

Node.js Version

16.16.0

Browser Version

chrome

Link to minimal reproduction

https://algorithm.zeabur.app/dailyquestion/two-sum

Steps to reproduce

直接看网站

What is expected?

文档按照数字大小排序

What is actually happening?

image

Any additional comments? (optional)

No response

@PeachScript
Copy link
Member

非 bug,默认为字典序,ref: https://d.umijs.org/guide/conventional-routing#%E6%96%87%E6%A1%A3%E6%A0%87%E9%A2%98%E5%8F%8A%E6%8E%92%E5%BA%8F

但你这个场景设置 order 会比较啰嗦,可以选择给标题补零,比如 001.xx102.xx

@PeachScript PeachScript closed this as not planned Won't fix, can't repro, duplicate, stale Jan 10, 2024
@PeachScript PeachScript added invalid This doesn't seem right and removed unconfirmed labels Jan 10, 2024
@W-HanYu
Copy link
Author

W-HanYu commented Jan 10, 2024

非 bug,默认为字典序,ref: https://d.umijs.org/guide/conventional-routing#%E6%96%87%E6%A1%A3%E6%A0%87%E9%A2%98%E5%8F%8A%E6%8E%92%E5%BA%8F

但你这个场景设置 order 会比较啰嗦,可以选择给标题补零,比如 001.xx102.xx

我知道使用字典,但是这样用户体验不是很好,添加0感觉怪怪的

@PeachScript
Copy link
Member

但是这样用户体验不是很好

你说的有道理,我试了下 macOS 的 Finder 虽然也是字典序展示文件列表,但倘若文件名显式以数字开头,仍然会尊重数字的顺序(并且 macOS 似乎做得更多,比如 a.11.x 会在 a.2.x 之后)

我会将该 issue 以 feature request 的形式重新打开,如果你对排序规则优化有需求且有兴趣帮 dumi 完善,欢迎提交 PR

@PeachScript PeachScript added enhancement New feature or request PR Welcome and removed invalid This doesn't seem right labels Jan 10, 2024
Copy link

Hello @W-HanYu. We totally like your proposal/feedback, welcome to send us a Pull Request for it. Please be sure to fill in the default template in the Pull Request, provide changelog/documentation/test cases if needed and make sure CI passed, we will review it soon. We appreciate your effort in advance and looking forward to your contribution!

你好 @W-HanYu,我们完全同意你的提议/反馈,欢迎直接在此仓库创建一个 Pull Request 来解决这个问题。请务必填写 Pull Request 内的预设模板,提供改动所需相应的 changelog、测试用例、文档等,并确保 CI 通过,我们会尽快进行 Review,提前感谢和期待您的贡献。

@PeachScript PeachScript changed the title bug: 文档排序不按照大小 feat: default order of docs more friendly for human Jan 10, 2024
@PeachScript PeachScript reopened this Jan 10, 2024
@W-HanYu
Copy link
Author

W-HanYu commented Jan 10, 2024

Hello @W-HanYu. We totally like your proposal/feedback, welcome to send us a Pull Request for it. Please be sure to fill in the default template in the Pull Request, provide changelog/documentation/test cases if needed and make sure CI passed, we will review it soon. We appreciate your effort in advance and looking forward to your contribution!

你好 @W-HanYu,我们完全同意你的提议/反馈,欢迎直接在此仓库创建一个 Pull Request 来解决这个问题。请务必填写 Pull Request 内的预设模板,提供改动所需相应的 changelog、测试用例、文档等,并确保 CI 通过,我们会尽快进行 Review,提前感谢和期待您的贡献。

好的,我尝试做下!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request PR Welcome
Projects
None yet
Development

No branches or pull requests

2 participants