Kotlin / dokka

API documentation engine for Kotlin
https://kotl.in/dokka
Apache License 2.0
3.45k stars 410 forks source link

HTML Symbol filters #3922

Open martinbonnin opened 1 week ago

martinbonnin commented 1 week ago

Follow up from this slack discussion

On a package/type page, it would be nice being able to have filter to filter out symbols according to some criterias. The ones I currently have in mind:

Those last 2 OptIn filters are related to https://github.com/Kotlin/dokka/issues/1862. I think I'd like it to expand to all the different OptIn annotation present in that type. For an example @ExperimentalApi or @LowLevelApi, etc... There's an issue that if there are a lot of OptIn, the filter list will grow too much but IMO if there are many OptIn in a type, this is probably a code smell already.

Ideally, the filter can be set through a query parameter so that shareable links can include them:

https://com.example/symbol/index.html?filter=deprecated,extensions

I think I'd like the default to include everything for easier "search in page" functionality. With visual clues for deprecated/protected/opt-in symbols (see also #3924)

Note that this issue is different from https://github.com/Kotlin/dokka/issues/3874 in that it filters inside the page while I understand #3874 is about search filters.