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

Footnote links in short descriptions do not work #109024

Closed
ojeda opened this issue Mar 11, 2023 · 7 comments
Closed

Footnote links in short descriptions do not work #109024

ojeda opened this issue Mar 11, 2023 · 7 comments
Labels
A-docs Area: Documentation for any part of the project, including the compiler, standard library, and tools C-bug Category: This is a bug. T-libs-api Relevant to the library API team, which will review and decide on the PR/issue.

Comments

@ojeda
Copy link
Contributor

ojeda commented Mar 11, 2023

For instance, https://doc.rust-lang.org/std/pin/index.html#macros contains pin!, and its short description (i.e. the docblock-short) has the footnotes, but clicking those does not work. The footnotes work, of course, when clicking them in the pin! page at https://doc.rust-lang.org/std/pin/macro.pin.html.

There are several ways to resolve the issue, e.g. making the links in the short descriptions point to the page containing the footnotes, or removing footnote links from short descriptions, or removing the link but keeping the text, or adding the footnotes in the page with the short descriptions somehow, etc.

@ojeda ojeda added the C-bug Category: This is a bug. label Mar 11, 2023
@workingjubilee
Copy link
Member

workingjubilee commented Mar 11, 2023

Footnotes are flow-breaking and the definition of these terms is very important for understanding, so we should probably remove the footnotes and uplift the definitions. It is important that these documents remain legible and can be traversed in "source form", if they are dependent on the rustdoc formatting (which is unstable) they have failed to exploit the basic capabilities of Markdown, which raises the question of why we are still using it if we do not expect the raw text form to be easy to read.

@workingjubilee workingjubilee added T-libs-api Relevant to the library API team, which will review and decide on the PR/issue. A-docs Area: Documentation for any part of the project, including the compiler, standard library, and tools labels Mar 11, 2023
@Noratrieb
Copy link
Member

Noratrieb commented Mar 11, 2023

#108973 touches these docs again

@est31
Copy link
Member

est31 commented Mar 12, 2023

Footnotes could open a pop up or something, or have a hover text.

@GuillaumeGomez
Copy link
Member

I opened #109351.

@est31: The problem with hover text is that it doesn't work on mobile, so that leaves us with the popup option: it would require a new color for footnote references. Not sure if it's a good idea or not. I personally like the current display where the footnote definitions are after the text.

matthiaskrgr added a commit to matthiaskrgr/rust that referenced this issue Mar 20, 2023
…ary, r=notriddle

rustdoc: Remove footnote references from doc summary

Since it's one line, we don't have the footnote definition so it doesn't make sense to have the reference.

Part of rust-lang#109024.

r? `@notriddle`
@camelid
Copy link
Member

camelid commented Jun 12, 2023

Hiding the footnote altogether in the short description seems a bit unfortunate to me. I can imagine situations where the footnote has important caveats that someone reading the short description should know. I wonder how hard it would be to link the short-description footnote to the footnote definition on the item's page as ojeda suggested? Another (less good) option is having a pop-up that says "Footnotes not available in doc summaries." or something like that.

@workingjubilee
Copy link
Member

I believe this has been resolved for the cases in question, so I am closing this.

@ojeda
Copy link
Contributor Author

ojeda commented Jun 20, 2023

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-docs Area: Documentation for any part of the project, including the compiler, standard library, and tools C-bug Category: This is a bug. T-libs-api Relevant to the library API team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

6 participants