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

Strikeout deprecated headings in sidemenu for docusaurus #747

Closed
DominicGBauer opened this issue Dec 23, 2024 · 8 comments
Closed

Strikeout deprecated headings in sidemenu for docusaurus #747

DominicGBauer opened this issue Dec 23, 2024 · 8 comments

Comments

@DominicGBauer
Copy link

What package is the feature request related to?

docusaurus-plugin-typedoc

Background

When using docusaurus plugin with sidemenu, the sidemenu title is not struck out when deprecated.
image

Proposed solution

It would really be nice if the sidemenu item is struck out when deprecated. Example from dart docs
image

@tgreyuk
Copy link
Member

tgreyuk commented Dec 23, 2024

Yes can do this. Will need to expose an additional flag to navigation via typedoc-plugin-markdown too. Will add to list for next release.

@DominicGBauer
Copy link
Author

Epic thanks @tgreyuk!

This was referenced Dec 30, 2024
@tgreyuk
Copy link
Member

tgreyuk commented Jan 1, 2025

This functionality is available in:

[email protected]
[email protected]

@DominicGBauer
Copy link
Author

DominicGBauer commented Jan 7, 2025

Hi @tgreyuk thanks a lot for this! Not to sound ungrateful but is it possible to make the strikeout more apparent and have the line not miss any space please?

image image

It also looks like the font is changed from
Family name: .SF NS
PostScript name: .SFNS-Regular_wdth_opsz110000_GRAD_wght1F40000

to
Family name: Helvetica
PostScript name: Helvetica

when it is stricken out

image

@tgreyuk
Copy link
Member

tgreyuk commented Jan 7, 2025

Thanks @DominicGBauer for feedback :)

The issue here is that the strikethough has been created with the Unicode \u0336 (combining long stroke overlay). What is happening is that the default font doesn't support this character so is falling back to a font that does.

Was probably a bit hasty getting this out and I think a plan B is required here.

New proposed solution is to add a class name to the relevant sidebar item. This could then be handled properly by css. Like so:

typedoc-sidebar.cjs (autogenerated sidebar)

Screenshot 2025-01-07 at 17 39 31

Generated html:

Screenshot 2025-01-07 at 17 48 41

docusaurus.config.js (added by user)

Screenshot 2025-01-07 at 17 42 41

css/typedoc.css (added by user - could also be added to existing custom css if exists )

Screenshot 2025-01-07 at 17 42 57

output:

Screenshot 2025-01-07 at 17 56 16

Does this seem reasonable? It gives users greater flexibility - could make the class name configurable if useful.

@DominicGBauer
Copy link
Author

Hi @tgreyuk yes please that would be brilliant! Thanks a lot :)

@DominicGBauer
Copy link
Author

This is perfect :D! Thank you very much @tgreyuk!
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants