ex_doc icon indicating copy to clipboard operation
ex_doc copied to clipboard

Proposal: Include signatures in sidebar items

Open eksperimental opened this issue 3 years ago • 3 comments

I think it will improve the user experience to include the function signature for every function, type, guard, callback, etc in the side bar.

This could be added to the title attribute in the anchor element, and it would look like this when you hover it:

image

The only drawback is that it could be distracting and detrimental, but it only shows after a second or so of leaving the cursor idle.

EDIT: This feature could also be included in the search suggestions in the sidebar.

eksperimental avatar Oct 02 '22 16:10 eksperimental

The use case is that many times there are functions with same name but different arities and it you don't know which one to choose because you don't know what these arguments are. Other times, you only need to know the order of the arguments, so you don't even need to leave the current page, as this feature can also be implemented in the search suggestions in the sidebar.

eksperimental avatar Oct 02 '22 16:10 eksperimental

Yes, agreed. A pull request would be appreciated!

josevalim avatar Oct 02 '22 16:10 josevalim

Anyone willing to contribute, please feel free to grab the issue. If not I will eventually contribute a PR. Cheers

eksperimental avatar Oct 02 '22 16:10 eksperimental