Skip to content

Update component docs (Header, Radio, Checkbox, Heading, Label, LabelGroup) #1708

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

Merged
merged 17 commits into from
Dec 20, 2021

Conversation

rezrah
Copy link
Contributor

@rezrah rezrah commented Dec 9, 2021

@changeset-bot
Copy link

changeset-bot bot commented Dec 9, 2021

⚠️ No Changeset found

Latest commit: ff10c7c

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@rezrah rezrah added the skip changeset This change does not need a changelog label Dec 9, 2021
@github-actions
Copy link
Contributor

github-actions bot commented Dec 9, 2021

size-limit report 📦

Path Size
dist/browser.esm.js 58.92 KB (0%)
dist/browser.umd.js 59.25 KB (0%)

@rezrah rezrah changed the title Update component docs (Header, Radio, Checkbox) Update component docs (Header, Radio, Checkbox, Heading) Dec 9, 2021
@rezrah rezrah changed the title Update component docs (Header, Radio, Checkbox, Heading) Update component docs (Header, Radio, Checkbox, Heading, Label, LabelGroup) Dec 9, 2021
@rezrah rezrah marked this pull request as ready for review December 9, 2021 17:33
@rezrah rezrah requested review from a team and siddharthkp December 9, 2021 17:33
@rezrah rezrah requested a review from colebemis December 9, 2021 17:39
/>
<PropsTableRow
name="disabled"
type="boolean"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this have a default value?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's an optional prop, so no. Or are you setting undefined explicitly?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it make sense to say this defaults tofalse?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that's misrepresenting the data type, as false !== undefined. I think literally undefined would make sense, or to provide a way to clearly indicate it's optional the same way you do with required?


Native `<input>` attributes are forwarded to the underlying React `input` component and are not listed below.
<PropsTable>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The heading of prop tables is usually the name of the component:

Suggested change
<PropsTable>
### Checkbox
<PropsTable>

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The example heading in the Issue description here shows it as Props, which feels sensible given the content it describes... or am I misunderstanding this? What was the reasoning behind repeating the component name here?

<ComponentChecklist
items={{
propsDocumented: true,
noUnnecessaryDeps: false,
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This component seems to expose styled-system, which I presume is an unnecessary dep?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since styled-system is required by the whole library, I don't think I'd consider it an unnecessary dep

noUnnecessaryDeps: false,
adaptsToThemes: true,
adaptsToScreenSizes: false,
fullTestCoverage: false,
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

75% on the some conditional behaviour

propsDocumented: true,
noUnnecessaryDeps: false,
adaptsToThemes: true,
adaptsToScreenSizes: false,
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unsure about this one. Arguably it could have some responsive behaviour to ensure size variants respect the constraints of the current screen and medium, so that the user doesn't have to do this themselves.

@rezrah rezrah requested a review from colebemis December 16, 2021 18:46
Copy link
Contributor

@colebemis colebemis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be good to go after the merge conflicts are addressed 👍

@rezrah rezrah merged commit 2b3744e into main Dec 20, 2021
@rezrah rezrah deleted the docs/convert-prop-tables-pt1 branch December 20, 2021 14:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
skip changeset This change does not need a changelog
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants