denoland / deno

A modern runtime for JavaScript and TypeScript.
https://deno.com
MIT License
94.69k stars 5.26k forks source link

suggestion: always have the description come first in JSDocs for unstable symbols #25103

Open iuioiua opened 1 month ago

iuioiua commented 1 month ago

A symbol being unstable is secondary compared to a description of what that symbol does. I suggest we move the description to be first, and any unstable notices second.

CC @thisisjofrank @crowlKats

image

dsherret commented 1 month ago

I'm not sure about this. It being moved to the end increases the chance of it being cut off in auto-complete. Also, when someone is going to use something, they should see right away that it's unstable.

crowlKats commented 1 month ago

this is a bug with docs.deno.com postprocessing of typings, for which i have a local fix, which will land later this week

iuioiua commented 1 month ago

To be clear, I suggest moving the unstable notice to the 2nd paragraph, not the last paragraph of the symbol's documentation. I think it's more important to the user to know what the symbol does, over its instability status.

this is a bug with docs.deno.com postprocessing of typings, for which i have a local fix, which will land later this week

Sorry, what exactly is a bug? Perhaps, we can have @experimental tags be somehow represented even in symbol lists like the screenshot I share.

dsherret commented 1 month ago

To be clear, I suggest moving the unstable notice to the 2nd paragraph, not the last paragraph of the symbol's documentation. I think it's more important to the user to know what the symbol does, over its instability status.

I don't agree with that. I think being unstable is the most important thing for someone to know. People rarely even read docs and I think it should be the first thing people see in capital letters in order to catch their eye. This is especially important given we no longer require --unstable for type checking unstable APIs.

iuioiua commented 1 month ago

Let's agree to disagree then 😛

Either way, perhaps the suggestion in my previous comment might satisfy both preferences. Maybe it could be an "unstable" button or similar next to the symbol name.