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

Improve the functionDef renderer for long names #422

Open
tristanlatr opened this issue Jul 28, 2021 · 1 comment
Open

Improve the functionDef renderer for long names #422

tristanlatr opened this issue Jul 28, 2021 · 1 comment

Comments

@tristanlatr
Copy link
Contributor

Functions with very long parameters names are not rendered in an optimal way.

Screen Shot 2021-07-28 at 1 12 12 PM

We should probably add <wbr> tags like we do in annotations.

We could even go further and borrow the _PrettySignature objects from mitmproxy/pdoc repo, such that the longer signatures parameters are padded with 4 spaces: https://github.com/mitmproxy/pdoc/blob/ac29a26b9878a0237f7563c14d193304743b544a/pdoc/doc.py#L942-L1006

@tristanlatr tristanlatr changed the title Improve the functionDef renderer Improve the functionDef renderer for long names Apr 10, 2022
@tristanlatr
Copy link
Contributor Author

Now that I think about it, I don’t think we should pad the signature with 4 spaces when it’s long. Everything should simply be displayed inline, like in Sphinx. the parameter table already take enough space. But we should use the insert break point function.

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

No branches or pull requests

1 participant