-
-
Notifications
You must be signed in to change notification settings - Fork 5.4k
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
Wiki auto-generated TOC is including _Sidebar headers incorrectly positioned #20976
Comments
(not a programmer) If I understand the flow in https://github.com/go-gitea/gitea/blob/main/routers/web/repo/wiki.go in a basic sense, it might be as "simple" as moving |
Close #20976 Close #20975 1. Fix the bug: the TOC in footer was incorrectly rendered as main content's TOC 2. Fix the layout: on mobile, the TOC is put above the main content, while the sidebar is put below the main content 3. Auto collapse the TOC on mobile ps: many styles of "wiki.css" are moved from old css files, so leave nits to following PRs.
Close go-gitea#20976 Close go-gitea#20975 1. Fix the bug: the TOC in footer was incorrectly rendered as main content's TOC 2. Fix the layout: on mobile, the TOC is put above the main content, while the sidebar is put below the main content 3. Auto collapse the TOC on mobile ps: many styles of "wiki.css" are moved from old css files, so leave nits to following PRs.
Backport #25460 by @wxiaoguang Close #20976 Close #20975 1. Fix the bug: the TOC in footer was incorrectly rendered as main content's TOC 2. Fix the layout: on mobile, the TOC is put above the main content, while the sidebar is put below the main content 3. Auto collapse the TOC on mobile ps: many styles of "wiki.css" are moved from old css files, so leave nits to following PRs. ### for desktop ![image](https://github.com/go-gitea/gitea/assets/2114189/6c84201c-0648-465a-99e6-c53cdaee53c0) ### for mobile ![image](https://github.com/go-gitea/gitea/assets/2114189/9cb4fdfe-b6ab-4e6f-ae82-219ddb8fa27e) ### other changed pages <details> ![image](https://github.com/go-gitea/gitea/assets/2114189/ef077736-2c3e-4e3d-82fe-d9bf1ebcca98) ![image](https://github.com/go-gitea/gitea/assets/2114189/bb528429-ad5f-4258-a5c4-05f997c624ea) </details> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
Description
The new 1.17.x+ Wiki auto-generated TOC is including the headers from
_Sidebar.md
in a way that's incorrect (or, we should not add them at all?). We could:_Sidebar.md
elements in the auto-generated TOC, orIt presents worse when the Sidebar is using
##
or smaller headers, so they're appearing incorrectly indented under an actual TOC entry.Gitea Version
https://try.gitea.io
Can you reproduce the bug on the Gitea demo site?
Yes
Log Gist
No response
Screenshots
Demo of issue: https://try.gitea.io/tepozoa/test/wiki/Lorem-Markdownum
Look to "Sidebar Header" and "Sidebar Footer" at the bottom of the TOC, which appear incorrectly as children of "Altissimus clara" which is part of the content on the left.
Git Version
No response
Operating System
No response
How are you running Gitea?
https://try.gitea.io
Database
No response
The text was updated successfully, but these errors were encountered: