saas-js / saas-ui

The React component library for startups, built with Chakra UI.
https://saas-ui.dev
MIT License
1.32k stars 128 forks source link

Component documentation (props table and code examples) is improvable #204

Closed lwolle closed 6 months ago

lwolle commented 8 months ago

Description

Admitted, that's a bit of nit-picking but flaws quickly add up.

When I visit the component documentation to inspect the props, I expect the props table to list all props relevant to the component. One example is the Sidebar component and its variant prop. The props table doesn't list this prop; luckily, the examples are functional. Variant example: https://saas-ui.dev/docs/components/layout/sidebar#condensed-variant Props table: https://saas-ui.dev/docs/components/layout/sidebar/props

Unused code and imports

The code example import unused code and therefore the code examples become unwieldy. Inspecting an example becomes an exercise in scrolling past the imports. Please see this examples https://saas-ui.dev/docs/components/layout/sidebar#breakpoints

On the other hand, some code examples refer to components that are not part of the import list. Generally, every dev should be capable of getting these examples running despite the missing imports. Still, as you are trying to establish a freemium business model, I wanted to let you know.

Double sidebar example is not functional

The second sidebar appears for a second, but the example doesn't allow to expand it again.

Thanks again for this nice library!!

Link to Reproduction

No response

Steps to reproduce

  1. Go to '...'
  2. Click on '...'
  3. Scroll down to '...'
  4. See error

Saas UI Version

2.5.5

Chakra UI Version

2.8.2

Browser

Brave 1.61.105 (~Chromium 120)

Operating System

Additional Information

No response

linear[bot] commented 8 months ago

SUI-406 Component documentation (props table and code examples) is improvable

Pagebakers commented 8 months ago

Thanks for the feedback @lwolle. It seems like the theming props are being excluded, those should definitely be in there.

With the current code example setup these missing imports aren't picked up unfortunately so there might be some incomplete examples, I'll these ones sorted out :)

lwolle commented 8 months ago

No worries. Thanks for looking into it.

Pagebakers commented 7 months ago

Theming props are now added to the props docs :)