-
-
Notifications
You must be signed in to change notification settings - Fork 446
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
fix: autogenerated sidebar alphabetical sort #1298
Conversation
🦋 Changeset detectedLatest commit: 5d3aa3b The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
The latest updates on your projects. Learn more about Vercel for Git ↗︎
1 Ignored Deployment
|
size-limit report 📦
|
Left some comment in #1151 (comment) as I think this may break the expected behavior based on the current documentation. |
Thanks for the review @HiDeoo 💜 . In that case, we can use only the filename name, without its slug path to do the sorting. I will update this PR accordingly. |
This reverts commit 1443989.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @kevinzunigacuellar! Love you digging into these tricky corners 💜 Left some thoughts.
This reverts commit 4b9eef0.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The current behavior will sort the sidebar page differently depending on the locale of the page it is being shown. With this PR it will have a consistent ordering. But what is the ordering is not properly documented.
I noticed this recently when translating the docs that it is mentioned there that the sidebar is sorted alphabetically, but the implementation uses collation, which is not the same thing. Not all languages sort alphabetically and even the definition of "alphbetically" may change between them.
More information and examples of how things can differ here.
I don't think this should be changed in this same PR, but just leaving it here as a note that I think this should probably be mentioned in the docs. Both on the defaultLocale
and on the sidebar guide.
Kevin told me I could
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let’s patch and GO! ✨
* main: (55 commits) [ci] format i18n(es): Update `index` (withastro#1360) [ci] format i18n(fr): Update index (withastro#1367) i18n(es): remove extra section (withastro#1370) i18n(ko-KR): update `index.mdx` (withastro#1363) [ci] format i18n(zh-cn): Update index.mdx (withastro#1361) docs(showcase): add OpenSaaS.sh (withastro#1359) feat(Testimonials): add testimonials to website (withastro#1104) [ci] format [ci] release (withastro#1332) fix: autogenerated sidebar alphabetical sort (withastro#1298) Avoid sidebar scrollbar hiding behind navbar (withastro#1353) Use spawnSync instead of execaSync in `git.ts` (withastro#1347) [ci] format [i18nIgnore] Add src alias (withastro#1322) Italian translation for search.devWarning (withastro#1351) [ci] format i18n(pt-BR): Add translation for `guides/sidebar` (withastro#1346) ...
* main: (69 commits) [i18nIgnore] docs: `pnpm install` → `pnpm add` (withastro#1324) [ci] format i18n(zh-cn): Update frontmatter.mdx (withastro#1362) [ci] format i18n(es): Update `index` (withastro#1360) [ci] format i18n(fr): Update index (withastro#1367) i18n(es): remove extra section (withastro#1370) i18n(ko-KR): update `index.mdx` (withastro#1363) [ci] format i18n(zh-cn): Update index.mdx (withastro#1361) docs(showcase): add OpenSaaS.sh (withastro#1359) feat(Testimonials): add testimonials to website (withastro#1104) [ci] format [ci] release (withastro#1332) fix: autogenerated sidebar alphabetical sort (withastro#1298) Avoid sidebar scrollbar hiding behind navbar (withastro#1353) Use spawnSync instead of execaSync in `git.ts` (withastro#1347) [ci] format [i18nIgnore] Add src alias (withastro#1322) ...
* main: (62 commits) [i18nIgnore] docs: `pnpm install` → `pnpm add` (withastro#1324) [ci] format i18n(zh-cn): Update frontmatter.mdx (withastro#1362) [ci] format i18n(es): Update `index` (withastro#1360) [ci] format i18n(fr): Update index (withastro#1367) i18n(es): remove extra section (withastro#1370) i18n(ko-KR): update `index.mdx` (withastro#1363) [ci] format i18n(zh-cn): Update index.mdx (withastro#1361) docs(showcase): add OpenSaaS.sh (withastro#1359) feat(Testimonials): add testimonials to website (withastro#1104) [ci] format [ci] release (withastro#1332) fix: autogenerated sidebar alphabetical sort (withastro#1298) Avoid sidebar scrollbar hiding behind navbar (withastro#1353) Use spawnSync instead of execaSync in `git.ts` (withastro#1347) [ci] format [i18nIgnore] Add src alias (withastro#1322) ...
Description
slug
property with thefilename
for sorting purposes when sorting file entries.