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 readability of attribute documentation #180

Open
ArthurClemens opened this issue Nov 13, 2022 · 3 comments
Open

Improve readability of attribute documentation #180

ArthurClemens opened this issue Nov 13, 2022 · 3 comments
Labels
enhancement New feature or request

Comments

@ArthurClemens
Copy link

ArthurClemens commented Nov 13, 2022

For some attributes, the displayed documentation is almost unreadable.

Rendered in phx_live_storybook:

image

The same documentation generated by ExDoc:

image


Some suggestions:

  • Documentation column
    • Render Markdown
    • Remove max-width: 16rem - this is far too small
    • Remove style white-space: pre-line;
  • Column Default
    • Add style white-space: break-spaces;
    • Not styling per se, but the Value field cannot be edited when the value is a map
@cblavier
Copy link
Contributor

I could indeed improve CSS, but I think that whatever I do, this won't render well in a table.
What do you think of truncating the doc to the first paragraph, and then click on it to expand full doc in a modal window?

There are also some redundant information: ExDoc generate documentation for default values, but this information is already visible in the next column

@ArthurClemens
Copy link
Author

An expand option could work. Perhaps reveal it in an extra row below the current one.

@ArthurClemens
Copy link
Author

ArthurClemens commented Nov 14, 2022

I was thinking along these lines:

image

I've tweaked the data a bit:

  • Trimmed the default value
  • Rendered the code fragment inside a pre

@cblavier cblavier added the enhancement New feature or request label Jul 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants