Skip to content

Conversation

@mcarrano
Copy link
Member

@mcarrano mcarrano commented Apr 17, 2023

Combines docs for Chip and ChipGroup into a single page. Note that I added some documentation to the example since there was none previously.

What: Closes #8744

@patternfly-build
Copy link
Contributor

patternfly-build commented Apr 21, 2023

Copy link
Contributor

@edonehoo edonehoo left a comment

Choose a reason for hiding this comment

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

Initial review re: headings. Open to feedback/questions! I can also edit/add documentation for each example in a followup review since there are only a couple.

---

## Examples
## Chip examples
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
## Chip examples
## Examples

Since the rest of our component docs call this section "Examples", I think it would be best to remain aligned with that - even if we're combining a couple of former components. This also aligns with what we do with toolbar, for example.

Copy link
Member Author

Choose a reason for hiding this comment

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

@edonehoo The reason we did this was to differentiate between the two sets of examples in the page - so we have Chip examples and Chip group examples. We used that same pattern when combining Alert and Alert group: https://patternfly-react-pr-8968.surge.sh/components/alert Or are you saying that we don't need a second h2 heading for Chip group examples?

Copy link
Contributor

@edonehoo edonehoo Apr 27, 2023

Choose a reason for hiding this comment

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

@mcarrano Ah, I haven't seen the Alert PR yet. Thanks for linking -- it's helpful to see an example with more "sub" examples in each section. Toolbar is kind of a different case, so it's not the best comparison.

I was saying that we don't need a second h2 heading to split/differentiate the "base" vs "group" examples, because it felt like we were still keeping the two original components separate, just on a new page. But, maybe keeping them split makes sense since they are different React components?

But this is kind of splitting hairs and I don't have a huge preference either way - so long as we are consistent and make sure that the "blurb" description is updated to cover both example groups. If we do decide to keep them split I would change the headings to "Examples" and "Chip group examples". I still feel inclined to keep the first heading consistent with the rest of our components.

Copy link
Contributor

Choose a reason for hiding this comment

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

I do feel that Chip/ChipGroup is different from the Alerts. With the Alert and AlertGroup, both components had variants and variant examples and we need a way to distinguish the two. With the Chip and chip group there is really no overlap in examples.

Here is how the Chip Group documentation looked before we split it it from Chip before. I think it was fine as it was without having to create sub categories for Chip vs Chip group.
https://www.patternfly.org/2021.15/components/chip-group

```

## Chip group examples
A chip group is a collection of chips that can be grouped by category and used to represent one or more values assigned to a single attribute. When the value of `numChips` is exceeded, additional chips will be hidden using an overflow chip.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
A chip group is a collection of chips that can be grouped by category and used to represent one or more values assigned to a single attribute. When the value of `numChips` is exceeded, additional chips will be hidden using an overflow chip.

Move this to the simple inline chip groups example to better indicate that all of the examples are part of the "chips" component?

mcarrano and others added 3 commits April 25, 2023 14:20
Co-authored-by: edonehoo <105813956+edonehoo@users.noreply.github.com>
Co-authored-by: edonehoo <105813956+edonehoo@users.noreply.github.com>
Co-authored-by: edonehoo <105813956+edonehoo@users.noreply.github.com>
Copy link
Contributor

@nicolethoen nicolethoen left a comment

Choose a reason for hiding this comment

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

This LGTM. I'm okay with changing a few heading titles.
I don't have a strong opinion one way or the other whether we still want to partition the Chip and Chip group examples with differentiated titles.

---

## Examples
## Chip examples
Copy link
Contributor

Choose a reason for hiding this comment

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

I do feel that Chip/ChipGroup is different from the Alerts. With the Alert and AlertGroup, both components had variants and variant examples and we need a way to distinguish the two. With the Chip and chip group there is really no overlap in examples.

Here is how the Chip Group documentation looked before we split it it from Chip before. I think it was fine as it was without having to create sub categories for Chip vs Chip group.
https://www.patternfly.org/2021.15/components/chip-group

@mcarrano
Copy link
Member Author

mcarrano commented May 1, 2023

@tlabaj @edonehoo I made more updates based on your feedback. Please re-review.

Copy link
Contributor

@tlabaj tlabaj left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@edonehoo edonehoo left a comment

Choose a reason for hiding this comment

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

LGTM! I'll plan to add content to the undocumented examples in a follow up PR.

@tlabaj tlabaj merged commit b3ad512 into patternfly:v5 May 2, 2023
@patternfly-build
Copy link
Contributor

Your changes have been released in:

  • @patternfly/react-code-editor@5.0.0-alpha.86
  • @patternfly/react-core@5.0.0-alpha.85
  • @patternfly/react-docs@6.0.0-alpha.92
  • demo-app-ts@5.0.0-alpha.69
  • @patternfly/react-table@5.0.0-alpha.87

Thanks for your contribution! 🎉

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

Successfully merging this pull request may close these issues.

Chip - merge documentation for Chip and Chip Group

5 participants