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

bug: descriptions are being dropped for "other" category symbols #664

Closed
favna opened this issue Aug 5, 2024 · 5 comments
Closed

bug: descriptions are being dropped for "other" category symbols #664

favna opened this issue Aug 5, 2024 · 5 comments
Labels
bug Issue raised as a bug.

Comments

@favna
Copy link

favna commented Aug 5, 2024

What package is the bug related to?

typedoc-plugin-markdown

Describe the issue

Note

I first reported this for starlight-typedoc, however this appears to be an issue with the underlying typedoc-plugin-markdown instead. See: HiDeoo/starlight-typedoc#55

For the project https://github.com/skyra-project/discord-components I use public accessor because that's how Lit Element works when using TC39 decorators. When parsing this with regular typedoc (config below) the accessor still do get put into the "other" category just like typedoc-plugin-markdown does, however unlike typedoc-plugin-markdown, regular typedoc still retains descriptions.

Relevant code: https://github.com/skyra-project/discord-components/blob/e34e27efff4d1fb3d41def616bed017d97964d34/packages/core/src/components/discord-audio-attachment/DiscordAudioAttachment.ts#L124-L169

From the HTML generated by Typedoc:
ishare-1722689243

From the HTML generated by starlight-typedoc (which uses typedoc-plugin-markdown):

ishare-1722689271

To Reproduce

  1. Clone https://github.com/skyra-project/discord-components
  2. Run git switch bugreport/starlight-typedoc-other-descriptions to switch to a branch with some files prepared for this bug report
  3. Run yarn install --immutable
  4. Run yarn build
  5. Run yarn bug:starlight
  6. Navigate to http://localhost:4321/api/classes/discordaudioattachment/#bytes
  7. In a new terminal run yarn bug:typedoc, this will build with regular typedoc and start an HTTP server on port 8090
  8. Navigate to http://localhost:8090/classes/DiscordAudioAttachment.html#bytes

TypeDoc configuration

{
	"readme": "../documentation/src/assets/README.md",
	"excludeExternals": true,
	"githubPages": true,
	"disableSources": true,
	"entryPoints": ["./src/index.ts"],
	"tsconfig": "./src/tsconfig.json",
	"basePath": "/",
    "out": "./docs",
    "cleanOutputDir": true
}

Expected behavior

The tsdoc comments from accessors (other category symbols) aren't dropped

System Info

  System:
    OS: macOS 14.5
    CPU: (8) arm64 Apple M1
    Memory: 70.73 MB / 16.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 22.4.0 - /private/var/folders/jy/w45_1th97698mzgm_nsfl35w0000gn/T/xfs-2eeb1fb6/node
    Yarn: 4.3.1 - /private/var/folders/jy/w45_1th97698mzgm_nsfl35w0000gn/T/xfs-2eeb1fb6/yarn
    npm: 10.8.1 - ~/.volta/tools/image/node/22.4.0/bin/npm
    pnpm: 9.6.0 - ~/.volta/bin/pnpm
    bun: 1.1.21 - /opt/homebrew/bin/bun
  Browsers:
    Edge: 127.0.2651.86
    Safari: 17.5
  Packages:
    @astrojs/lit: ^4.3.0,
    @astrojs/starlight: 0.25.3,
    astro: 4.12.3,
    starlight-typedoc: 0.13.1,
    typedoc: 0.26.5,
    typedoc-plugin-markdown: 4.2.3
@tgreyuk
Copy link
Member

tgreyuk commented Aug 8, 2024

Thanks - have a fix and it will go into the next release.

@tgreyuk
Copy link
Member

tgreyuk commented Aug 13, 2024

Should be fixed in typedoc-plugin-markdown@4.2.4 .

@favna
Copy link
Author

favna commented Aug 14, 2024

Alas it appears that this is not yet fully fixed. I am definitely on the right version:

-1723636246

But the generated markdown only has doc comments for the author field and none of the others:

---
editUrl: false
next: true
prev: true
title: DiscordMessage
---

## Extends

- `LitElement`

## Implements

- [`LightTheme`](/api/interfaces/lighttheme/)

## Constructors

### new DiscordMessage()

> **new DiscordMessage**(): [`DiscordMessage`](/api/classes/discordmessage/)

#### Returns

[`DiscordMessage`](/api/classes/discordmessage/)

#### Inherited from

`LitElement.constructor`

## Accessors

### author

The message author's username.

#### Default Value

\```ts
'User'
\```

***

### avatar

***

### bot

***

### compactMode

***

### dismissMessageClicked

***

### edited

***

### ephemeral

***

### hasThread

***

### highlight

***

### lightTheme

#### Implementation of

[`LightTheme`](/api/interfaces/lighttheme/).[`lightTheme`](/api/interfaces/lighttheme/#lighttheme)

***

### messageBodyOnly

***

### noBackground

***

### op

***

### profile

***

### roleColor

***

### roleIcon

***

### roleName

***

### server

***

### timestamp

***

### twentyFour

***

### verified

I have updated the bugreport/starlight-typedoc-other-descriptions with the latest dependencies where the issue can still be reproduced.

@tgreyuk
Copy link
Member

tgreyuk commented Aug 15, 2024

@favna apologies. It really should be fixed in 4.2.5:

Screenshot 2024-08-15 at 23 37 04

@favna
Copy link
Author

favna commented Aug 16, 2024

Confirmed! Tyvm!!

@favna favna closed this as completed Aug 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue raised as a bug.
Projects
None yet
Development

No branches or pull requests

2 participants