FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

fix(chipGroup): Allow variable number of chips to be displayed by jessiehuff · Pull Request #2878 · patternfly/patternfly-react · GitHub

fix(chipGroup): Allow variable number of chips to be displayed - #2878

Merged
tlabaj merged 6 commits into
patternfly:masterfrom
jessiehuff:fix/chipgroupShow
Sep 16, 2019
Merged

fix(chipGroup): Allow variable number of chips to be displayed#2878
tlabaj merged 6 commits into
patternfly:masterfrom
jessiehuff:fix/chipgroupShow

Conversation

Copy link
Copy Markdown
Contributor

Fixes #1855

Copy link
Copy Markdown
Collaborator

PatternFly-React preview: https://patternfly-react-pr-2878.surge.sh

kmcfaul left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Looks good!

tlabaj requested a review from mcarrano September 9, 2019 19:23
tlabaj self-assigned this Sep 9, 2019

mcarrano left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Does this setting apply to the ChipGroup Toolbar, ChipGroup Multi-Select, or both?

Copy link
Copy Markdown
Contributor Author

@mcarrano the prop is on the ChipGroup component so it should work for both ChipGroup Toolbar and ChipGroup Multi-Select. :)

Copy link
Copy Markdown
Member

@jessiehuff I guess that the reason I asked this question was that the default for setting how many chips to show before overflow is 3, however in the ChipGroup Toolbar example you are showing 4 chips without overflow. I would have expected to see the overflow on the fourth chip unless you set the overflow to greater. Am I understanding this correctly?

Copy link
Copy Markdown
Contributor Author

@mcarrano Since the prop is on the ChipGroup component itself, it sets the children of ChipGroup to the default numChips. So in the case of ChipGroup Toolbar, it's showing 3 ChipGroupToolbarItems, not necessarily the chips inside each ChipGroupToolbarItem.

tlabaj left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

LGTM

withToolbar?: boolean;
/** Set heading level to the chip item label */
headingLevel?: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6';
/** Set number of chips to show before overflow */

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Maybe change this to say Set number of items to show before overflow since or number of chips\chip groups to show before overflow

Copy link
Copy Markdown
Member

@jessiehuff @tlabaj it sounds like there is a misunderstanding about what is intended. I see this as 3 separate chip groups, not as one chip group with 3 items. I don't think we want to hide an entire category of chips. It's also the case that we would not want to show a large number of chips in a grouping even if there were less than 3 groups. Will be glad to talk this through live if that helps to clarify the intended behavior. This document talks a bit more about how I am seeing the ChipGroup from a design perspective.

mcarrano left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

After further conversations, I think that this PR satisfies it's aims within the context of the current implementation of ChipGroups. There is currently an issue open on Core to refactor implementation of Chips Groups to be more consistent with design intent as described here: patternfly/patternfly#1837

tlabaj merged commit 6bbff0c into patternfly:master Sep 16, 2019

Copy link
Copy Markdown
Collaborator

Your changes have been released in:

  • @patternfly/react-core@3.104.2
  • @patternfly/react-docs@4.13.4
  • @patternfly/react-inline-edit-extension@2.11.38
  • demo-app-ts@3.0.1
  • @patternfly/react-table@2.20.18
  • @patternfly/react-topology@2.8.36
  • @patternfly/react-virtualized-extension@1.2.26

Thanks for your contribution! 🎉

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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.

ChipGroup should allow a variable number of chips to be displayed

5 participants


Back | FazBrowse Home | New Git URL