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

Unhelpful hints about classes on frontend + whitespace issue #464

Closed
koeaw opened this issue Dec 7, 2023 · 1 comment
Closed

Unhelpful hints about classes on frontend + whitespace issue #464

koeaw opened this issue Dec 7, 2023 · 1 comment
Labels
bug Something isn't working (properly, as expected, at all) UI-UX Appearance, coherence, usability of user-facing parts (frontend, user interface)

Comments

@koeaw
Copy link
Contributor

koeaw commented Dec 7, 2023

Describe the bug
The model.__doc__ value we use to inject docstring information into the frontend, where it can be accessed via hover tooltips, is only useful for classes which actually have a docstring. For classes which don't, __doc__ seems to fall back onto the class definition.*

Additionally, the resulting <abbr> HTML tags seem to mess with whitespace: the class name may be preceded by a newline, though I'm not entirely sure if that is to do with the formatting and/or length of the docstring contents (which go into the "title" attribute of the <abbr> tag) or the way the tag is included (via templatetags).

Example:
Looking at the classes in the "Relations" menu, I see this issue with the "Property" class but not with "Triple" (neither of which currently has a docstring).

Screenshot:
Screenshot from 2023-12-07 16-02-11


*A cursory look at the Python docs suggests __doc__ is supposed to default to None when there is no docstring. The behaviour I'm seeing, however, mirrors that of inspect.getdoc().

@koeaw koeaw added bug Something isn't working (properly, as expected, at all) UI-UX Appearance, coherence, usability of user-facing parts (frontend, user interface) labels Dec 7, 2023
@koeaw koeaw linked a pull request Dec 7, 2023 that will close this issue
@b1rger
Copy link
Contributor

b1rger commented Feb 14, 2024

Using the new generic base views, the class information is not displayed in the frontend anymore, therefore closing this

@b1rger b1rger closed this as completed Feb 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working (properly, as expected, at all) UI-UX Appearance, coherence, usability of user-facing parts (frontend, user interface)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants